{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends API: Interest by Region, Related, Trending Now",
    "description": "Google Trends scraper and API, no browser: interest over time, interest by region (country, state, city, metro), related queries with top and rising queries, and Trending Now with search volumes. Residential IPs matched to your country, JSON or CSV. Trial: 0.00003 USD per keyword until 31 Dec 2026.",
    "version": "1.0",
    "x-build-id": "HFw33jOSOtrrJiWGt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cozybit~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cozybit-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/cozybit~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-cozybit-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/cozybit~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-cozybit-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": [
          "reports"
        ],
        "properties": {
          "reports": {
            "title": "Reports to collect",
            "type": "array",
            "description": "Choose one or more of: interest_over_time, interest_by_region, related_queries, related_topics (experimental, usually empty) and trending_now. Interest values are relative 0-100, not search counts. Free Apify plans are limited to 15 Explore reports and 50 trending rows per run; any paid Apify plan removes these limits.",
            "items": {
              "type": "string",
              "enum": [
                "interest_over_time",
                "interest_by_region",
                "related_queries",
                "related_topics",
                "trending_now"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related queries",
                "Related topics (experimental: Google often returns no data to automated sessions)",
                "Trending Now"
              ]
            },
            "default": [
              "interest_over_time",
              "interest_by_region",
              "related_queries"
            ]
          },
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "Enter 1-200 search terms, for example coffee or iphone 17. Each keyword and report is one record. Extra spaces, empty entries and duplicates are removed. Not needed if you only select Trending Now.",
            "items": {
              "type": "string"
            },
            "default": [
              "coffee"
            ]
          },
          "compare": {
            "title": "Compare keywords",
            "type": "boolean",
            "description": "Compare 2-5 keywords on one shared 0-100 scale. With this off, each keyword gets its own scale. Comparisons still return a separate record for each keyword and report.",
            "default": false
          },
          "geo": {
            "title": "Explore location",
            "pattern": "^(?:[A-Z]{2}(?:-[A-Z0-9]{1,3}(?:-\\d{3})?)?)?$",
            "type": "string",
            "description": "Leave empty for worldwide, or enter an uppercase country (US, DE), region (US-CA) or US DMA metro code (US-CA-807). This location applies to Explore reports, not Trending Now.",
            "default": ""
          },
          "timeframe": {
            "title": "Explore 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": "Time range for Explore reports: now 1-H (past hour), now 4-H (past 4 hours), now 1-d (past day), now 7-d (past 7 days), today 1-m (past month), today 3-m (past 3 months), today 12-m (past 12 months), today 5-y (past 5 years) or all (since 2004). Google chooses the time interval of the returned values.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom Explore dates",
            "type": "string",
            "description": "Optional UTC dates in YYYY-MM-DD YYYY-MM-DD format, for example 2025-01-01 2025-12-31. Overrides the selected Explore time range."
          },
          "category": {
            "title": "Explore category ID",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends Explore category number. Use 0 for all categories. These IDs are different from Trending Now categories.",
            "default": 0
          },
          "property": {
            "title": "Search type",
            "enum": [
              "",
              "news",
              "images",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search service to measure for Explore reports: empty for web search, news, images, youtube or froogle (Google Shopping).",
            "default": ""
          },
          "regionResolution": {
            "title": "Regional detail",
            "enum": [
              "auto",
              "CITY"
            ],
            "type": "string",
            "description": "auto lets Google choose countries, regions, cities or DMAs; CITY requests cities. Cities require a country or region in Explore location; worldwide maps show countries. City records have no geographic code, so geo_code is null.",
            "default": "auto"
          },
          "trendingGeo": {
            "title": "Trending Now country",
            "pattern": "^[A-Z]{2}$",
            "type": "string",
            "description": "Two-letter uppercase country code for Trending Now, for example US or GB.",
            "default": "US"
          },
          "trendingHours": {
            "title": "Trending Now time range",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "How many hours back to look for trending searches: 4, 24, 48 or 168 (7 days). Results may include searches that are no longer active.",
            "default": "24"
          },
          "trendingCategory": {
            "title": "Trending Now category",
            "enum": [
              "",
              "1",
              "2",
              "3",
              "20",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "13",
              "14",
              "15",
              "16",
              "17",
              "18",
              "19"
            ],
            "type": "string",
            "description": "Empty for all categories, or a Google Trending Now category number, for example 4 (Entertainment), 17 (Sports) or 18 (Technology). Ranking follows Google's order after the category filter.",
            "default": ""
          },
          "trendingMaxItems": {
            "title": "Maximum trending searches",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum trending rows to return (1-1000). Google usually has about 500 available, sometimes fewer. Free Apify plans are limited to 50 trending rows and 15 Explore reports per run; any paid Apify plan removes these limits.",
            "default": 50
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Residential proxies are recommended to avoid Google's per-IP limits. The Apify Proxy country is set automatically from the report location (US for worldwide Explore). Turn Apify Proxy off for a direct local test.",
            "default": {
              "useApifyProxy": true,
              "apifyProxyGroups": [
                "RESIDENTIAL"
              ]
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}