Google

There are various page types we can scrape and parse on Google. You can either provide us with a full URL or a few input parameters via specifically built page types (e.g. Search, Ads, Lens, and others) so we can form the URL on our end.

SERP Scraper API can render JavaScript when scraping. This is necessary in some Google services, such as Travel.

Overview

Below is a quick overview of all the available data source values we support with Google.

SourceDescriptionDedicated parser

google

Submit any Google URL you like.

Depends on the URL.

google_search

SERPs. (Web, Image, News)

Yes.

google_ads

SERPs, optimized for maximum ad rate. num=10 only.

Yes.

google_images

Reverse Image Search.

Yes.

google_lens

Google Lens service.

Yes.

google_maps

Local search service.

No.

google_travel_hotels

Travel: Hotels service.

No.

google_suggest

Autocomplete search term suggestions.

No.

google_trends_explore

Trends.

No.

Although we do not have dedicated parsers for each Google source, you can write your own parsing instructions with Custom Parser feature and get structured data.

You can jump to your preferred Google page type by selecting the page link below. Each page contains the parameter table as well as code examples to help you get started with your query.

pageURLpageWeb SearchpageImage SearchpageNews SearchpageAdspageReverse Image SearchpageLenspageLocal SearchpageTravel: HotelspageSuggestionspageTrends: Explore

Parameter values

Locale

Using the locale parameter will allow you to change the interface language (not the results) of the Google Search web page.

For example, if you use domain com and locale parameter de-DE, the results will still be American, but Accept-Language header value will be set to de-DE,de;q=0.8. This would imitate a person from US searching in com domain, who has the UI of his browser set to German language.

If you don't use this parameter, we will set 'Accept-Language' parameter to match the domain (i.e. en-US for com).

Download the full list of locale values in JSON here.

[  
   {  
      "locale":{  
         "en-ai":{  
            "description":"Anguilla - English",
            "domain":"com.ai"
         },
         "es-pr":{  
            "description":"Puerto Rico - Spanish",
            "domain":"com.pr"
         },
         ...
         "en-by":{  
            "description":"Belarus - English",
            "domain":"by"
         },
         "en-in":{  
            "description":"India - English",
            "domain":"co.in"
         }
      }
   }
]

Results language

When scraping, you have the option to specify the language of the obtained results. You can find the complete list of supported languages and their corresponding values in JSON format here.

For example, to set the results language to Arabic when scraping Google SERP, add this key and value:

{
    "key": "results_language",
    "value": "ar"
}

Geo location

The geo_location parameter facilitates obtaining localized Google results through UULE-based values, compatible with most Google sources. There are multiple methods to choose from:

  1. Using a State Name:

    • Format: "State,Country"

    • Example: "geo_location": "California,United States"

  2. Using a Country Name:

    • Pass the official country name.

    • Example: "geo_location": "United Kingdom"

  3. Using Coordinates and Radius:

    • For hyperlocal results (e.g., "restaurants near me"), provide latitude, longitude, and radius values.

    • Example: "geo_location": "lat: 47.6205, lng: -122.3493, rad: 25000"

  4. Using Google's Canonical Location Name or Criteria ID:

    • Find values here in the latest zipped CSV file.

    • Example: "geo_location": "New York,New York,United States" or "geo_location": "1023191"

If you mistakenly enter a misspelled geo_location parameter, our system or Google may attempt to correct it for you. However, note that specifying an existing Criteria ID is crucial for successful requests.

Additionally, consider combining the locale and domain parameters along with the correct geo_location structure. This combination enhances precision and ensures that your queries align with your intended localization preferences.

Google Travel Hotels - unaccepted values

google_travel_hotels can accept a limited number of geo_location values - please check the attached file below to see geo_location values that don't yield accurate results.

Google Suggest

The google_suggest source accepts only two-letter ISO-3166 country codes, e.g. US, DE, LT, etc. Don't use any other input format with this source.

Domain

Use domain parameter to specify which Google top-level domain (TLD) you would like to scrape. The full list of available domains for Google can be found here.

Limit per page

The context:limit_per_page parameter lets you specify that you would like to scrape a few Google Search pages with the same session (IP address and cookie set). This lets you minimize the chance of seeing overlapping organic results (e.g., the last organic result on the first page being the same as the first organic result on the second page).

To use this feature, include a JSON array with JSON objects containing the following data:

ParameterDescriptionExample

page

The number of the page you would like to scrape. Any integer value greater than 0 will work

1

limit

The number of results on the page in question. Any integer value between 1 and 100 (inclusive) will work. Note: Our API supports continuous scroll.

90

Payload examples

The example below shows a part of the JSON payload that pertains to the context:limit_per_page parameter:

"context": [{
"key": "limit_per_page",
"value": [
  {"page": 1, "limit": 10},
  {"page": 2, "limit": 90}
]
}]

The example below shows the whole JSON payload:

{
    "source": "google_search",
    "query": "adidas",
    "parse": true,
    "context": [
        {
            "key": "limit_per_page",
            "value": [
                {"page": 1, "limit": 10},
                {"page": 2, "limit": 90}
                    ]
        }]
}

Last updated