{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends by City & Metro: Related, Trending Now",
    "description": "Google Trends down to city and metro level, without a browser: interest over time, by region, city and metro, related queries and topics (top and rising), compare up to 5 keywords, and Trending now with search volume and news. Clean JSON rows, any country, any period.",
    "version": "0.1",
    "x-build-id": "sAnzs1E6cWKv1xap8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/transparent_meteorite~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-transparent_meteorite-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/transparent_meteorite~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-transparent_meteorite-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/transparent_meteorite~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-transparent_meteorite-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": [
              "interest",
              "compare",
              "trendingNow",
              "suggest"
            ],
            "type": "string",
            "description": "interest = one row per keyword. compare = keywords charted against each other (groups of 5). trendingNow = what people search for right now. suggest = Google's topic suggestions for a keyword.",
            "default": "interest"
          },
          "searchTerms": {
            "title": "Keywords",
            "type": "array",
            "description": "Search terms or topics, for example bitcoin or best running shoes. In compare mode they are grouped 5 at a time and measured on one shared 0-100 scale.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Optional. Paste trends.google.com/trends/explore links; keywords, region, period, category and search type are read from the link.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "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": "Hourly data for the last hour or 4 hours, daily for 7 days, weekly for a year, monthly for 5 years.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range",
            "type": "string",
            "description": "Overrides the time range. 2024-01-01 2024-06-30 (start end) or 2024-01-01 (start until today)."
          },
          "geo": {
            "title": "Country or region",
            "type": "string",
            "description": "Empty = worldwide. ISO country code (US, GB, DE), a region (US-CA, GB-ENG) or a US metro (US-CA-807). In Trending now, empty = US.",
            "default": ""
          },
          "geos": {
            "title": "More countries or regions",
            "type": "array",
            "description": "Run every keyword once per extra region as well. One row per keyword and region.",
            "items": {
              "type": "string"
            }
          },
          "category": {
            "title": "Google category id",
            "minimum": 0,
            "type": "integer",
            "description": "0 = all categories. Examples: 3 Arts and Entertainment, 5 Computers and Electronics, 7 Finance, 12 Business and Industrial, 22 Books and Literature, 44 Beauty and Fitness, 47 Autos and Vehicles. Any id from the cat= parameter of a Trends link works.",
            "default": 0
          },
          "property": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search the interest is measured on.",
            "default": "web"
          },
          "includeTimeline": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "The time series (0-100). The summary (average, peak, latest, trend) is always included.",
            "default": true
          },
          "includeRegions": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Countries when worldwide, states or regions inside a country.",
            "default": true
          },
          "includeCities": {
            "title": "Interest by city",
            "type": "boolean",
            "description": "Cities with latitude and longitude. Adds one request per keyword.",
            "default": false
          },
          "includeMetros": {
            "title": "Interest by US metro",
            "type": "boolean",
            "description": "US media markets (DMA). Empty outside the US.",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "Top and rising related searches.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Top and rising related topics with Knowledge Graph ids.",
            "default": true
          },
          "trendingHours": {
            "title": "Trending window (hours)",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "4, 24, 48 or 168 (the closest is used).",
            "default": "24"
          },
          "trendingCategories": {
            "title": "Only these topics",
            "type": "array",
            "description": "Optional filter by Google's trending topics: Business and Finance, Entertainment, Health, Politics, Sports, Technology, Shopping and more. Names or ids (3, 4, 7, 14, 17, 18).",
            "items": {
              "type": "string"
            }
          },
          "activeOnly": {
            "title": "Only trends that are still active",
            "type": "boolean",
            "description": "Drop trends Google already marks as ended.",
            "default": false
          },
          "includeNewsArticles": {
            "title": "Add news articles",
            "type": "boolean",
            "description": "Attach up to 3 news articles to each trend. Slower; no extra charge.",
            "default": false
          },
          "maxArticlesPerTrend": {
            "title": "Articles per trend",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "How many news articles to attach per trend when news articles are on.",
            "default": 3
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of topic names and labels, for example en-US, de-DE, es-ES.",
            "default": "en-US"
          },
          "timezoneOffset": {
            "title": "Timezone offset (minutes)",
            "type": "integer",
            "description": "Google's tz value: minutes behind UTC (New York summer = 240, Berlin summer = -120).",
            "default": 0
          },
          "maxItems": {
            "title": "Maximum rows",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no limit. Also caps what you pay.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel keywords",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "How many keywords are fetched at the same time.",
            "default": 6
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify Proxy is used by default. If Google rate-limits a datacenter address, the keyword is retried on a fresh session and then through Apify RESIDENTIAL proxy automatically; the proxy cost 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}