Google Search API

Effortlessly extract Google Search results, tailored in real-time and grounded in location specificity, all while bypassing the pesky captchas.

Simply activate this capability by appending the engine=google parameter to your request.

Scouring through Google Search results can be a taxing endeavor, given Google's intricate mechanisms to identify and thwart scraping attempts. However, with our specialized Google API, the complexity is seamlessly handled on our end. All you need to do is dispatch a GET request to our dedicated endpoint, and our robust engine will swiftly deliver the desired data to you.

Google Search API Integration Examples

We will use following URL as an example for this request:

https://serp.shifter.io/v1?engine=google&api_key=<YOUR_API_KEY>&q=history

Ready to Use Google Search Scraping Scripts:

curl --request GET --url "https://serp.shifter.io/v1?engine=google&api_key=<YOUR_API_KEY>&q=history"

Google Search Specific Parameters

#1: Query Parameter

Parameter
Type
Description

q Required

string

The keywords that you are searching for on Google (the query).

#2: Request Customisation Parameters

Parameter
Type
Description

cookie

string

Set a custom cookies for your Google search. The string must be url encoded.

tbm

string

The parameter defines the type of search you want to do. It can be:

- isch for images

- vidfor videos

- nws for news

- shop for shopping. * If left unset it will continue with the regular Google search.

sort_by

string

Sorts the results. It can be set to relevance or date.

time_period

string

The period of time for the results. Can be set to last_hour, last_day, last_week, last_month, last_year or custom

time_period_min

string

The minimum value for time period when the time_period parameter is set to custom. Format: MM/DD/YYYY

time_period_max

string

The maximum value for time period when the time_period parameter is set to custom. Format: MM/DD/YYYY

flatten_results

int

Whether or not to flatten the results. It can be set to 1 (to flatten results) or 0.

empty_results

int

Can be set to 0 (to hide empty results) or 1 (to display empty results).

#3: Device and Geolocation Parameters

Parameter
Type
Description

device

string

The device used for your Google search. Can be set to desktop, mobile or tablet.

location

string

Defines where you want the search to originate from. A list of all the geotargeting locations can be found here.

google_domain

string

The Google domain that you want to use for your search.

uule

string

The Google encoded location that you want to use for your search.

lr

string

One or multiple languages to limit your search to. Values are formatted as lang_{2 letter code of the country} You can find all the available languages here

hl

string

The language you want to use for your Google search. List of supported languages

gl

string

The country you want to use for your Google search. List of supported countries

#4: Pagination Parameters

Parameter
Type
Description

start

int

The offset of the Google Search results. Represents the number of results that you want to skip.

num

int

The number of results returned on each page.

ijn

int

Parameter defines the page number for Google Images. There are 100 images per page. This parameter is equivalent to start (offset) = ijn * 100.

#5: Advanced Filtering Parameters

Parameter
Type
Description

safe

string

This parameter allows you to filter the adult content displayed in Google Search results. It can take the values active and off.

filter

int

Defines if the filters for similar results and omitted results are on (set to 1) or off (set to 0).

nfpr

int

Defines if it should exclude or not the auto-corrected query. Can have the value 1 to exclude results or 0 otherwise.

tbs

string

The parameter defines advanced search parameters that aren't possible in the regular query field. (e.g., advanced search for patents, dates, news, videos, images, apps, or text contents).

ludocid

string

Defines the id (CID) of the Google My Business listing you want to scrape. Also known as Google Place ID.

lsig

int

Force the Knowledge Graph map view to show up.

Response Example

Last updated

Was this helpful?