Ads

The google_ads source is optimized to retrieve Google Search results page (SERP) with paid ads. This source will return only ten results per page, ensuring the highest chances of paid results showing up. Other than that, it supports the same parameters as regular Web Search.

Request samples

In this example, we make a request to google.nl to retrieve search results for the keyword adidas.

curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "google_ads", 
        "domain": "nl", 
        "query": "adidas",
        "parse": true
    }'

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 ads.

Parameter
Description
Default Value

source

Sets the scraper.

google_ads

query

UTF-encoded keyword.

-

render

-

parse

false

callback_url

-

user_agent_type

desktop

- mandatory parameter

Localization

Adapt search results to specific geographical locations, domains, and languages.

Parameter
Description
Default Value

geo_location

-

domain

com

locale

-

context: results_language

-

Pagination

Controls for managing the pagination and retrieval of search results.

Parameter
Description
Default Value

start_page

Starting page number.

1

pages

Number of pages to retrieve.

1

Filtering

Options to filter and refine search results based on various criteria.

Parameter
Description
Default Value

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

-

Other

Additional advanced settings and controls for specialized requirements.

Parameter
Description
Default Value

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.:

...
"context": [
    {
        "key": "filter",
        "value": "0"
    }
]
...

Structured data

Explore output data dictionary for each Web SERP feature (including paid results), offering a brief description, screenshot, parsed JSON code snippet, and a table defining each parsed field.

Last updated