{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper – Interest Over Time & Related Queries",
    "description": "Google Trends scraper without an API key: interest over time, interest by region (country, state, city, metro), related queries and topics (top and rising) and Trending now searches with volume. Compare up to 5 terms, any country, time range or category. Built-in 429 handling.",
    "version": "1.0",
    "x-build-id": "itnZyvqQupjplbz5t"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/openharvest~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-openharvest-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/openharvest~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-openharvest-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/openharvest~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-openharvest-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 in Google Trends. Up to 5 terms are compared on the same 0-100 scale (like typing them into Trends side by side); longer lists are processed in groups of 5. Leave empty to get only Trending now searches.",
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Location (geo)",
            "type": "string",
            "description": "Country or region code: <code>US</code>, <code>GB</code>, <code>DE</code>, a sub-region such as <code>US-CA</code>, a US metro such as <code>US-NY-501</code>, or leave empty for <b>worldwide</b>.",
            "default": "US"
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "past-hour",
              "past-4-hours",
              "past-day",
              "past-7-days",
              "past-30-days",
              "past-90-days",
              "past-12-months",
              "past-5-years",
              "all-time",
              "custom"
            ],
            "type": "string",
            "description": "Period to analyse. Shorter ranges return finer data points: past hour = 1-minute points, past day = 8-minute points, past 7 days = hourly, up to 90 days = daily, 12 months / 5 years = weekly, all time (since 2004) = monthly. Choose <code>custom</code> to set start and end dates.",
            "default": "past-12-months"
          },
          "startDate": {
            "title": "Custom start date",
            "type": "string",
            "description": "Only used when Time range = custom. Format YYYY-MM-DD, not earlier than 2004-01-01."
          },
          "endDate": {
            "title": "Custom end date",
            "type": "string",
            "description": "Only used when Time range = custom. Format YYYY-MM-DD. Defaults to today."
          },
          "outputs": {
            "title": "Data to collect",
            "type": "array",
            "description": "Which Google Trends reports to return for every search term. Each report for each term is one billable result.",
            "items": {
              "type": "string",
              "enum": [
                "interestOverTime",
                "interestByRegion",
                "relatedQueries",
                "relatedTopics"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related queries (top & rising)",
                "Related topics (top & rising)"
              ]
            },
            "default": [
              "interestOverTime",
              "interestByRegion",
              "relatedQueries"
            ]
          },
          "compareTerms": {
            "title": "Compare terms with each other",
            "type": "boolean",
            "description": "On (default): terms are compared in groups of up to 5, so values are relative to each other (100 = the most popular term's peak). Off: every term is looked up on its own and gets its own 0-100 scale.",
            "default": true
          },
          "trendingNow": {
            "title": "Include Trending now searches",
            "type": "boolean",
            "description": "Also return the current Trending now list (what people are searching for right now) with search volume, growth %, start time, categories, related searches and news articles. Each trending search is one billable result.",
            "default": false
          },
          "trendingGeo": {
            "title": "Trending now country",
            "type": "string",
            "description": "2-letter country code for Trending now, e.g. <code>US</code>, <code>GB</code>, <code>IN</code>, <code>DE</code>. Leave empty to use the Location above (or US when that is worldwide)."
          },
          "trendingHours": {
            "title": "Trending now time window",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Show searches that started trending in the past 4 hours, 24 hours, 48 hours or 7 days.",
            "default": "24"
          },
          "trendingActiveOnly": {
            "title": "Only active trends",
            "type": "boolean",
            "description": "Skip trends that have already ended.",
            "default": false
          },
          "maxTrendingItems": {
            "title": "Max trending searches",
            "minimum": 0,
            "type": "integer",
            "description": "Maximum number of Trending now searches to return (Google lists up to ~500 per country). 0 = all. You pay per trending search, so this also caps your cost.",
            "default": 25
          },
          "property": {
            "title": "Search type",
            "enum": [
              "web",
              "news",
              "images",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search property to analyse - the same as the 'Web search' dropdown in Google Trends.",
            "default": "web"
          },
          "category": {
            "title": "Category",
            "enum": [
              "0",
              "3",
              "47",
              "44",
              "22",
              "12",
              "5",
              "7",
              "71",
              "8",
              "45",
              "65",
              "11",
              "13",
              "958",
              "19",
              "16",
              "299",
              "14",
              "66",
              "29",
              "533",
              "174",
              "18",
              "20",
              "67"
            ],
            "type": "string",
            "description": "Restrict results to a Google Trends category (helps with ambiguous terms like 'apple' or 'jaguar').",
            "default": "0"
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Level of detail for Interest by region. Auto = countries for worldwide, sub-regions (states) for a country. City and Metro (DMA, US only) are also available.",
            "default": "auto"
          },
          "includeLowSearchVolumeRegions": {
            "title": "Include low search volume regions",
            "type": "boolean",
            "description": "Also list regions with little search volume (same as the checkbox in Google Trends).",
            "default": false
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "reports",
              "flat"
            ],
            "type": "string",
            "description": "<b>Reports</b> (default): one dataset item per term and report type, with summary fields (average, peak, top region, top query) and the full data in an array - best for APIs and AI agents. <b>Flat rows</b>: one row per data point (date, region or query) - best for Excel, Google Sheets and pivot tables. Pricing is the same: you pay per report, not per row.",
            "default": "reports"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface language for region names, topic titles and Trending now (e.g. <code>en-US</code>, <code>de</code>, <code>tr</code>).",
            "default": "en-US"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Google Trends rate-limits (HTTP 429) aggressively. Apify Proxy (default, datacenter) gives every retry a new IP, which keeps runs reliable. For very large jobs or if you still see many 429 warnings, switch to the RESIDENTIAL proxy group.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}