Google

Google can be scraped using multiple different targets, including the Google search bar, direct URL, or more specific targets like Google suggest, Google ads, etc.

Below you will find every target, whether it can be parsed to JSON, its required parameters, and ready to use code examples for cURL, Python and PHP, where you only need to change the username and password for your SERP Scraping API user for the code to work.

📘

All Google targets support the standard scraping parameters.

Targets

google_search

Retrieve Google Search results.

ParameterTypeRequiredDescription
querystringSearch query.
parsebooleanAutomatically parse results.
google_results_languagestringReturn results in a specified language. See all options here
google_tbmstringFilter search results for specific types of content (news, apps, videos...). More information here .

Sample value: app
google_tbsstringThis parameter contains parameters, like limiting/sorting results by date. More information here .

Example: qdr:w (results from last week)
google_safe_searchbooleanHide explicit results.
other...

google

Retrieve results from any Google service.

ParameterTypeRequiredDescription
urlstringA URL of a Google service. Additional parameters can be specified in the URL itself.
parsebooleanAutomatically parse results (if a parsing strategy is available for the target url).
other...

google_travel_hotels

Retrieve Google Travel service's hotel search results.

🚧

If using the geo parameter, you must use Google's location name format described here. Single country strings (eg. United States) may perform poorly, while more specific locations (eg. San Francisco,California,United States) will work better.

ParameterTypeRequiredDescription
querystringSearch query.
geostringSan Francisco,California,United States
adultsintNumber of adults staying.
childrenintNumber of children staying.
starsarrayFilter for hotels that have the provided star rating.

Example: [4,5]
date_rangestringDates from and to.

Example: "2022-11-10,2022-11-20"
other...

google_trends_explore

Retrieve Google Trends search results.

ParameterTypeRequiredDescription
querystringSearch query.
categorynumberA number denoting which category to use.

See all available category ids here .
other...

google_shopping_search

Retrieve Google Shopping search results page by supplying your query to the query parameter.

ParameterTypeRequiredDescription
querystringSearch query.
parsebooleanAutomatically parse results.
other...

google_shopping_product

Retrieve Google Shopping search results using item ID supplied to the query parameter.

ParameterTypeRequiredDescription
querystring (item id)Item id from Google Shopping.
parsebooleanAutomatically parse results.
google_results_languagestringReturn results in a specified language. See all options here
other...

google_shopping_pricing

Retrieve Google Shopping page results containing offers for a specific item by supplying product ID to the query parameter.

ParameterTypeRequiredDescription
querystring (item id)Item id from Google Shopping.
parsebooleanAutomatically parse results.
google_results_languagestringReturn results in a specified language. See all options here
other...

google_images

Retrieve image links similar to the one you provided from Google Images search page.

ParameterTypeRequiredDescription
querystringSearch query.
google_results_languagestringReturn results in a specified language. See all options here
other...

google_suggest

Retrieve Google search term suggestions.

ParameterTypeRequiredDescription
querystringSearch query.
geostringGeolocation must be provided in ISO 2 format.
other...

google_ads

Retrieve Google search results with paid ads, if possible (not all responses include ads).

ParameterTypeRequiredDescription
querystringSearch query.
parsebooleanAutomatically parse results.
google_tbmstringFilter search results for specific types of content (news, apps, videos...). More information here.

Sample value: app
google_tbsstringThis parameter contains parameters, like limiting/sorting results by date. More information here.

Example: qdr:w (results from last week)
google_results_languagestringReturn results in a specified language. See all options here
other...

google_maps

Retrieve Google Maps results.

🚧

If using the geo parameter, you must use Google's location name format described here. Single country strings (eg. United States) may perform poorly, while more specific locations (eg. San Francisco,California,United States) will work better.

ParameterTypeRequiredDescription
querystringSearch query.
geostringSan Francisco,California,United States
page_fromstringPage to search in. Defaults to 1.
num_pagesstringResults in page. Defaults to 10.
google_results_languagestringGoogle results language.
hotel_occupancyintegerNumber of guests (only applicable if you are searching for a hotel-related search term).
date_rangestringLength for staying in the hotel, from - to. Example: 2024-07-12,2024-07-13 (only applicable if you are searching for a hotel-related search term).
google_nfprbooleanAuto-correction. Defaults to false.
other...

google_lens

Retrieve Google Lens results. You can input the URL of any photo for search.

ParameterTypeRequiredDescription
querystringThe URL of the image that you wish to search on Google Lens.

Example: https://www.humanesociety.org/sites/default/files/2021-06/hamster-540188.jpg
parsebooleanIf set to true, Scraping API will automatically parse the results.
other...

Google geolocation

You can use the geo parameter with Google targets in a few different ways:

  1. Target using the full location name (city,region,country) as provided in Google CSV found here:
{
    "target": "google_search",
    "query": "pizza",
    "geo": "London,England,United Kingdom"
}
  1. Target using the country name only:
{
    "target": "google_search",
    "query": "pizza",
    "geo": "United Kingdom"
}
  1. Using coordinates and radius:
{
    "target": "google_search",
    "query": "pizza",
    "geo": "lat: 32.4827, lng: -22.9384, rad: 5000"
}

There are exceptions and above formats will not work in all situations, in which case you will get an error stating that.