Core APIs
...
Google
Core Requests

Trends

4min

Google Trends Parameters

GET /search?engine=google&search_type=trends

The Google Trends Parameters are applicable when making a request with search_type=trends to retrieve Google's Interest Over Time trend or Interest by Subregion trend results for a given search term. The search term is specified in the q parameter. The trend is specified with the data_type parameter.

Localizing Google Trends Requests To localize Trends requests you should use the trends_geo request parameter. For a list of all available trends_geo values see the Trends Geo Reference.

Google Trends
Google Trends


Multiple Trends Keywords You can request comparative Trends results for up to 5 keywords in one request. Specify multiple trends keywords in comma-seperated notation in the q parameter. For example, to replicate the request shown in the screenshot below the q parameter would be q=pizza,burger,chips,sausages,bread .

Document image


To request Trends results for the keyword pizza , worldwide (i.e. without a trends_geo parameter), the request would be:

HTTP
Curl
Node.js
Python
PHP



Google Trends Parameters

The following parameters are available for all requests made when search_type=trends .

Parameter

Required

Description

engine

required

Should be set to engine=google .

search_type

required

Should be set to search_type=trends .

q

required

The keyword you want to use to perform the Trends search. You can request up to 5 Trends keywords to compare in one request. To specify multiple keywords, seperate each with a comma - i.e. q=dog,cat .

data_type

required

The type of trend you want results for, Interest over time or the Interest by subregion. Set data_type to data_type=INTEREST_OVER_TIME or data_type=INTEREST_BY_SUBREGION.

gl

optional

The gl parameter determines the Google country to use for the query. View the full list of supported gl values here . Defaults to us .

hl

optional

The hl parameter determines the Google UI language to return results. View the full list of supported hl values here . Defaults to en .

time_period

optional

Determines the time period of the results shown. It can be set to last_hour , last_day (for the last 24 hours), last_week (for the last 7 days), last_month , last_year or custom . When using custom you must also specifiy one or both of the time_period_min or time_period_max parameters to define the custom time period.

time_period_min

optional

Determines the minimum (i.e. 'from') time to use when time_period is set to custom . Should be in the form MM/DD/YYYY , I.e. for 31st December 2018 time_period_min would be 12/31/2018 .

time_period_max

optional

Determines the maximum (i.e. 'to') time to use when time_period is set to custom . Should be in the form MM/DD/YYYY , I.e. for 31st December 2018 time_period_max would be 12/31/2018 .

trends_type

optional

Determines the Google property to search for Trends data. Valid values are web , images , news , youtube or shopping .

trends_resolution

optional

Determines the resolution requested for the trends_interest_by_subregion section of SerpWow's Google Trends results. Valid values are country , city , dma or region .

trends_geo

optional

A Google Trends Geo ID - typically a 2-letter country code, for example trends_geo=DE for Trends data for Germany. Can also specify a more specific trends_geo for a specific location within a country. View the full list of supported trends_geo values here .

Omit the trends_geo parameter entirely if you wish to run your query as "worldwide".

trends_category

optional

A Google Trends Category ID. View the full list of supported trends_category values here .



Next Steps      Google Trends Results

Updated 09 Oct 2024
Did this page help you?