Google Search

SERP API Google Query Parameters

Configure Google search queries using Thordata’s SERP API, including localization parameters, geotargeting, pagination, 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" \
 -d "q=pizza" \
 -d "json=1"
chevron-rightjson ,Format(Required)hashtag

This parameter defines the output format. Options are JSON, Light JSON, and HTML (downloadable). JSON is the default. Note that Light JSON includes only the top organic Google results.

Example Request: Example using the parameter q: pizza,json :1

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

If the value is true, the system will employ a browser engine to run page scripts and return the complete rendered HTML.

Example Request: Example using the parameter q: pizza,render_js :true

curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google" \
 -d "q=pizza" \
 -d "json=1" \
 -d "render_js=true"
chevron-rightno_cache ,Disable Caching(Optional)hashtag

By default, search results with identical parameters are cached for 5 minutes. Set no_cache to true to bypass the cache, or to false (default) to use cached results. Cached searches are free and will not be counted toward your search statistics.

Example Request: Example using the parameter q: pizza,no_cache :true

curl -X POST https://scraperapi.thordata.com/request \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -H "Authorization: Bearer token" \
 -d "engine=google" \
 -d "q=pizza" \
 -d "json=1" \
 -d "no_cache=true"
chevron-rightai_overview ,Ai_overview(Optional)hashtag

Controls whether to fetch the AI Overview content from Google search results.Billing Note: A successful AI overview fetch typically costs 1 response. If a second request is automatically triggered to resolve a page_token, the total cost is 2 responses.

Example Request: Example using the parameter q: pizza,ai_overview :true

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

Localization

chevron-rightgoogle_domain,Domain(Optional)hashtag

Define the search engine domain name for data crawling (default value: google.com).

You can modify this parameter in the system or refer to the Google domain pagearrow-up-right to obtain the complete list of supported domain names.

Example Request:

Example results for q : pizza ,google_domain: google.co.ao

chevron-rightgl ,Country(Optional)hashtag

Specify the target country/region for search results (default value: us). Use two-letter country codes(e.g., us, ru, uk).

For the complete list of supported country codes, please refer to: Google’s Country Listarrow-up-right.

Example Request:

Example results for q : pizza,gl: ru

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

chevron-rightcr ,Set Multiple Countries(Optional)hashtag

Restrict results to specific countries, using | as a separator(e.g., countryFR|countryDE).

It can be used in conjunction with the gl parameter to ensure consistency in interface/content language.

gl and cr can be combined, but the actual effect follows cr as the priority.

Example Request:

Example results for q : pizza,cr: countryFR|countryDE

chevron-rightlr ,Set Multiple Languages(Optional)hashtag

Filters results by language using lang_XX codes (e.g., lang_fr|lang_de). If the hl parameter is used simultaneously, this parameter will override hl.

The hl and lr parameters can be used together, but the actual effect is prioritized by the lr parameter.

Example Request:

Example results for q : pizza,lr: lang_en|lang_fr

Geographical Location

chevron-rightlocation ,Location(Optional)hashtag

Simulate initiating a search from an exact location, which must be used in conjunction with the uule parameter. If not specified, the geographical location of the proxy server may be adopted.

Example Request:

Example results for q : pizza,location:India,uule:w+CAIQICIFSW5kaWE

chevron-rightuule ,Encoded Location(Optional)hashtag

Encode the target geographical location using Base64, which must be used in conjunction with the location parameter.

Example Request:

Example results for q : pizza,location:India,uule:w+CAIQICIFSW5kaWE

Search Types

chevron-righttbm ,Search type(Optional)hashtag

Defines the search result type:

  • tbm=images – Images

  • tbm=shops – Shopping

  • tbm=news – News

  • tbm=videos – Videos

Example Request:

Example results for q : pizza,tbm:shop

Pagination

chevron-rightstart ,Result offset(Optional)hashtag

Parameter defines the result offset. It skips the given number of results. It's used for pagination. (e.g., 0 (default) is the first page of results, 10 is the 2nd page of results, 20 is the 3rd page of results, etc.).

We recommend starting with 0 and increasing by 10 for the next page. There is no hard limit on the maximum offset number, but we recommend a maximum of 100 which is the same behavior as with the Google Maps web app. More than that, the result might be duplicated or irrelevant.

Example Request:

Example results for q : pizza,start:30

chevron-rightnum ,Number of results per page(Optional)hashtag

Subject to Google's limits, actual results may be fewer (max. 10 per page).

Example Request:

Example results for q : pizza,num:20

Advanced Parameters

chevron-rightludocid ,Google Place ID(Optional)hashtag

This parameter defines the identifier (CID) of the Google My Business listing you want to crawl. It is also known as the Google Place ID. (e.g., ludocid=14389889685039125943).

Example Request:

Example results for q : pizza,ludocid:14389889685039125943

chevron-rightkgmid ,Google Knowledge Graph ID(Optional)hashtag

The kgmid parameter is used to directly call encrypted data of specific entries in Google Knowledge Graph, overriding regular search parameters and returning structured results.

Example Request:

Example results for q : pizza,kgmid:/m/0d6lp

chevron-rightibp ,Google Element Rendering(Optional)hashtag

Used to control the layout rendering and expansion effects of specific elements (such as Knowledge Graph extended searches with ludocid).

Code Example:

Example results for q : pizza,ibp:new

chevron-rightlsig ,Google Element Rendering(Optional)hashtag

This parameter forces the display of the Knowledge Graph map view. lsigId can also be obtained through the redirect link used by Google in 'Google My Business.'

Code Example:

Example results for q : pizza,lsig:new

chevron-rightsi,Google Cached Search Parameters ID(Optional)hashtag

Using the si parameter allows fetching encrypted cached data from Google Search. This parameter overrides all other parameters except 'start' and 'num' and is suitable for collecting Knowledge Graph tab content.

Code Example:

Example results for q : pizza,si:cat

chevron-rightuds ,Google Filter Search(Optional)hashtag

Using the uds=ADv parameter allows fetching encrypted cached data from Google Search. This parameter overrides all other parameters except 'start' and 'num' and is suitable for collecting Knowledge Graph tab content.

Code Example:

Example results for q : pizza,uds:ADV

Advanced Filters

chevron-righttbs ,Advanced Search Parameters(Optional)hashtag

Advanced filters:

  • Time: qdr:h (1 hour), qdr:y (1 year)

  • Content: sur:f (images), sur:fc (free-to-use images)

Code Example:

Example results for q : pizza,tbs:sur:f

chevron-rightsafe ,Adult Content Filtering(Optional)hashtag

Filters adult content:

  • safe=active – Strict filtering (default)

  • safe=off – No filtering

Example Request:

Example results for q : pizza,safe:active

chevron-rightnfpr ,Exclude Auto-corrected Results(Optional)hashtag

Define whether to disable automatic spelling correction. For example, with nfpr=1, searching for "googl" will not be automatically corrected to "google".

Code Example:

Example results for q : pizza,nfpr:sur:f

chevron-rightfilter ,Results Filtering(Optional)hashtag

Define duplicate removal results: 1 (enable), 0 (disable).

Code Example:

Example results for q : pizza,filter:1

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

Last updated