{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper — Interest Over Time, Related Queries & T",
    "description": "Extract Google Trends data for any keyword or topic. Get interest over time charts, related queries (rising & top), related topics, daily trending searches, and multi-keyword comparison. Supports geographic filtering (250+ countries/regions), category filtering (1,300+ categories), and historical ti",
    "version": "1.0",
    "x-build-id": "1cdLNBfaPiAGHgXcP"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/sovereigntaylor~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-sovereigntaylor-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/sovereigntaylor~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-sovereigntaylor-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/sovereigntaylor~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-sovereigntaylor-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": [
          "searchTerms"
        ],
        "properties": {
          "searchTerms": {
            "title": "Search Terms",
            "type": "array",
            "description": "List of keywords or topics to look up on Google Trends. You can compare up to 5 terms at once. Examples: [\"artificial intelligence\", \"machine learning\", \"deep learning\"]",
            "items": {
              "type": "string"
            },
            "default": [
              "web scraping"
            ]
          },
          "geo": {
            "title": "Geographic Region",
            "type": "string",
            "description": "Two-letter country code (ISO 3166-1 alpha-2) for geographic filtering. Use 'US' for United States, 'GB' for United Kingdom, 'DE' for Germany, etc. Leave empty for worldwide data.",
            "default": "US"
          },
          "timeRange": {
            "title": "Time Range",
            "enum": [
              "past_hour",
              "past_day",
              "past_week",
              "past_month",
              "past_year",
              "past_5_years"
            ],
            "type": "string",
            "description": "Time period for trend data. Determines the granularity of interest-over-time data points.",
            "default": "past_year"
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "maximum": 1500,
            "type": "integer",
            "description": "Google Trends category ID to narrow results. 0 = All categories. Common: 3 (Arts & Entertainment), 5 (Autos & Vehicles), 7 (Finance), 12 (Business), 13 (Computers & Electronics), 16 (Games), 18 (Health), 20 (Internet & Telecom), 22 (News), 29 (Science), 31 (Shopping), 34 (Sports), 44 (Food & Drink), 47 (Real Estate), 71 (Jobs & Education), 174 (Software), 184 (Programming).",
            "default": 0
          },
          "maxResults": {
            "title": "Max Results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of keywords to process from the searchTerms list. Useful to limit costs on large keyword lists.",
            "default": 10
          },
          "includeRelatedQueries": {
            "title": "Include Related Queries",
            "type": "boolean",
            "description": "When enabled, extracts related search queries for each keyword — both 'Top' queries (highest search volume) and 'Rising' queries (fastest growing). Essential for SEO keyword research and content ideation.",
            "default": true
          },
          "includeRelatedTopics": {
            "title": "Include Related Topics",
            "type": "boolean",
            "description": "When enabled, extracts related topics for each keyword — both 'Top' topics (most popular) and 'Rising' topics (trending). Useful for discovering broader content themes and market trends.",
            "default": true
          },
          "includeTrendingSearches": {
            "title": "Include Daily Trending Searches",
            "type": "boolean",
            "description": "When enabled, also scrapes the daily trending searches (real-time and daily) for the specified geographic region. Shows what's trending right now regardless of your keyword list.",
            "default": false
          },
          "includeInterestByRegion": {
            "title": "Include Interest by Region",
            "type": "boolean",
            "description": "When enabled, extracts interest breakdown by sub-region (states for US, countries for worldwide). Shows where each keyword is most popular geographically.",
            "default": false
          },
          "outputFormat": {
            "title": "Output Format",
            "enum": [
              "summary",
              "flat"
            ],
            "type": "string",
            "description": "How to structure the output data. 'summary' gives one record per keyword with all data nested. 'flat' gives one record per data point (better for spreadsheets/CSV export).",
            "default": "summary"
          },
          "proxyConfiguration": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Apify proxy configuration. Google Trends may block datacenter IPs — residential proxies are strongly recommended for reliable results.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max Concurrency",
            "minimum": 1,
            "maximum": 5,
            "type": "integer",
            "description": "Maximum number of concurrent requests. Keep low (1-3) to avoid Google rate limiting.",
            "default": 2
          },
          "customTimeRange": {
            "title": "Custom Time Range",
            "type": "string",
            "description": "Optional custom time range in Google Trends format. Overrides the timeRange dropdown if specified. Format: 'YYYY-MM-DD YYYY-MM-DD' (e.g., '2024-01-01 2024-12-31'). Leave empty to use the timeRange dropdown."
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}