{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Related Queries Scraper - Interest by City, DMA",
    "description": "Google Trends data without a browser: interest over time, by region and city, related and rising queries, plus daily trending searches for 125 countries. Compare more than 5 keywords on one scale, with custom time ranges and categories. Runs via API and names the reason when a result is empty.",
    "version": "0.1",
    "x-build-id": "hrBK5Qafs4VhMVqLZ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/snow_leo_data~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-snow_leo_data-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/snow_leo_data~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-snow_leo_data-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/snow_leo_data~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-snow_leo_data-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": {
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Keywords to look up. A Google Trends topic id such as /m/05p0rrx works too and is treated as an entity rather than a string. Leave empty only when you ask for trending_now alone.",
            "items": {
              "type": "string"
            }
          },
          "dataTypes": {
            "title": "Data to collect",
            "type": "array",
            "description": "Which Google Trends surfaces to pull. Every choice becomes rows in the same table, told apart by the result_type column.",
            "items": {
              "type": "string",
              "enum": [
                "interest_over_time",
                "interest_by_region",
                "related_queries",
                "related_topics",
                "keyword_comparison",
                "trending_now"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region / city / DMA",
                "Related queries (top and rising)",
                "Related topics (see README: Google returns these empty)",
                "Compare all terms on one scale (over the 5-term limit)",
                "Trending now (search volume, growth, breakdown terms)"
              ]
            }
          },
          "geo": {
            "title": "Geo",
            "type": "string",
            "description": "Country code such as US, or a sub-region such as US-CA or GB-ENG. Empty means worldwide. Google answers HTTP 400 to a code it does not know, so an unknown code is refused here before any request is made.",
            "default": "US"
          },
          "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 for interest, region and related data. Resolution follows the period: 1 hour gives minutes, 7 days gives hours, 12 months gives weeks, all gives months back to 2004.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Overrides Time range. Two dates separated by a space: 2024-01-01 2024-06-30. Anything else is refused before the run starts, because Google answers HTTP 400 to it."
          },
          "category": {
            "title": "Category id",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category id, 0 means all categories. Ids come from the same picker Google uses, for example 7 is Finance and 71 is Food & Drink.",
            "default": 0
          },
          "searchType": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "shopping",
              "youtube"
            ],
            "type": "string",
            "description": "Which Google surface the interest is measured on.",
            "default": "web"
          },
          "regionResolution": {
            "title": "Region resolution",
            "enum": [
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Granularity of interest_by_region. REGION gives states or provinces, CITY gives cities with coordinates, DMA gives the 210 US TV markets.",
            "default": "REGION"
          },
          "trendingGeos": {
            "title": "Trending now: countries",
            "type": "array",
            "description": "Country codes for trending_now, for example US, GB, DE. Sub-regions such as US-CA work as well. Measured 2026-09-16: 125 of 208 ISO codes return trends.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending now: window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "How far back trending searches are taken. Measured for the US on 2026-09-16: 49 trends in 4 hours, 328 in 24 hours, 684 in 48 hours, 2860 in 7 days.",
            "default": "24"
          },
          "trendingMinVolume": {
            "title": "Trending now: minimum search volume",
            "minimum": 0,
            "type": "integer",
            "description": "Keep only trends with at least this many searches. 0 keeps everything. A trend without a volume is kept: missing data is not a mismatch.",
            "default": 0
          },
          "trendingCategories": {
            "title": "Trending now: categories",
            "type": "array",
            "description": "Keep only these trend categories, by id: 1 Autos, 2 Beauty, 3 Business, 4 Entertainment, 5 Food, 6 Games, 7 Health, 8 Hobbies, 9 Jobs, 10 Law, 11 Other, 13 Pets, 14 Politics, 15 Science, 16 Shopping, 17 Sports, 18 Technology, 19 Travel, 20 Climate. Empty keeps all."
          },
          "includeTrendNews": {
            "title": "Trending now: add news headlines",
            "type": "boolean",
            "description": "Adds news titles, links and sources from the Google Trends RSS feed. The feed carries 10 trends per country, so headlines land only on those; the rest keep their numeric article ids.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many rows are DELIVERED to the dataset, not after this many are collected. 0 means no limit.",
            "default": 0
          },
          "onlyNew": {
            "title": "Only new or changed rows",
            "type": "boolean",
            "description": "Remembers delivered rows between runs in a named key-value store and skips the unchanged ones, so a schedule does not pay for the same data twice.",
            "default": false
          },
          "emitUnchanged": {
            "title": "Also emit unchanged rows",
            "type": "boolean",
            "description": "Only matters with Only new: delivers unchanged rows too, marked UNCHANGED in change_type.",
            "default": false
          },
          "compactOutput": {
            "title": "Compact output",
            "type": "boolean",
            "description": "Keeps only the columns the data type exists for, dropping run metadata. Useful for AI agents and for spreadsheets.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Exclude empty fields",
            "type": "boolean",
            "description": "Drops null and empty columns from each row instead of writing them out.",
            "default": false
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface language for Google Trends, for example en-US or de-DE. It changes region names and the wording of formatted values, not the data itself.",
            "default": "en-US"
          },
          "requestPauseSecs": {
            "title": "Pause between requests, seconds",
            "type": "string",
            "description": "Measured on 2026-09-16: 34 requests back to back from Apify raised no rate limit, but several hundred within minutes did, and only waiting cleared it (a fresh cookie did not). The default pause keeps a run well inside that.",
            "default": "0.35"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}