{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends API & Scraper: Regions, Related Queries & Topics",
    "description": "Returns real related topics where other Google Trends scrapers return empty lists. Trend line, regions (states, metros, cities), related queries and topics for thousands of keywords in one run. Buy all four or just one, from $0.50 per 1,000. Pay only for data delivered.",
    "version": "1.0",
    "x-build-id": "iMR9YfkleLANobk0c"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/clean-fetch~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-clean-fetch-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/clean-fetch~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-clean-fetch-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/clean-fetch~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-clean-fetch-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": {
          "keywords": {
            "title": "Keywords",
            "type": "array",
            "description": "One keyword per line. Each keyword gets its own result on its own 0–100 scale. Up to 5,000 keyword × location × time range lookups per run.",
            "items": {
              "type": "string"
            }
          },
          "preset": {
            "title": "What to get",
            "enum": [
              "complete",
              "trend_line",
              "market",
              "research",
              "local",
              "custom"
            ],
            "type": "string",
            "description": "Pick the data you need. Prices are per 1,000 keywords, and you pay only for the parts actually delivered: a part Google doesn't deliver, and a keyword with too little search volume (verified), are free.",
            "default": "complete"
          },
          "components": {
            "title": "Parts (for Custom)",
            "type": "array",
            "description": "Used only when \"What to get\" is Custom (ignored by every other preset). Pick one or more parts, alone or together, and pay only for those. Per 1,000 keywords: trend line $1.50, regions $0.50, related queries $0.50, related topics $1.50.",
            "items": {
              "type": "string",
              "enum": [
                "interestOverTime",
                "interestByRegion",
                "relatedQueries",
                "relatedTopics"
              ],
              "enumTitles": [
                "Interest over time",
                "Interest by region",
                "Related queries",
                "Related topics"
              ]
            }
          },
          "regionResolutions": {
            "title": "Region detail",
            "type": "array",
            "description": "Which breakdowns of interest by region to get, for Custom. Each one delivered counts as one regions part ($0.50 per 1,000). Metro areas (DMA) exist for the United States only.",
            "items": {
              "type": "string",
              "enum": [
                "REGION",
                "DMA",
                "CITY"
              ],
              "enumTitles": [
                "States / regions (countries when worldwide)",
                "Metro areas (US only)",
                "Cities"
              ]
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Country code (US, GB, IN), a region (US-CA), or leave empty for worldwide.",
            "default": "US"
          },
          "geos": {
            "title": "Several locations (optional)",
            "type": "array",
            "description": "Run every keyword in each of these locations (same codes as Location). Overrides Location.",
            "items": {
              "type": "string"
            }
          },
          "timeRange": {
            "title": "Time range",
            "enum": [
              "today 12-m",
              "now 1-H",
              "now 4-H",
              "now 1-d",
              "now 7-d",
              "today 1-m",
              "today 3-m",
              "today 5-y",
              "all"
            ],
            "type": "string",
            "description": "The period to look at. Shorter ranges give finer points (hourly or daily); longer ranges give weekly or monthly points.",
            "default": "today 12-m"
          },
          "timeRanges": {
            "title": "Several time ranges (optional)",
            "type": "array",
            "description": "Run every keyword for each of these time ranges: codes such as \"today 12-m\", \"today 5-y\", \"now 7-d\", or dates as \"YYYY-MM-DD YYYY-MM-DD\". Overrides Time range.",
            "items": {
              "type": "string"
            }
          },
          "customTimeRange": {
            "title": "Custom dates (optional)",
            "pattern": "^(\\d{4}-\\d{2}-\\d{2} \\d{4}-\\d{2}-\\d{2})?$",
            "type": "string",
            "description": "Exact dates as YYYY-MM-DD YYYY-MM-DD, from 2004-01-01 on. Overrides both time range fields."
          },
          "property": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search the interest is measured on: web, images, news, YouTube or Google Shopping.",
            "default": "web"
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category id, as in the \"cat=\" part of a Trends link. 0 = all categories. Examples: 71 Food & Drink, 7 Finance, 45 Health.",
            "default": 0
          },
          "startUrls": {
            "title": "Google Trends URLs (optional)",
            "type": "array",
            "description": "Paste trends.google.com/trends/explore links: their keywords, location, dates, category and search type are used as they are.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "perKeyword",
              "spreadsheetRows"
            ],
            "type": "string",
            "description": "One item per keyword (nested; best for JSON and APIs, no extra cost), or spreadsheet rows with one row per data point (best for CSV, Excel, Google Sheets and BI tools; adds $0.01 per 1,000 rows). Spreadsheet rows show in the Output's \"Spreadsheet rows\" tab.",
            "default": "perKeyword"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language for labels, region names and related results, e.g. en-US, de, fr, ja, pt-BR.",
            "default": "en-US"
          },
          "maxItems": {
            "title": "Max keywords to process",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many keyword × location × time range lookups. Leave empty to process all."
          },
          "maxTopicsWaitMinutes": {
            "title": "Max wait for the last related topics (minutes)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Google releases related topics at a limited pace, so keywords wait their turn while the run continues. Once everything else is fetched, the run keeps waiting up to this long for the last ones; any still withheld are saved without related topics, which are not charged. 0 = don't wait at the end.",
            "default": 15
          },
          "searchTerms": {
            "title": "Search terms (Apify Google Trends Scraper format)",
            "type": "array",
            "description": "Same as Keywords. Lets you paste an input made for Apify's Google Trends Scraper without changes.",
            "items": {
              "type": "string"
            }
          },
          "isMultiple": {
            "title": "Split terms at commas (compatibility)",
            "type": "boolean",
            "description": "As in Apify's Google Trends Scraper: split each search term at commas. Each term gets its own result; comparing terms on one scale arrives in v1.1."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}