{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper: Interest Over Time & Related Queries",
    "description": "Google Trends scraper and API. Get interest over time, interest by region and city, top and rising related queries and topics, up to 5-keyword comparisons and Trending Now searches for any country and time range. Failed keywords are free.",
    "version": "1.0",
    "x-build-id": "CeWdoeGAbVAXiQTIe"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/mosaicked_sponge~google-trends-scraper-reliable/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-mosaicked_sponge-google-trends-scraper-reliable",
        "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/mosaicked_sponge~google-trends-scraper-reliable/runs": {
      "post": {
        "operationId": "runs-sync-mosaicked_sponge-google-trends-scraper-reliable",
        "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/mosaicked_sponge~google-trends-scraper-reliable/run-sync": {
      "post": {
        "operationId": "run-sync-mosaicked_sponge-google-trends-scraper-reliable",
        "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": "One search per line. Put up to 5 terms on one line separated by commas (e.g. \"coffee, tea, matcha\") to COMPARE them on one 0-100 scale, exactly like Compare on trends.google.com. Topic IDs like /m/07ykbs work too. You can also paste Google Trends explore URLs here.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Google Trends URLs (optional)",
            "type": "array",
            "description": "Paste trends.google.com/trends/explore links. Their own q, geo, date, cat and gprop settings are used.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Google Trends location code: US, GB, DE, US-CA (state), US-NY-501 (metro). Leave empty for Worldwide.",
            "default": ""
          },
          "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": "Same presets as trends.google.com.",
            "default": "today 12-m"
          },
          "customTimeRange": {
            "title": "Custom time range (optional)",
            "type": "string",
            "description": "Overrides Time range. Format \"YYYY-MM-DD YYYY-MM-DD\" (e.g. \"2020-01-01 2024-12-31\"), or hourly \"YYYY-MM-DDTHH YYYY-MM-DDTHH\" for up to 7 days."
          },
          "category": {
            "title": "Category",
            "minimum": 0,
            "type": "integer",
            "description": "Google Trends category id. 0 = All categories. Examples: 71 Food & Drink, 5 Computers & Electronics, 7 Finance, 18 Shopping, 3 Arts & Entertainment, 174 Sports, 47 Autos, 45 Health.",
            "default": 0
          },
          "searchProperty": {
            "title": "Search type",
            "enum": [
              "web",
              "news",
              "images",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search to measure.",
            "default": "web"
          },
          "includeInterestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "Full timeline (0-100) plus average, peak, latest and change %. Summary numbers are always included.",
            "default": true
          },
          "includeInterestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Countries (worldwide), states/regions (in a country) or cities, see Region resolution.",
            "default": true
          },
          "regionResolution": {
            "title": "Region resolution",
            "enum": [
              "auto",
              "COUNTRY",
              "REGION",
              "CITY",
              "DMA"
            ],
            "type": "string",
            "description": "Level of detail for Interest by region.",
            "default": "auto"
          },
          "includeLowVolumeRegions": {
            "title": "Include low-volume regions",
            "type": "boolean",
            "description": "Same as the \"Include low search volume regions\" box on trends.google.com.",
            "default": false
          },
          "includeRelatedQueries": {
            "title": "Related queries (top + rising)",
            "type": "boolean",
            "description": "Top and rising (incl. Breakout) related searches.",
            "default": true
          },
          "relatedQueriesMode": {
            "title": "Related queries: spam filter",
            "enum": [
              "relevant",
              "raw"
            ],
            "type": "string",
            "description": "Google Trends (also on trends.google.com) mixes unrelated 'Breakout' queries such as 'how to cook pasta' or 'learn golang' into many keywords' related queries. 'Relevant only' removes queries with no connection to your keyword and lists them in relatedQueriesRemoved, so nothing is hidden. 'Raw' keeps Google's lists unchanged and labels every query with relevance (term / topic / popular / off_topic).",
            "default": "relevant"
          },
          "includeRelatedTopics": {
            "title": "Related topics (top + rising)",
            "type": "boolean",
            "description": "Top and rising related topics, when Google provides them (Google does not show topics for comparisons).",
            "default": true
          },
          "trendingNowGeos": {
            "title": "Trending Now countries (optional)",
            "type": "array",
            "description": "Also fetch what is trending right now (daily search trends with approximate search volume and news links) for these country codes, e.g. US, GB, IN. One result per trending search.",
            "items": {
              "type": "string"
            }
          },
          "outputLayout": {
            "title": "Output layout",
            "enum": [
              "keyword",
              "flat"
            ],
            "type": "string",
            "description": "Flat layout writes a summary row per keyword plus one row per date / region / related query, ideal for Excel, Sheets and BI tools. Billing is identical: one result per keyword.",
            "default": "keyword"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Interface language for region and topic names, e.g. en-US, de, es, pt-BR.",
            "default": "en-US"
          },
          "timezoneOffsetMinutes": {
            "title": "Time zone offset (minutes)",
            "type": "integer",
            "description": "Same as Google's tz parameter: minutes BEHIND UTC. 0 = UTC, 300 = New York (EST), 240 = New York (EDT), -60 = Berlin (CET).",
            "default": 0
          },
          "maxSecondsPerKeyword": {
            "title": "Max seconds per search",
            "minimum": 30,
            "maximum": 900,
            "type": "integer",
            "description": "If Google keeps rate-limiting a search, we slow down and retry up to this long (plus one shorter retry at the end of the run), then return a free error row instead of hanging.",
            "default": 120
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Apify datacenter proxy is used to retry from a fresh IP when Google says \"too many requests\". Residential is not needed.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}