Web Search
The google_search
source is designed to retrieve Google Search results (SERPs). This sub-page specifically presents information related to Google Web Search. To explore other result types, read Image Search or News Search.
Request samples
In the samples below, we make a request to get 2
results pages, from number 11
to number 12
, for search term adidas
on google.nl
domain. The SERP will be filtered to contain French-language results only. API will return parsed results.
We use synchronous Realtime integration method in our examples. If you would like to use Proxy Endpoint or asynchronous Push-Pull integration, refer to the integration methods section.
Request parameter values
Generic
Basic setup and customization options for scraping Google Web search results.
source
Sets the scraper.
google_search
query
UTF-encoded keyword.
-
render
-
parse
false
callback_url
-
user_agent_type
desktop
- mandatory parameter
Google Advanced Search Operators
When scraping, you might find it useful to combine Google advanced search operators with your query. It enables you to customize the scope of the search, ensuring that the results are more relevant and focused. Explore these special commands here and here. See an example below.
Localization
Adapt search results to specific geographical locations, domains, and languages.
geo_location
-
domain
com
locale
-
context
:
results_language
-
Pagination
Controls for managing the pagination and retrieval of search results.
start_page
Starting page number.
1
pages
Number of pages to retrieve.
1
limit
Number of results to retrieve in each page.
10
context
:limit_per_page
-
Continuous scroll support
Web Scraper API fully supports Google Search continuous scroll. It automatically detects continuous scrolling layouts, efficiently loading the requested organic results without any extra parameters required.
Limit per page
To use this feature, include a JSON array with JSON objects containing the following data:
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.
90
Request sample
Filtering
Options to filter and refine search results based on various criteria. Learn how to use context parameters here.
context
:
filter
Setting the value of this parameter to 0
lets you see results that would otherwise be excluded due to similarity to other results.
1
context
:
safe_search
Safe search. Set to true
to enable it.
false
context
:
udm
-
context
:
tbm
To-be-matched or tbm
parameter. Accepted values are: app
, blg
, bks
, dsc
, isch
, nws
, pts
, plcs
, rcp
, lcl
-
context
:
tbs
-
udm
and tbm
context parameters cannot be used together in a single scraping request; please select only one. Using both simultaneously may lead to conflicts or unexpected behavior.
Other
Additional advanced settings and controls for specialized requirements.
context
:
fpstate
Setting the fpstate
value to aig
will make Google load more apps. This parameter is only useful if used together with the render
parameter.
-
context
:
nfpr
true
will turn off spelling auto-correction
false
Context parameters
All context parameters should be added to the context
array as objects with key
and value
pairs, e.g.:
Structured data
Web Scraper API is capable of extracting either an HTML or JSON object that contains Google search results, offering structured data on various elements of the results page.