{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper & API: Interest, Regions & Queries",
    "description": "Google Trends scraper and unofficial Google Trends API, no API key: interest over time, interest by country/region/city, related queries & topics (top, rising, Breakout), compare up to 5 terms. Any geo, time range, category, Web/Images/News/YouTube/Shopping. JSON/CSV/Excel.",
    "version": "1.0",
    "x-build-id": "5I5GLEVZuwjecIaFy"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/capable_coach~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-capable_coach-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/capable_coach~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-capable_coach-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/capable_coach~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-capable_coach-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",
            "maxItems": 500,
            "type": "array",
            "description": "Keywords or topics to analyse, one per line (e.g. <code>bim</code>, <code>revit</code>). A Google Knowledge Graph topic ID (<code>/m/…</code>) also works. Each term = one report.",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            }
          },
          "startUrls": {
            "title": "Google Trends URLs (optional)",
            "type": "array",
            "description": "Paste Google Trends explore URLs (e.g. <code>https://trends.google.com/trends/explore?q=bim,revit&geo=FR&date=today%2012-m</code>). The q, geo, date, cat, gprop and hl parameters of each URL are used; several terms in one URL are also compared together.",
            "items": {
              "type": "string",
              "pattern": "^https?://trends\\.google\\.[a-z.]+/.*"
            }
          },
          "geo": {
            "title": "Location (geo)",
            "type": "string",
            "description": "Country or sub-region. Pick from the list or type any Google Trends geo code: ISO country (<code>FR</code>), region (<code>US-CA</code>, <code>FR-IDF</code>) or US metro (<code>US-NY-501</code>). Leave empty for Worldwide.",
            "default": ""
          },
          "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",
              "custom"
            ],
            "type": "string",
            "description": "Preset period. Choose <b>Custom</b> to use the start/end dates below. Shorter ranges give finer granularity (minutes for 1-4 hours, hourly for 1-7 days, daily up to ~9 months, weekly up to 5 years, monthly for 2004-present).",
            "default": "today 12-m"
          },
          "startDate": {
            "title": "Custom start date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Used only when Time range = Custom. Format YYYY-MM-DD, not earlier than 2004-01-01."
          },
          "endDate": {
            "title": "Custom end date",
            "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$",
            "type": "string",
            "description": "Used only when Time range = Custom. Defaults to today."
          },
          "customTimeRange": {
            "title": "Raw time range (advanced)",
            "type": "string",
            "description": "Optional raw Google Trends <code>date</code> value that overrides the fields above, e.g. <code>2024-01-01 2024-06-30</code>, hourly <code>2026-10-20T08 2026-10-21T20</code>, or <code>today 2-y</code>."
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category ID to disambiguate a term (0 = all categories). Common IDs: 3 Arts & Entertainment, 47 Autos & Vehicles, 44 Beauty & Fitness, 22 Books & Literature, 12 Business & Industrial, 5 Computers & Electronics, 7 Finance, 71 Food & Drink, 8 Games, 45 Health, 65 Hobbies & Leisure, 11 Home & Garden, 13 Internet & Telecom, 958 Jobs & Education, 19 Law & Government, 16 News, 299 Online Communities, 14 People & Society, 66 Pets & Animals, 29 Real Estate, 533 Reference, 174 Science, 18 Shopping, 20 Sports, 67 Travel. Full list: the <code>cat=</code> parameter in a Google Trends URL.",
            "default": 0
          },
          "property": {
            "title": "Google property",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search to measure: Web, Image, News, YouTube or Google Shopping (froogle).",
            "default": "web"
          },
          "language": {
            "title": "Language (hl)",
            "type": "string",
            "description": "Interface language used by Google for region names, formatted dates and topic titles (e.g. <code>en-US</code>, <code>fr</code>, <code>de</code>). Does not filter the searches themselves.",
            "default": "en-US"
          },
          "timezoneOffsetMinutes": {
            "title": "Timezone offset (minutes)",
            "minimum": -840,
            "maximum": 840,
            "type": "integer",
            "description": "Google's <code>tz</code> parameter: minutes <i>behind</i> UTC (0 = UTC, -60 = UTC+1 Paris winter, 300 = New York winter). Affects hourly/daily bucket boundaries. Output dates are always ISO UTC.",
            "default": 0
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Time series of relative interest (0-100) plus computed average, peak and latest value.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Relative interest by country / subregion / city / metro.",
            "default": true
          },
          "includeRelatedQueries": {
            "title": "Related queries (top & rising)",
            "type": "boolean",
            "description": "Top and rising related search queries, including Breakout terms.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Related topics (top & rising)",
            "type": "boolean",
            "description": "Top and rising related Knowledge Graph topics. Note: since 2026 Google returns an empty topics list to automated sessions (flagged USER_TYPE_SCRAPER), so this is best effort; an empty topics list is never charged on its own.",
            "default": true
          },
          "filterUnrelatedRisingQueries": {
            "title": "Filter unrelated rising queries",
            "type": "boolean",
            "description": "Google sometimes mixes unrelated 'rising' queries into automated responses. When enabled, rising queries sharing no word with the search term or its top queries are moved to <code>relatedQueriesRisingFiltered</code> (kept for review, not deleted).",
            "default": false
          },
          "regionResolution": {
            "title": "Region resolution",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Granularity for Interest by region. <b>Auto</b> = what Google shows on the website (countries for Worldwide, subregions for a country). DMA (metro) works for the US. CITY: Google currently withholds city values from automated traffic; if it comes back empty the Actor automatically falls back to subregions (or US metros) and says so in <code>dataQualityNotes</code>.",
            "default": "auto"
          },
          "includeLowSearchVolumeRegions": {
            "title": "Include low-search-volume regions",
            "type": "boolean",
            "description": "Also return regions where Google has too little data (value 0).",
            "default": false
          },
          "maxRegions": {
            "title": "Max regions per report",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap on Interest by region rows per report (sorted by interest, highest first).",
            "default": 250
          },
          "compareTerms": {
            "title": "Compare terms (up to 5 per group)",
            "type": "boolean",
            "description": "Also build comparison reports where terms are measured on the same 0-100 scale, like typing <code>bim, revit</code> in Google Trends. Terms are grouped in chunks of 5. Each comparison group is one extra report.",
            "default": false
          },
          "outputFormat": {
            "title": "Dataset format",
            "enum": [
              "perTerm",
              "flat"
            ],
            "type": "string",
            "description": "<b>One item per term</b>: a structured report per term (nested arrays) — best for JSON/API. <b>Flat rows</b>: one row per data point with a <code>recordType</code> column — best for Excel, CSV, Google Sheets and BI tools. Structured reports are always also saved to the key-value store record <code>OUTPUT</code>.",
            "default": "perTerm"
          },
          "maxConcurrency": {
            "title": "Parallel reports",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many reports to fetch in parallel (each on its own proxy session). Higher is faster but triggers more Google rate limits.",
            "default": 3
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "On HTTP 429 or a block, the Actor rotates to a fresh IP + cookie and retries with exponential backoff (1s, 2s, 4s… up to 30s).",
            "default": 8
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Google Trends aggressively rate-limits datacenter IPs. RESIDENTIAL proxies are strongly recommended (default).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}