{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper — Interest, Regions & Related Queries",
    "description": "Returns Google Trends data for your search terms: a 0–100 timeline, interest per country, state, US metro or city, and top and rising related queries, with up to 5 terms on one scale. Flat rows for Sheets, BI or AI agents. No login, $3.00 per 1,000 keyword reports.",
    "version": "0.0",
    "x-build-id": "wQe5Jj4v7kLtuS3Wz"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/genial_candlestand~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-genial_candlestand-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/genial_candlestand~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-genial_candlestand-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/genial_candlestand~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-genial_candlestand-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": {
          "queries": {
            "title": "Search terms",
            "type": "array",
            "description": "What to look up on Google Trends, one term per line, e.g. `bitcoin` or `iphone 17`. Each term gets its own report. Max 100 characters per term and no commas — to compare terms, put each on its own line and tick Compare below. Fill this, Google Trends links, or both.",
            "items": {
              "type": "string"
            }
          },
          "compareQueries": {
            "title": "Compare the terms on one scale",
            "type": "boolean",
            "description": "Off: each term is looked up alone and its own peak is 100. On: 2–5 terms are looked up together, as on the Google Trends Compare page, so they share one 0–100 scale and you see which is searched more. More than 5 terms with this on stops the run before any request.",
            "default": false
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Where people searched. Leave empty for worldwide. Pick from the list, or type any other country as a two-letter code (`CH`) or English name (`Switzerland`)."
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "past12Months",
              "past5Years",
              "past90Days",
              "past30Days",
              "past7Days",
              "past1Day",
              "past4Hours",
              "past1Hour",
              "since2004",
              "custom"
            ],
            "type": "string",
            "description": "Period of the trend. It also sets the step of the time points: every minute for the past hour or 4 hours, every 8 minutes for the past day, hourly for 7 days, daily for 30 or 90 days, weekly for 12 months or 5 years, monthly since 2004. \"Custom dates\" uses the start and end dates under More filters.",
            "default": "past12Months"
          },
          "dataTypes": {
            "title": "Data to extract",
            "type": "array",
            "description": "Sections returned for every search: interest over time (one row per time point), interest by region (one row per region with data) and related queries (one row per top or rising query). You pay once per search term with data (a keyword report), whatever sections it includes; untick sections you don't need for a smaller, faster result. Empty = all three.",
            "items": {
              "type": "string",
              "enum": [
                "interestOverTime",
                "interestByRegion",
                "relatedQueries"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related queries (top & rising)"
              ]
            },
            "default": [
              "interestOverTime",
              "interestByRegion",
              "relatedQueries"
            ]
          },
          "region": {
            "title": "State or region (needs Country)",
            "type": "string",
            "description": "Narrow Country to one state, province or region, by name (`California`, `Bavaria`) or code (`CA` or `US-CA`). Leave empty for the whole country. Some countries have no regions on Google Trends (e.g. Ireland, Singapore); a region there stops the run with a message."
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Keep only searches from one Google Trends category, e.g. `Food & Drink` for `apple` the fruit. Pick from the list or type any of Google's 1,100+ categories by exact name (`Programming`) or ID (the `cat=` number in a Trends link, e.g. `31`). Empty = all categories."
          },
          "property": {
            "title": "Google search type",
            "enum": [
              "web",
              "youtube",
              "images",
              "news",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search to measure: web search (the Google Trends default), YouTube, image, news or Google Shopping search. Non-web data starts in 2008; earlier time points come back without data.",
            "default": "web"
          },
          "regionResolution": {
            "title": "Interest by region: level",
            "enum": [
              "auto",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Automatic: as on Google Trends — countries for worldwide, states/regions for a country, metro areas for a US state, cities elsewhere. Cities: any location, with latitude/longitude, but Google often has city data only for popular terms (otherwise no region rows and a warning). US metro areas (DMA): Country = United States only.",
            "default": "auto"
          },
          "startDate": {
            "title": "Custom start date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "First day of the period (`YYYY-MM-DD`, from 2004-01-01). Used only when Time range is \"Custom dates\", and then required with the end date."
          },
          "endDate": {
            "title": "Custom end date",
            "pattern": "^$|^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Last day of the period (`YYYY-MM-DD`). Used only when Time range is \"Custom dates\". Must not be before the start date; a future date is cut to today."
          },
          "startUrls": {
            "title": "Google Trends links",
            "type": "array",
            "description": "Explore page links copied from your browser, e.g. `https://trends.google.com/trends/explore?q=bitcoin&geo=US`. Each link is one search with its own terms (up to 5, compared), location, time, category and search type, so the filters above don't apply to it. Data to extract, region level and Max rows do.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many rows in total. Rows are free: you pay per keyword report (a search term with data), and a report cut short by this limit is still charged once. Leave empty for no limit. One search term with all three sections gives about 100–400 rows."
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Proxy for requests to Google Trends. The default Apify datacenter proxy works well; switch to the RESIDENTIAL group only if runs report blocking. Without a proxy, Google shows a captcha to your IP after a few dozen requests.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}