{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends API & Scraper - pytrends alternative",
    "description": "Google Trends API and pytrends alternative without 429 errors: interest over time, by country, state, city and US metro, related queries and topics, Trending Now with search volume. Compare 50+ terms on one scale, daily data for years. From $0.50 per 1,000.",
    "version": "0.1",
    "x-build-id": "8gtDTKF7IE1SXtDJL"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alom~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alom-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/alom~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-alom-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/alom~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-alom-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",
        "properties": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "explore",
              "trendingNow"
            ],
            "type": "string",
            "description": "<strong>Explore</strong> = the classic Google Trends chart for your search terms. <strong>Trending Now</strong> = the live list of trending searches per country or US state, with search volume, growth and news.",
            "default": "explore"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Terms to look up. Each term becomes one result. Turn on <strong>Compare terms</strong> to put up to 5 comma-separated terms on one chart (e.g. <code>tea, coffee</code>), or <strong>Compare more than 5 terms on one scale</strong> (below) for up to 50.",
            "items": {
              "type": "string"
            }
          },
          "isMultiple": {
            "title": "Compare terms (comma = separator)",
            "type": "boolean",
            "description": "Treat commas in a search term as separators and compare up to 5 terms on one chart, exactly like typing them into Google Trends.",
            "default": false
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Or paste Google Trends explore URLs. Their own settings (terms, geo, date, category, property) are used.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "spreadsheetId": {
            "title": "Google Sheet ID",
            "type": "string",
            "description": "Optional: ID of a <strong>public</strong> Google Sheet with one search term per row in the first column (row 1 is a header)."
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "",
              "now 1-H",
              "now 4-H",
              "now 1-d",
              "now 7-d",
              "today 1-m",
              "today 3-m",
              "today 12-m",
              "today 5-y",
              "all"
            ],
            "type": "string",
            "description": "Period to analyse.",
            "default": ""
          },
          "customTimeRange": {
            "title": "Custom time range",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2} \\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Overrides the time range. Format: <code>2024-01-01 2024-12-31</code>."
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Country or region code: <code>US</code>, <code>GB</code>, <code>US-CA</code>... Leave empty for Worldwide.",
            "default": ""
          },
          "category": {
            "title": "Category",
            "enum": [
              "0",
              "3",
              "184",
              "316",
              "612",
              "569",
              "539",
              "182",
              "34",
              "35",
              "33",
              "613",
              "23",
              "36",
              "24",
              "47",
              "1190",
              "1191",
              "1140",
              "1213",
              "1013",
              "1214",
              "806",
              "810",
              "1317",
              "273",
              "148",
              "1147",
              "1212",
              "610",
              "815",
              "1294",
              "170",
              "138",
              "89",
              "473",
              "803",
              "44",
              "1219",
              "239",
              "1220",
              "147",
              "143",
              "185",
              "94",
              "146",
              "145",
              "236",
              "22",
              "690",
              "355",
              "1183",
              "608",
              "540",
              "1184",
              "412",
              "565",
              "1177",
              "12",
              "25",
              "356",
              "46",
              "799",
              "1138",
              "784",
              "1159",
              "329",
              "288",
              "48",
              "233",
              "77",
              "955",
              "287",
              "49",
              "606",
              "255",
              "1176",
              "1199",
              "841",
              "551",
              "566",
              "50",
              "5",
              "1300",
              "30",
              "314",
              "78",
              "434",
              "311",
              "31",
              "32",
              "567",
              "785",
              "7",
              "278",
              "37",
              "279",
              "814",
              "903",
              "1282",
              "38",
              "107",
              "619",
              "71",
              "277",
              "906",
              "122",
              "297",
              "121",
              "560",
              "276",
              "8",
              "919",
              "920",
              "39",
              "41",
              "1290",
              "105",
              "936",
              "937",
              "622",
              "938",
              "45",
              "623",
              "499",
              "419",
              "254",
              "252",
              "1253",
              "251",
              "256",
              "253",
              "636",
              "437",
              "418",
              "456",
              "245",
              "645",
              "248",
              "947",
              "195",
              "257",
              "246",
              "648",
              "65",
              "64",
              "1016",
              "188",
              "189",
              "1276",
              "284",
              "458",
              "688",
              "786",
              "66",
              "439",
              "787",
              "999",
              "541",
              "977",
              "502",
              "1002",
              "11",
              "948",
              "472",
              "269",
              "271",
              "270",
              "158",
              "1348",
              "137",
              "828",
              "951",
              "1364",
              "1372",
              "471",
              "952",
              "953",
              "13",
              "385",
              "394",
              "382",
              "485",
              "383",
              "392",
              "1142",
              "301",
              "302",
              "958",
              "74",
              "60",
              "19",
              "76",
              "75",
              "366",
              "166",
              "508",
              "16",
              "112",
              "507",
              "1204",
              "572",
              "408",
              "396",
              "1077",
              "63",
              "1209",
              "299",
              "504",
              "55",
              "321",
              "191",
              "43",
              "582",
              "275",
              "529",
              "972",
              "14",
              "677",
              "56",
              "1131",
              "154",
              "59",
              "298",
              "54",
              "509",
              "882",
              "563",
              "119",
              "29",
              "378",
              "1178",
              "687",
              "463",
              "425",
              "96",
              "1080",
              "1081",
              "533",
              "527",
              "980",
              "1084",
              "474",
              "108",
              "375",
              "1233",
              "174",
              "435",
              "440",
              "505",
              "1227",
              "1168",
              "442",
              "231",
              "436",
              "444",
              "445",
              "446",
              "18",
              "68",
              "292",
              "61",
              "69",
              "1143",
              "70",
              "696",
              "73",
              "576",
              "531",
              "263",
              "1210",
              "614",
              "123",
              "432",
              "1225",
              "20",
              "1073",
              "514",
              "554",
              "998",
              "1000",
              "1273",
              "180",
              "1082",
              "1001",
              "118",
              "265",
              "1198",
              "67",
              "203",
              "708",
              "205",
              "1339",
              "206",
              "179",
              "1003",
              "1004",
              "208",
              "1010",
              "1011"
            ],
            "type": "string",
            "description": "Limit interest to one Google Trends category.",
            "default": "0"
          },
          "property": {
            "title": "Search type",
            "enum": [
              "",
              "youtube",
              "news",
              "images",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search to measure: Web, YouTube, News, Images or Shopping.",
            "default": ""
          },
          "maxItems": {
            "title": "Max results",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many results (0 = no limit).",
            "default": 0
          },
          "extraGeoResolutions": {
            "title": "Add city and metro breakdowns",
            "type": "boolean",
            "description": "For a country or region, also return interest by city (and by metro area / DMA for the US). One extra request each.",
            "default": true
          },
          "includeRelated": {
            "title": "Include related queries",
            "type": "boolean",
            "description": "Top and rising related queries.",
            "default": true
          },
          "verifyRelatedQueries": {
            "title": "Cross-check related queries",
            "type": "boolean",
            "description": "Fetch related queries from a second independent session and keep only a version both agree on. Slower, more reliable.",
            "default": true
          },
          "normalizeAcrossQueries": {
            "title": "Compare more than 5 terms on one scale",
            "type": "boolean",
            "description": "Put <strong>all</strong> your search terms (up to 50) on one comparable 0-100 scale, like one big Google Trends chart. Google compares only 5 terms at once, so the terms are fetched in groups of 4 plus a shared <strong>anchor term</strong> and each group is rescaled through the anchor. Terms with the same location, time range, category and search type become <strong>one result</strong>. Raw per-group values are kept in <code>rawValue</code>. City/metro breakdowns are not included in this mode.",
            "default": false
          },
          "anchorTerm": {
            "title": "Anchor term",
            "type": "string",
            "description": "Term shared by every group when comparing more than 5 terms. Defaults to your first term. Tip: a popular term (your biggest one) gives the most precise scale; a rarely searched anchor makes the result approximate (flagged as <code>lowPrecision</code>). Added to the comparison if it is not one of your terms."
          },
          "dailyStitching": {
            "title": "Daily data for long ranges",
            "type": "boolean",
            "description": "Google returns daily points only for ranges up to ~9 months (weekly or monthly beyond). Turn this on to get a continuous <strong>daily</strong> series for a longer <strong>custom time range</strong>, <strong>Past 12 months</strong> or <strong>Past 5 years</strong> (up to 10 years): overlapping ~8-month windows are fetched and rescaled on their overlap. Google's own weekly/monthly series is kept in <code>interestOverTime_coarse</code> and every result reports how well the two agree. Takes ~2 extra requests per 7 months of range; still one result.",
            "default": false
          },
          "trendingGeos": {
            "title": "Trending Now: locations",
            "type": "array",
            "description": "Country or US-state codes, e.g. <code>US</code>, <code>GB</code>, <code>US-CA</code>. Defaults to <code>US</code> (or the Location field).",
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Time window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "How far back to look. The past 7 days can return ~2,000 trends for the US.",
            "default": "24"
          },
          "trendingCategories": {
            "title": "Categories",
            "type": "array",
            "description": "Keep only these categories (empty = all).",
            "items": {
              "type": "string",
              "enum": [
                "Autos and Vehicles",
                "Beauty and Fashion",
                "Business and Finance",
                "Climate",
                "Entertainment",
                "Food and Drink",
                "Games",
                "Health",
                "Hobbies and Leisure",
                "Jobs and Education",
                "Law and Government",
                "Other",
                "Pets and Animals",
                "Politics",
                "Science",
                "Shopping",
                "Sports",
                "Technology",
                "Travel and Transportation"
              ]
            }
          },
          "trendingActiveOnly": {
            "title": "Only still-trending topics",
            "type": "boolean",
            "description": "Skip topics whose trend has already ended.",
            "default": false
          },
          "trendingMinVolume": {
            "title": "Minimum search volume",
            "minimum": 0,
            "type": "integer",
            "description": "Skip topics with fewer searches (e.g. <code>10000</code>).",
            "default": 0
          },
          "trendingSort": {
            "title": "Sort by",
            "enum": [
              "relevance",
              "volume",
              "recency",
              "growth"
            ],
            "type": "string",
            "description": "Order of results per location.",
            "default": "relevance"
          },
          "maxTrendsPerGeo": {
            "title": "Max trends per location",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Each trend is one result.",
            "default": 50
          },
          "includeTrendNews": {
            "title": "Add news and images",
            "type": "boolean",
            "description": "News articles and an image for the top ~10 trends of each location (Google's own selection).",
            "default": true
          },
          "onlyNewSinceLastRun": {
            "title": "Only new trends since my last run (monitoring)",
            "type": "boolean",
            "description": "Skip trends this monitor already returned. Pair with a daily or hourly Schedule to get alerts about new trends only.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Keep separate memories for different monitors (e.g. <code>us-sports</code>). Defaults to <code>default</code>."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Queries processed in parallel, each on its own IP session.",
            "default": 10
          },
          "maxRequestRetries": {
            "title": "Max retries per query",
            "minimum": 0,
            "maximum": 15,
            "type": "integer",
            "description": "Retries on a fresh IP after a rate limit or block.",
            "default": 7
          },
          "viewedFrom": {
            "title": "Proxy country",
            "type": "string",
            "description": "Optional 2-letter country code. Requests then go through residential IPs in that country (slower). Leave empty for the fastest default."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Default Apify datacenter proxy works well and is included in the price.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}