Google Trends

SERP API Google Query Parameters

Configure Google search queries using Thordata’s SERP API, including Geographical Location parameters, search type, and "advanced parameter" output options.

chevron-rightq ,Search Query(Required)hashtag

Define the search query used for data scraping (Default value: q=pizza). Any keywords in any language are supported.

Example Request: Example using the parameter q: pizza

curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_trends" \
 -d "q=pizza" \
 -d "json=1"

Geographical Location

chevron-righthl ,Language(Optional)hashtag

Set the interface language for search results (default value: en). Adopt standard language code formats (e.g., en, es, zh-CN).

For the complete list of supported language codes, please refer to: Google Language Codesarrow-up-right.

Example Request:

Example results for q : pizza,hl: es

curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_trends" \
 -d "q=pizza" \
 -d "json=1" \
 -d "hl=es"
chevron-rightgeo ,Location(Optional)hashtag

The parameter defines the location you wish to search from. It defaults to Worldwide (activated when the value of the geo parameter is not set or is empty). Go to Google Trends Locations for a complete list of supported Google Trends locations.

Example Request:

Example results for q : pizza,geo:India

curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_trends" \
 -d "q=pizza" \
 -d "json=1" \
 -d "geo=India"
chevron-rightregion,Region(Optional)hashtag

The parameter is used to get more specific results when using the "By Region Comparison Segment" and "By Region by Interest"data_type charts. Other data_type charts do not accept the region parameter. The default value depends on the set geography. Available options:

COUNTRY - Country

REGION - Subregion

DMA - Metro

CITY - City

Example Request:

Example results for q : pizza,region:COUNTRY

curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google_trends" \
 -d "q=pizza" \
 -d "json=1" \
 -d "region=COUNTRY"

Search Type

chevron-rightdata_type ,data_type(Optional)hashtag

Parameter defines the type of search you want to do. Available options:

TIMESERIES - Interest over time - Accepts both single and multiple queries per search.

GEO_MAP - Compared breakdown by region - Accepts only multiple queries per search.

GEO_MAP_0 - Interest by region - Accepts only single query per search.

RELATED_TOPICS - Related topics - Accepts only single query per search.

RELATED_QUERIES - Related queries - Accepts only single query per search.

Example Request:

Example results for q : pizza,data_type:TIMESERIES

Advanced Parameters

chevron-righttz,Time Zone(Optional)hashtag

The parameter defines the time zone offset. The default value is 420 (Pacific Daylight Time (PDT): -07:00). The value is in minutes and ranges from -1439 to 1439. tz can be calculated using the difference between UTC+0 and the desired time zone. Example: -PDT

Example Request:

Example results for q : pizza,tz:-1439 to 1439

chevron-rightcat,Category (Optional)hashtag

The parameter defines the search category. The default value is 0 (all categories).

Example Request:

Example results for q : pizza,cat:7

chevron-rightgprop ,Property(Optional)hashtag

Parameter is used for sorting results by property. The default property is set to Web Search (activated when the value of gprop parameter is not set or empty). Other available options:

images - Image Search

news - News Search

froogle - Google Shopping

youtube - YouTube Search

Code Example:

Example results for q : pizza,gprop:froogle

chevron-rightdate ,Date(Optional)hashtag

Parameter is used to define a date. Available options:

now 1-H- Past hour

now 4-H - Past 4 hours

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

today 5-y - Past 5 years

all - 2004 - present

You can also pass custom values:

Dates from 2004 to present: yyyy-mm-dd yyyy-mm-dd (e.g., 2021-10-15 2022-05-25)

Code Example:

Example results for q : pizza,date:now 1-H

For further assistance, contact us at [email protected].

Last updated