SERP API Google Query Parameters

Understand the query parameters for Thordata’s SERP API - Google Search.

Search Term Example:

curl -k "https://www.google.com/search?q=pizza" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
Parameter
Name
Function
Parameter Value

q

Search Term

Specify search keywords

q=pizza

Localization Used to specify the language and locale of the search results. Example:

curl -k "https://www.google.ac/search?q=pizza&gl=af&hl=ach" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
Parameter
Name
Function
Parameter Value

hl

Language

Specify the display language of the search results interface

hl=en,hl=zh-CN...

gl

Country

Specify the display of search results according to the habits of users in that country.

gl=US,gl=CN...

Location Specifies the geocoded location of the search, altering the geographic context. You can download a file of all available values here. Example:

curl -k "https://www.google.ac/search?q=pizza&uule=w+CAIQICIXS2FidWwsS2FidWwsQWZnaGFuaXN0YW4" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
Parameter
Name
Function
Parameter Value

uule

Location

Specify precise geographic location based on coordinates (Base64 encoded)

uule=w+CAIQICINVW5pdGVkIFN0YXRlcw

Search Type Used to define the type of search. No tbm parameter is required for general search, but each other type uses a specific tbm value. Example:

curl -k "https://www.google.ac/search?q=pizza&tbm=isch" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
Parameter
Name
Function
Parameter Value

tbm

Search type

Specify search type

tbm=nws tbm=vid tbm=isch tbm=shop

Pagination Used to set result offset and number of results to return. Example:

curl -k "https://www.google.ac/search?q=pizza&start=10&num=100" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
Parameter
Name
Function
Parameter Value

start

Pagination

Specify search page number (offset)

start=10 (Display page 2) /00/10.../100

num

Results per page

Specify the number of results per search page

num=100 (Up to 100 results) 1....100

Safe Search Used to control whether explicit/adult content is filtered. Example:

curl -k "https://www.google.ac/search?q=pizza&safe=active" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
Parameter
Name
Function
Parameter Value

safe

Safe

Mainly used to block explicit adult content (such as pornography, violence, etc.)

safe=active safe=off

Parsing A Thordata custom parameter that allows you to receive a parsed JSON result instead of raw HTML. Example:

curl -k "https://www.google.ac/search?q=pizza&json=1" --proxy scraping.thordata.com:30001 --proxy-user td-customer-serp_USERNAME:PASSWORD
Parameter
Name
Function
Parameter Value

json

Parsing

Specify output format

No json value (returns HTML) json=1 (returns JSON) json=2 (returns JSON + HTML)

Last updated

Was this helpful?