Trends: Explore

The google_trends_explore source is designed to retrieve Google Trends results.

Due to ongoing issues, the scraped data may not be 100% accurate compared to direct usage on Google Trends via web browsers. Please use it with caution and be aware of potential discrepancies.

Query parameters

ParameterDescriptionDefault Value

source

Data source. More info.

google_trends_explore

query

UTF-encoded keyword

-

geo_location

The geographical location that the result should be adapted for. With Google Trends: Explore, we accept 2-letter ISO country codes as geo_location parameter values. We also allow using worldwide as a geo_location parameter value.

-

context:

search_type

Lets you set the search type (one of the options on Google Trends GUI). Possible values: web_search, image_search, google_shopping, youtube_search.

web_search

context:

date_from

The lower date bracket. Format: YYYY-MM-DD. Oldest possible date: 2004-01-01.

context:

date_to

The upper date bracket. Format: YYYY-MM-DD. Oldest possible date: 2004-01-01.

context:

category_id

Category ID. Please refer to this file in story for a list of valid values.

user_agent_type

Device type and browser. You can find the full list here.

desktop

callback_url

URL to your callback endpoint. More information here.

-

- required parameter

NOTE: This service always delivers structured data - so there is no need to utilize the parse parameter with this source.

Code examples

In this example, we make a request to get trends results for a search term adidas between the 1st of January, 2021 and the 2nd of February, 2022, and set the category to "Arts & Entertainment" (category id: 3).

{
  "source": "google_trends_explore",
  "query": "adidas",
  "context": [
    {"key": "date_from", "value": "2021-01-01"},
    {"key": "date_to", "value": "2022-02-02"},
    {"key": "category_id", "value": 3}
  ]
}

The example above uses the Realtime integration method. If you would like to use some other integration method in your query (e.g. Push-Pull or Proxy Endpoint), refer to the integration methods section.

Output example

{
    "results": [
        {
            "content":"{\"interest_over_time\": [{\"keyword\": \"adidas\", \"items\": [{\"time\": \"Jan 3\ \–\ 9, 2021\", \"value\": 75}, {\"time\": \"Jan 10\ \–\ 16, 2021\", \"value\": 79}...{\"query\": \"adidas zx\", \"value\": 10, \"formatted_value\": \"10\", \"link\": \"/trends/explore?q=adidas+zx&date=2021-01-01+2022-02-02\"}]}]}",
            "created_at": "2024-02-13 11:33:21",
            "updated_at": "2024-02-13 11:33:27",
            "page": 1,
            "url": "https://trends.google.com/trends/api/explore?hl=en-US&tz=0&req=%7B%22comparisonItem%22%3A+%5B%7B%22keyword%22%3A+%22adidas%22%2C+%22geo%22%3A+%22%22%2C+%22time%22%3A+%222021-01-01+2022-02-02%22%7D%5D%2C+%22category%22%3A+0%2C+%22property%22%3A+%22%22%7D",
            "job_id": "7163133042662350849",
            "status_code": 200
        }
    ]
}

Last updated