Documentation has been updated: see help center and changelog in one place.

AI Mode

Learn how you can extract AI Mode data with Web Scraper API.

The google_ai_mode source is designed to submit prompts and retrieve Google AI Mode conversational responses. It returns both the complete Google AI Mode response text along with its structured metadata.

AI Mode regional availability

Google AI Mode is available in most countries worldwide apart from these exceptions:

Region
Countries

Europe

France, Turkey

Asia

China, Iran, North Korea, Syria

Americas

Cuba

Request samples

The following code examples demonstrate how to retrieve a Google AI Mode response with parsed results.

curl 'https://realtime.oxylabs.io/v1/queries' \
--user 'USERNAME:PASSWORD' \
-H 'Content-Type: application/json' \
-d '{
        "source": "google_ai_mode",
        "query": "best health trackers under $200",
        "render": "html",
        "parse": true
    }'

Our examples use synchronous Realtime integration method. If you would like to use Proxy Endpoint or asynchronous Push-Pull integration, refer to the integration methods section.

Request parameter values

Basic setup and customization options for retrieving Google AI Mode responses.

Parameter
Description
Default Value

source

Sets the scraper.

google_ai_mode

query

The prompt or question to submit to Google AI Mode. Must be less than 400 symbols.

-

render

Setting to html is required for this source. More info.

-

parse

Returns parsed data when set to true.

false

geo_location

The geographical location that the result should be adapted for. For more information, read about our suggested geo_location parameter structures here.

-

callback_url

URL to your callback endpoint. More info.

-

- mandatory parameter

Structured data

Web Scraper API returns either an HTML or JSON object of Google AI Mode output, containing structured data of the results page.

google_ai_mode structured output

Output data dictionary

HTML example

JSON structure

The structured google_ai_mode output includes fields like URL, page, results, and more. The table below presents a detailed list of each Google AI Mode element we parse, including description, data type, and relevant metadata.

The number of items and fields for a specific result type may vary depending on the search query.

Key Name
Description
Type

url

The URL of Google AI Mode.

string

page

Page number.

integer

content

An object containing the parsed Google AI Mode response data.

object

content.links

List of external links referenced in the response. Displayed in the box on the right side of the page.

array

content.prompt

Original prompt submitted to Google AI Mode.

string

content.citations

List of citations with URLs and associated texts, as shown in the main block of the Google AI Mode response. Multiple URLs referencing the same text are grouped together into a list.

array

content.response_text

Complete response text from Google AI Mode.

string

content.parse_status_code

Status code of the parsing operation.

integer

created_at

Timestamp when the scraping job was created.

timestamp

updated_at

Timestamp when the scraping job was finished.

timestamp

job_id

ID of the job associated with the scraping job.

string

status_code

Status code of the scraping job. You can see the scraper status codes described here.

integer

Last updated

Was this helpful?