Google Search API

Scrape the Google Search Search Results from any country in the world in both JSON and HTML format using this API. All featured snippets are supported.

Here is the list of default parameters you can use with this API :

Parameters
Description

api_key required

This is your API key.

q required

Type: String Google Search Query

num

Type: Number(Integer) Number of results per page

gl

Type: String

Default: "us" Name of the country. The name should be in ISO 3166 Alpha-2 format.

hl

Type: String

Default Value: "en_us" The language of the requested results.

page

Type: Number(Integer) [0,10,20....] Default: 0 (Enter 10 for 2nd-page results, 20 for 3rd, etc .) The page number to get targeted search results.

lr

Type: String Limit the search to one or multiple languages. It is used as lang_{language code}. For example - "lang_us".

uule

Type: String Used to encode a place an exact location(with latitude and longitude) into a value used in a cookie, an URL, or an HTTP header.

duration

Type: String Use this as "d/w/m/mn/y" where n is from 0-10.

d - the previous 24 hours, w - the previous seven days, m - the previous month, mn - the previous n number of months, y - past year

The duration parameter requests search results from a specified time period (quick date range).

nfpr

Type: Boolean

Default: 0 It excludes the result from an auto-corrected query that is spelled wrong. It can be set to 1 to exclude these results or 0 to include them.

tbs

Type: String to be searched - An advanced parameter to filter search results.

safe

Type: String [active/off]

Default: off To filter the adult content set safe to active or to disable it set it off.

domain

Type: String

Default: "google.com" To obtain local results from a specific country, for example, for India, it will be "google.co.in," and for the UK, it will be "google.co.uk."

html

Type: Boolean Default: false To render response as raw HTML.

Note: Serpdog supports two APIs:

  1. LITE Google Search API - To get results rapidly with fewer featured snippets. It costs half the advanced search API.

  2. Advanced Google Search API - To get advanced featured snippets but with a difference in speed.

LITE Google Search API Example:

Advanced Google Search API Example:

Last updated