API Parameters
The Google Search API is driven by the parameters below. They are passed inside the input object of the request (see Getting Started). Only q is required; every other parameter is optional and refines the location, language, pagination, or result type.
| Parameter | Required | Description |
|---|---|---|
url | false | Complete access link of Google Search. Mutually exclusive with all other parameters. If this parameter is filled in, all other request parameters do not need to be passed and will be automatically ignored if passed. |
q | true | Defines the query you want to search. You can use anything that you would use in a regular Google search, e.g. inurl:, site:, intitle:. Advanced search query parameters such as as_dt and as_eq are also supported. |
location | false | Defines from where you want the search to originate. If several locations match, the most popular one is used. location and uule can’t be used together. It is recommended to specify location at the city level to simulate a real user’s search. If omitted, the search may take on the location of the proxy. |
uule | false | The Google-encoded location you want to use for the search. uule and location can’t be used together. |
ludocid | false | Defines the id (CID) of the Google My Business listing you want to scrape. Also known as Google Place ID. |
lsig | false | An id you might have to use to force the knowledge graph map view to show up. The lsig ID is available via the Local Pack API or Google Local API, and also via a redirect Google uses within Google My Business. |
kgmid | false | Defines the id (KGMID) of the Google Knowledge Graph listing you want to scrape. Searches with kgmid return results for the originally encrypted search parameters. For some searches, kgmid may override all other parameters except start and num. |
si | false | Defines the cached search parameters of the Google Search you want to scrape. Searches with si return results for the originally encrypted search parameters. For some searches, si may override all other parameters except start and num. si can be used to scrape Google Knowledge Graph Tabs. |
ibp | false | Responsible for rendering layouts and expansions for some elements (e.g., gwp;0,7 to expand searches with ludocid for an expanded knowledge graph). |
uds | false | Enables filtering of the search. It’s a string provided by Google as a filter. uds values are provided under the section: filters, with uds, q, and serpapi_link values provided for each filter. |
google_domain | false | Defines the Google domain to use. Defaults to google.com. See the Google domains page for a full list of supported domains. |
gl | false | Defines the country to use for the Google search. It’s a two-letter country code (e.g., us for the United States, uk for United Kingdom, fr for France). |
hl | false | Defines the language to use for the Google search. It’s a two-letter language code (e.g., en for English, es for Spanish, fr for French). |
cr | false | Defines one or multiple countries to limit the search to. Uses country{two-letter upper-case country code} and | as a delimiter (e.g., countryFR|countryDE searches only French and German pages). |
lr | false | Defines one or multiple languages to limit the search to. Uses lang_{two-letter language code} and | as a delimiter (e.g., lang_fr|lang_de searches only French and German pages). |
tbs | false | (to be searched) 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). |
safe | false | Defines the level of filtering for adult content. Can be set to active or off. By default Google will blur explicit content. |
nfpr | false | Excludes results from an auto-corrected query when the original query is spelled wrong. Set to 1 to exclude these results, or 0 to include them (default). May not always prevent auto-corrected results when no others are available. |
filter | false | Defines if the filters for ‘Similar Results’ and ‘Omitted Results’ are on or off. Set to 1 (default) to enable, or 0 to disable. |
tbm | false | (to be matched) Defines the type of search. Can be set to: (no tbm) regular Google Search, isch: Google Images API, lcl: Google Local API, vid: Google Videos API, nws: Google News API, shop: Google Shopping API, pts: Google Patents API, or any other Google service. |
start | false | Defines the result offset for pagination (e.g., 0 (default) is the first page, 10 the 2nd page, 20 the 3rd page). Google Local Results only accepts multiples of 20. |
device | false | Defines the device used to get the results. Currently only supports the desktop version. |
Full reference: API Parameters on Scrapeless API docs.