{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Trends Scraper: Interest, Regions, Queries & Trending",
    "description": "Get Google Trends data as JSON, CSV or Excel: interest over time, interest by region and city, related queries, and trending searches by country. Compare any number of terms. No login.",
    "version": "0.1",
    "x-build-id": "lf2RoSlW2kILigcQa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/stratumics~google-trends-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-stratumics-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/stratumics~google-trends-scraper/runs": {
      "post": {
        "operationId": "runs-sync-stratumics-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/stratumics~google-trends-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-stratumics-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": {
          "mode": {
            "title": "What to scrape",
            "enum": [
              "explore",
              "trending"
            ],
            "type": "string",
            "description": "Search terms: interest over time, interest by region and related queries for the terms you enter. Trending now: the searches trending today in one or more countries (set them in the Trending now section).",
            "default": "explore"
          },
          "searchTerms": {
            "title": "Search terms",
            "type": "array",
            "description": "Words or phrases to look up, one per line, written as you would type them on Google Trends. A Google topic id such as /m/02vqfm (the topic \"Coffee\") also works. Up to 1,000 terms per run.",
            "items": {
              "type": "string"
            }
          },
          "compareTerms": {
            "title": "Compare terms on one scale",
            "type": "boolean",
            "description": "Off: each term is looked up on its own and gets its own 0 to 100 scale (100 is that term's peak). On: terms are compared in one chart like on Google Trends, so the numbers show which term is searched more. Google compares up to 5 terms at once; with more terms, the first term is added to every group of 4 as an anchor and every point also gets a commonScaleValue that puts all terms on one scale.",
            "default": false
          },
          "trendsUrls": {
            "title": "Google Trends URLs",
            "type": "array",
            "description": "Optional. Paste explore URLs copied from trends.google.com, for example https://trends.google.com/trends/explore?date=today%205-y&geo=US&q=coffee,tea. Each URL runs as its own comparison with the location, time range, category and property written in it; the filters below do not apply to it.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "geo": {
            "title": "Location",
            "type": "string",
            "description": "Leave empty for worldwide data. Pick a country, or type a region code such as US-CA (California), GB-SCT (Scotland) or IN-MH (Maharashtra), or a US metro code such as US-NY-501 (New York).",
            "default": ""
          },
          "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",
              "custom"
            ],
            "type": "string",
            "description": "The period to cover. Google picks the step between points from its length: 1 minute for the past hour or 4 hours, 8 minutes for the past day, 1 hour for 7 days, 1 day for 30 or 90 days, 1 week for 12 months and 5 years, 1 month since 2004. Choose Custom to set your own dates below.",
            "default": "today 12-m"
          },
          "startDate": {
            "title": "Custom start date",
            "type": "string",
            "description": "First day of a custom time range (YYYY-MM-DD, from 2004-01-01). Used only when Time range is Custom."
          },
          "endDate": {
            "title": "Custom end date",
            "type": "string",
            "description": "Last day of a custom time range (YYYY-MM-DD). Leave empty for today. Ranges up to about 9 months give daily points; longer ones give weekly or monthly points."
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "Narrow the search to one category, for example Food & Drink for \"apple\" the fruit rather than the company. Pick a top-level category or type any Google Trends category id.",
            "default": "0"
          },
          "property": {
            "title": "Search type",
            "enum": [
              "web",
              "images",
              "news",
              "youtube",
              "shopping"
            ],
            "type": "string",
            "description": "Which Google search to measure: web search (the default on Google Trends), image search, news search, YouTube search or Google Shopping.",
            "default": "web"
          },
          "interestOverTime": {
            "title": "Interest over time",
            "type": "boolean",
            "description": "The timeline: a 0 to 100 value for every point in the time range, with partial (still running) points flagged.",
            "default": true
          },
          "interestByRegion": {
            "title": "Interest by region",
            "type": "boolean",
            "description": "Where the term is searched most: one 0 to 100 value per country, region, metro area or city.",
            "default": false
          },
          "regionResolution": {
            "title": "Region level",
            "enum": [
              "auto",
              "country",
              "region",
              "metro",
              "city"
            ],
            "type": "string",
            "description": "Level of detail for interest by region. Automatic uses Google's default (countries for worldwide, regions for a country). Country works only worldwide and metro areas only in the US.",
            "default": "auto"
          },
          "includeLowVolumeRegions": {
            "title": "Include low search volume regions",
            "type": "boolean",
            "description": "Also list regions with little search volume, like the checkbox on Google Trends.",
            "default": false
          },
          "relatedQueries": {
            "title": "Related queries",
            "type": "boolean",
            "description": "What people also searched for: the top related queries and the rising ones (fastest growing, \"Breakout\" above +5,000%), up to 25 of each.",
            "default": false
          },
          "relatedTopics": {
            "title": "Related topics",
            "type": "boolean",
            "description": "Top and rising related topics. Google currently shows related topics only to signed-in visitors, so this list usually comes back empty; empty results are not charged.",
            "default": false
          },
          "trendingGeos": {
            "title": "Countries for trending searches",
            "type": "array",
            "description": "Used when What to scrape is Trending now. Two-letter country codes, one per line, for example US, GB, IN. Region codes such as US-CA work too.",
            "default": [
              "US"
            ],
            "items": {
              "type": "string"
            }
          },
          "trendingHours": {
            "title": "Trending in the past",
            "enum": [
              "4",
              "24",
              "48",
              "168"
            ],
            "type": "string",
            "description": "Time window for trending searches.",
            "default": "24"
          },
          "trendingCategory": {
            "title": "Trending category",
            "enum": [
              "all",
              "1",
              "2",
              "3",
              "20",
              "4",
              "5",
              "6",
              "7",
              "8",
              "9",
              "10",
              "11",
              "13",
              "14",
              "15",
              "16",
              "17",
              "18",
              "19"
            ],
            "type": "string",
            "description": "Only trending searches in this category.",
            "default": "all"
          },
          "trendingActiveOnly": {
            "title": "Only trends that are still active",
            "type": "boolean",
            "description": "Skip searches that have stopped trending.",
            "default": false
          },
          "trendingIncludeNews": {
            "title": "Add news articles",
            "type": "boolean",
            "description": "Add up to 3 news articles Google links to each trending search (title, URL, source, date, image). No extra charge.",
            "default": false
          },
          "maxTrendingSearches": {
            "title": "Max trending searches per country",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many trending searches for each country, in Google's order. 0 means all of them (the US often has 500 or more in 24 hours).",
            "default": 100
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "With Apify Proxy on (the default), the Actor starts with a direct connection, which is fastest, moves requests to Apify Proxy datacenter IPs as soon as Google rate-limits it or the run is large, and to residential IPs (at no extra charge to you) when Google refuses the datacenter ones too. Turn it off to never use a proxy, or pick proxy groups or your own proxy URLs to send every request through them.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}