{
  "openapi": "3.0.1",
  "info": {
    "title": "Scrape Google Trends: Related Queries, Interest by City, DMA",
    "description": "Get Google Trends interest by city, DMA and region for any keyword, no browser needed. See Google Trends rising queries, breakout queries and related queries, and compare keywords on one scale, even more than 5 at a time. Daily trending searches for 125 countries.",
    "version": "0.1",
    "x-build-id": "OX2I4z1sH8ARHEIRr"
  },
  "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, one per line. A Google Trends topic id such as /m/05p0rrx works too and is treated as an entity rather than a string. You can also paste a Google Trends explore link: its keywords, country, period, category and search surface are read from it. 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. Pick from the list or type it in words: interest over time, related queries, rising queries, by region, by city, trending searches, compare keywords. A word we cannot read ends the run with a clear message and no charge.",
            "items": {
              "type": "string",
              "enumTitles": [
                "Interest over time (each term on its own 0-100 scale)",
                "Interest by region / city / DMA",
                "Related queries (top and rising)",
                "Related topics (Google returns none at the moment, so the run ends empty with a named reason)",
                "Compare all terms on one scale (over the 5-term limit, one score per term)",
                "Trending now (search volume, growth, breakdown terms)"
              ],
              "enumSuggestedValues": [
                "interest_over_time",
                "interest_by_region",
                "related_queries",
                "related_topics",
                "keyword_comparison",
                "trending_now"
              ]
            }
          },
          "geo": {
            "title": "Geo",
            "type": "string",
            "description": "Country code such as US, a country name such as Germany or United Kingdom, or a sub-region such as US-CA, DE-BY or GB-ENG. UK is read as GB. Empty or Worldwide means worldwide. A value we cannot read ends the run with a clear message before any request, and nothing is charged.",
            "default": "US"
          },
          "timeRange": {
            "title": "Time range",
            "type": "string",
            "description": "Period for interest, region and related data. Pick from the list or type it in words: past 12 months, last 7 days, past 5 years, today 5-y, all time. Two dates such as 2024-01-01 2024-12-31 work here too. Resolution follows the period: 1 hour gives minutes, 7 days gives hours, 12 months gives weeks, all gives months back to 2004. A period we cannot read ends the run with a clear message and no charge, it is never replaced by a default.",
            "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 (a dash, slash or the word to between them works as well). Impossible dates end the run with a clear message and no charge."
          },
          "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",
            "type": "string",
            "description": "Which Google surface the interest is measured on. Pick from the list or type it: web, images, news, Google Shopping, YouTube.",
            "default": "web"
          },
          "regionResolution": {
            "title": "Region resolution",
            "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. Type it in any case or in words: cities, states, metro areas.",
            "default": "REGION"
          },
          "trendingGeos": {
            "title": "Trending now: countries",
            "type": "array",
            "description": "Country codes or names for trending_now, for example US, GB, Germany. 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",
            "type": "string",
            "description": "How far back trending searches are taken: 4, 24, 48 or 168 hours (type 24 hours, past 7 days or week as well). Measured for the US on 2026-11-18: 127 trends in 4 hours, 507 in 24 hours, 892 in 48 hours, 3237 in 7 days. If Google's page does not answer, only its 10-trend public feed is available and the window is ignored; the run status says so.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}