{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper - Interest, Regions & Related Queries",
    "description": "Scrape Google Trends for any keywords: interest over time, interest by region, top and rising related queries and topics. Compare up to 5 terms on one scale. Any country or state, 9 time ranges or custom dates, web, news, images, YouTube and Shopping. JSON/CSV. No API keys.",
    "version": "0.0",
    "x-build-id": "aTDGiYrlyGmkQlCch"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/santhej~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-santhej-google-trends-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/santhej~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-santhej-google-trends-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/santhej~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-santhej-google-trends-scraper",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "keywords"
        ],
        "properties": {
          "keywords": {
            "title": "Keywords",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "Search terms to look up on Google Trends, for example 'bitcoin' or 'standing desk'. One per line, up to 100 per run. Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "compareKeywords": {
            "title": "Compare keywords (groups of 5)",
            "type": "boolean",
            "description": "On: every five consecutive keywords are compared on one chart, as on Google Trends, so their values share one 0-100 scale and are directly comparable. Off: each keyword is looked up on its own and scaled to its own peak (100).",
            "default": true
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "past_hour",
              "past_4_hours",
              "past_day",
              "past_7_days",
              "past_30_days",
              "past_90_days",
              "past_12_months",
              "past_5_years",
              "2004_present"
            ],
            "type": "string",
            "description": "Period to analyze. Points are per minute for the past hour and past 4 hours, per 8 minutes for the past day, hourly for 7 days, daily for 30 and 90 days, weekly for 12 months and 5 years, monthly for all time.",
            "default": "past_12_months"
          },
          "dateFrom": {
            "title": "Start date (custom range)",
            "type": "string",
            "description": "Start of a custom date range, as YYYY-MM-DD. When set, it replaces 'Time range'. Earliest: 2004-01-01 for web search, 2008-01-01 for the other properties."
          },
          "dateTo": {
            "title": "End date (custom range)",
            "type": "string",
            "description": "End of the custom date range, as YYYY-MM-DD. Leave blank for today."
          },
          "locationCode": {
            "title": "Country",
            "enum": [
              "",
              "2840",
              "2826",
              "2124",
              "2036",
              "2356",
              "2276",
              "2004",
              "2008",
              "2012",
              "2016",
              "2020",
              "2024",
              "2660",
              "2010",
              "2028",
              "2032",
              "2051",
              "2533",
              "2040",
              "2031",
              "2048",
              "2050",
              "2052",
              "2056",
              "2084",
              "2204",
              "2060",
              "2064",
              "2068",
              "2070",
              "2072",
              "2074",
              "2076",
              "2086",
              "2092",
              "2096",
              "2100",
              "2854",
              "2108",
              "2132",
              "2116",
              "2120",
              "2535",
              "2136",
              "2140",
              "2148",
              "2152",
              "2156",
              "2162",
              "2166",
              "2170",
              "2174",
              "2184",
              "2188",
              "2384",
              "2191",
              "2531",
              "2196",
              "2203",
              "2180",
              "2208",
              "2262",
              "2212",
              "2214",
              "2218",
              "2818",
              "2222",
              "2226",
              "2232",
              "2233",
              "2748",
              "2231",
              "2238",
              "2234",
              "2242",
              "2246",
              "2250",
              "2254",
              "2258",
              "2260",
              "2266",
              "2268",
              "2288",
              "2292",
              "2300",
              "2304",
              "2308",
              "2312",
              "2316",
              "2320",
              "2831",
              "2324",
              "2624",
              "2328",
              "2332",
              "2334",
              "2340",
              "2344",
              "2348",
              "2352",
              "2360",
              "2368",
              "2372",
              "2376",
              "2380",
              "2388",
              "2392",
              "2832",
              "2400",
              "2398",
              "2404",
              "2296",
              "2900",
              "2414",
              "2417",
              "2418",
              "2428",
              "2422",
              "2426",
              "2430",
              "2434",
              "2438",
              "2440",
              "2442",
              "2446",
              "2450",
              "2454",
              "2458",
              "2462",
              "2466",
              "2470",
              "2584",
              "2474",
              "2478",
              "2480",
              "2175",
              "2484",
              "2583",
              "2498",
              "2492",
              "2496",
              "2499",
              "2500",
              "2504",
              "2508",
              "2104",
              "2516",
              "2520",
              "2524",
              "2528",
              "2540",
              "2554",
              "2558",
              "2562",
              "2566",
              "2570",
              "2574",
              "2807",
              "2580",
              "2578",
              "2512",
              "2586",
              "2585",
              "2275",
              "2591",
              "2598",
              "2600",
              "2604",
              "2608",
              "2612",
              "2616",
              "2620",
              "2630",
              "2634",
              "2178",
              "2638",
              "2642",
              "2646",
              "2659",
              "2662",
              "2666",
              "2670",
              "2882",
              "2674",
              "2682",
              "2686",
              "2688",
              "2690",
              "2694",
              "2702",
              "2534",
              "2703",
              "2705",
              "2090",
              "2706",
              "2710",
              "2239",
              "2410",
              "2728",
              "2724",
              "2144",
              "2736",
              "2740",
              "2744",
              "2752",
              "2756",
              "2158",
              "2762",
              "2834",
              "2764",
              "2044",
              "2270",
              "2626",
              "2768",
              "2772",
              "2776",
              "2780",
              "2788",
              "2792",
              "2795",
              "2796",
              "2798",
              "2850",
              "2800",
              "2804",
              "2784",
              "2581",
              "2858",
              "2860",
              "2548",
              "2336",
              "2862",
              "2704",
              "2876",
              "2732",
              "2887",
              "2894",
              "2716"
            ],
            "type": "string",
            "description": "Limit interest to one country, or leave on Worldwide. Interest by region is then broken down one level below: countries for Worldwide, states or provinces for a country.",
            "default": ""
          },
          "geo": {
            "title": "Region code (optional)",
            "type": "string",
            "description": "A Google Trends geo code, for a state or province instead of a whole country: US-CA (California), US-NY, GB-ENG (England), DE-BY (Bavaria), IN-MH (Maharashtra). Two-letter country codes such as US or GB work too. When set, it replaces 'Country'."
          },
          "trendType": {
            "title": "Trends property",
            "enum": [
              "web",
              "images",
              "news",
              "froogle",
              "youtube"
            ],
            "type": "string",
            "description": "Which searches to measure: Google web search, image search, news search, Google Shopping or YouTube search.",
            "default": "web"
          },
          "category": {
            "title": "Category",
            "enum": [
              "0",
              "3",
              "47",
              "44",
              "22",
              "12",
              "5",
              "7",
              "71",
              "8",
              "45",
              "65",
              "11",
              "13",
              "958",
              "19",
              "16",
              "299",
              "14",
              "66",
              "29",
              "533",
              "174",
              "18",
              "20",
              "67"
            ],
            "type": "string",
            "description": "Narrow an ambiguous keyword to one topic area: 'apple' in Food & Drink is the fruit, in Finance it is the company's stock, card and payments.",
            "default": "0"
          },
          "languageCode": {
            "title": "Language",
            "type": "string",
            "description": "Language of topic names and region names in the results, as a code: en, es, de, fr, pt-BR, ja, ko. It does not change which searches are counted.",
            "default": "en"
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Add where each keyword is searched most: a 0-100 score per region and, in a comparison, how each region splits between the compared keywords.",
            "default": true
          },
          "relatedData": {
            "title": "Related queries and topics",
            "enum": [
              "auto",
              "always",
              "off"
            ],
            "type": "string",
            "description": "Top and rising related queries and related topics for each keyword. Google Trends shows these lists for one keyword at a time, so inside a comparison they take one extra lookup per keyword.",
            "default": "auto"
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}