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.

q ,Search Query(Required)

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"

Localization

google_domain,Domain(Optional)

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 page to obtain the complete list of supported domain names.

Example Request:

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

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 "google_domain=google.co.ao" \
 -d "json=1"
gl ,Country(Optional)

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 List.

Example Request:

Example results for q : pizza,gl: ru

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 "gl=ru" \
 -d "json=1"
hl ,Language(Optional)

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 Codes.

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" \
 -d "q=pizza" \
 -d "json=1" \
 -d "hl=es"
cr ,Set Multiple Countries(Optional)

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

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 "cr=countryAI|countryAQ"
lr ,Set Multiple Languages(Optional)

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

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 "lr=lang_fr|lang_en"

Geographical Location

location ,Location(Optional)

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

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 "location=India" \
 -d "uule=w+CAIQICIFSW5kaWE"
uule ,UULE(Optional)

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

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 "location=India" \
 -d "uule=w+CAIQICIFSW5kaWE"

Search Types

tbm ,Search type(Optional)

Defines the search result type:

  • tbm=isch – Images

  • tbm=shop – Shopping

  • tbm=nws – News

  • tbm=vid – Videos

Example Request:

Example results for q : pizza,tbm:shop

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 "tbm=shops"

Pagination

start ,Result offset(Optional)

Set the starting point for search result pagination (e.g., "start=30" means skipping the first 30 results and starting to display from the 31st result).

Example Request:

Example results for q : pizza,start:30

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 "start=30"
num ,Number of results per page(Optional)

This parameter defines the maximum number of results returned per page in the search results. For example, setting it to 10 means 10 results will be returned.

Example Request:

Example results for q : pizza,num:20

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 "num=20"

Advanced Parameters

ludocid ,Google Place ID(Optional)

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

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 "ludocid=14389889685039125943"
kgmid ,Google Knowledge Graph ID(Optional)

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

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 "start=06" \
 -d "kgmid=/m/0d6lp"
ibp ,Google Element Rendering(Optional)

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

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 "ibp=new"
lsig ,Google Element Rendering(Optional)

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

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 "lsig=1"
si,Google Cached Search Parameters ID(Optional)

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

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 "si=cat"
uds ,Google Filter Search(Optional)

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

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 "uds=ADV"

Advanced Filters

tbs ,Advanced Search Parameters(Optional)

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

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 "tbs=sur:f"
safe ,Safe(Optional)

Filters adult content:

  • safe=active – Strict filtering (default)

  • safe=off – No filtering

Example Request:

Example results for q : pizza,safe:active

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 "safe=active"
nfpr ,Exclude Auto-corrected Results(Optional)

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

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 "nfpr=1"
filter ,Results Filtering(Optional)

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

Code Example:

Example results for q : pizza,filter: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" \
 -d "filter=1"

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

Last updated

Was this helpful?