{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Explorer: Interest, Regions & Related Queries",
    "description": "Google Trends data without an API key: interest over time, by region, related & rising queries/topics, Trending Now and keyword suggestions. Paste Trends URLs, flat CSV output. Errors and no-data rows are free.",
    "version": "0.1",
    "x-build-id": "gAHkiwjK3vnVlV3hr"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cleandata-labs~google-trends-explorer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cleandata-labs-google-trends-explorer",
        "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/cleandata-labs~google-trends-explorer/runs": {
      "post": {
        "operationId": "runs-sync-cleandata-labs-google-trends-explorer",
        "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/cleandata-labs~google-trends-explorer/run-sync": {
      "post": {
        "operationId": "run-sync-cleandata-labs-google-trends-explorer",
        "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 / search terms",
            "type": "array",
            "description": "Search terms to look up, e.g. [\"chatgpt\", \"gemini\"]. Each keyword is a separate query with its own 0-100 scale unless compareKeywords=true. Topic IDs such as \"/m/0dl567\" (from keywordSuggestions) also work. If you omit this field the default [\"chatgpt\",\"gemini\"] is used, so pass [] when you only want trendingNowGeos or startUrls.",
            "default": [
              "chatgpt",
              "gemini"
            ],
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Optional. Google Trends explore links, e.g. [{\"url\": \"https://trends.google.com/trends/explore?q=bitcoin&geo=US\"}]. Keywords, country, time range, category and property are read from each URL. Set keywords to [] to run only these URLs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "keywordSuggestions": {
            "title": "Keyword / topic suggestions",
            "type": "boolean",
            "description": "true = also return Google Trends autocomplete topics for each keyword (title, type and topic ID such as \"/m/0dl567\"). Use a returned ID as a keyword for language-independent results. Default false.",
            "default": false
          },
          "compareKeywords": {
            "title": "Compare keywords together",
            "type": "boolean",
            "description": "true = compare keywords on one shared 0-100 scale (groups of max 5, like trends.google.com). Use it for 'X vs Y' questions. false (default) = every keyword is scaled on its own, so values are not comparable between keywords.",
            "default": false
          },
          "geos": {
            "title": "Countries / regions",
            "type": "array",
            "description": "Country or region codes, e.g. [\"US\"], [\"GB\",\"DE\"] or [\"US-CA\"] for a US state. Each code is a separate query. [] = worldwide. Default [\"US\"].",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "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"
            ],
            "type": "string",
            "description": "Preset period: \"now 1-H\" past hour, \"now 4-H\" past 4 h, \"now 1-d\" past day, \"now 7-d\" past 7 days, \"today 1-m\" past 30 days, \"today 3-m\" past 90 days, \"today 12-m\" past 12 months (default), \"today 5-y\" past 5 years, \"all\" since 2004. Ignored when customTimeRange is set.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range (optional)",
            "type": "string",
            "description": "Optional exact period that overrides timeRange. Format 'YYYY-MM-DD YYYY-MM-DD', e.g. '2024-01-01 2024-12-31'."
          },
          "category": {
            "title": "Category ID",
            "type": "integer",
            "description": "Google Trends category ID to narrow ambiguous terms, e.g. 0 = all categories (default), 7 = Finance, 71 = Food & Drink, 958 = Jobs & Education. Use the number from the cat= parameter of a trends.google.com URL.",
            "default": 0
          },
          "property": {
            "title": "Search property",
            "enum": [
              "web",
              "youtube",
              "news",
              "images",
              "froogle"
            ],
            "type": "string",
            "description": "Which Google search to measure: \"web\" (default), \"youtube\", \"news\", \"images\" or \"froogle\" (Google Shopping).",
            "default": "web"
          },
          "interestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "true (default) = return the 0-100 interest timeline for each query, plus averages and a partial-data flag. One result per query.",
            "default": true
          },
          "interestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "true = also return interest per country / region / city for each query (see regionResolution). One result per query. Default false.",
            "default": false
          },
          "regionResolution": {
            "title": "Region resolution",
            "enum": [
              "",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Detail level for interestByRegion: \"COUNTRY\", \"REGION\" (state / province), \"CITY\" or \"DMA\" (US metro areas). Omit to let Google choose (countries for worldwide, regions inside one country).",
            "default": ""
          },
          "onlyRegionsWithData": {
            "title": "Only regions with data",
            "type": "boolean",
            "description": "true (default) = drop regions where Google has no data, which keeps the output short.",
            "default": true
          },
          "relatedQueries": {
            "title": "Related queries (top + rising)",
            "type": "boolean",
            "description": "true = also return related search queries, top and rising (with growth % and 'Breakout' flag). Best for keyword research. One result per query. Default false.",
            "default": false
          },
          "relatedTopics": {
            "title": "Related topics (top + rising)",
            "type": "boolean",
            "description": "true = also return related topics, top and rising, with Knowledge Graph IDs. Google returns them only for single-keyword queries. One result per query. Default false.",
            "default": false
          },
          "trendingNowGeos": {
            "title": "Trending Now countries",
            "type": "array",
            "description": "Optional country codes for today's Trending Now searches (Google's official RSS feed), e.g. [\"US\"] or [\"GB\",\"RO\"]. Each trending search is one result. Set keywords to [] if you only want trending searches.",
            "items": {
              "type": "string"
            }
          },
          "trendingNowMaxItems": {
            "title": "Max Trending Now items per country",
            "minimum": 0,
            "type": "integer",
            "description": "Max Trending Now searches per country. 0 (default) = all items in Google's feed (usually 10-20). Use a small number such as 5 to keep the output short.",
            "default": 0
          },
          "language": {
            "title": "Language (hl)",
            "type": "string",
            "description": "Interface language (hl parameter) for topic names and related queries, e.g. \"en-US\" (default), \"de\", \"ro\".",
            "default": "en-US"
          },
          "timezoneOffset": {
            "title": "Timezone offset in minutes",
            "type": "integer",
            "description": "Timezone offset in minutes, same as the tz parameter on trends.google.com, e.g. 0 = UTC (default), -120 = UTC+2. Affects hourly and daily timelines.",
            "default": 0
          },
          "delayBetweenRequestsSecs": {
            "title": "Delay between requests (s)",
            "minimum": 0,
            "maximum": 30,
            "type": "integer",
            "description": "Pause between Google requests in seconds, 0-30. Default 1. Raise it only if many requests are retried.",
            "default": 1
          },
          "maxRetries": {
            "title": "Max retries per request",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries per request on rate limits or network errors, 0-10. Default 5. Each retry uses a new session (and proxy IP).",
            "default": 5
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (s)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout per HTTP request in seconds, 5-120. Default 30.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy settings. Default {\"useApifyProxy\": true}, which is recommended: Google rate-limits datacenter IPs and every retry rotates the IP. Leave as is unless you have a reason to change it.",
            "default": {
              "useApifyProxy": true
            }
          },
          "flattenOutput": {
            "title": "Flatten output (CSV / Sheets friendly)",
            "type": "boolean",
            "description": "true = one row per date / region instead of one row with a nested array (handy for CSV and Sheets). Price is unchanged: one charge per data block. Default false, which is more compact for AI agents.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}