# Google AI Mode Scraper (`leohryndev/google-ai-mode-scraper`) Actor

Scrape Google AI Mode — the conversational search tab — at scale. Full AI answers, comparison tables as structured JSON, every cited source with position. Multi-country. The first dedicated AI Mode scraper on Apify.

- **URL**: https://apify.com/leohryndev/google-ai-mode-scraper.md
- **Developed by:** [Leo Hryn](https://apify.com/leohryndev) (community)
- **Categories:** SEO tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 query scrapeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Google AI Mode Scraper — Conversational AI Search Results as JSON

Scrape **Google AI Mode** — the conversational, chat-style search experience (the "AI Mode" tab) — at scale. For every query you get the **full AI answer**, any **comparison tables as structured JSON**, and **every cited source** with its position. The first dedicated AI Mode scraper on Apify.

AI Mode is where Google is moving search: full AI answers with far fewer outbound clicks, richer than AI Overviews, and increasingly the surface that decides which brands and sites get seen. If you do SEO, GEO/AEO, market research, or competitive intel, this is the data you're currently missing.

### What you get per query

```json
{
    "query": "best project management software",
    "countryCode": "us",
    "languageCode": "en",
    "aiModePresent": true,
    "answerText": "The best project management software depends on your team size and workflow...",
    "textBlocks": [ { "type": "text", "text": "..." } ],
    "tables": [
        {
            "headers": ["Platform", "Best For", "Starting Price"],
            "rows": [["Asana", "Cross-team work management", "Free; $10.99/user/mo"], ["monday.com", "Visual workflows", "$12/user/mo"]]
        }
    ],
    "citations": [
        { "position": 1, "url": "https://www.reddit.com/r/projectmanagement/...", "domain": "reddit.com", "title": "What PM software do you actually use?", "location": "sources_panel" }
    ],
    "citationCount": 18
}
````

The comparison tables alone are gold: AI Mode loves building "Platform / Best For / Price" tables for commercial queries — structured competitive positioning, straight from Google's AI, as clean JSON.

### Use cases

- **GEO / AEO research** — see which sources Google's most advanced AI surface actually cites in your niche.
- **Brand monitoring** — is your product in the answer? In the comparison table? Cited as a source? (For automated brand/competitor analysis, share-of-voice and gap keywords across AI Overviews **and** AI Mode, use the companion Actor: **[Google AI Overview Brand Monitor](https://apify.com/leohryndev/google-ai-overview-brand-monitor)**.)
- **Content strategy** — study the exact structure AI Mode prefers (tables, lists, sources) and shape your content to match.
- **Datasets & research** — track how conversational search answers evolve over time, per country and language.

### How it works

Real browser sessions through **residential proxies in your target country** (default), with automatic session rotation, block detection, and retries. AI Mode streams its answers; the Actor waits for the answer to fully materialize before parsing. Works across countries/languages where AI Mode is available.

### Pricing

Pay per query scraped — full answer + tables + all citations included. No subscription. Failed queries are not charged.

### Scheduling & integrations

Run on a schedule (Console → Schedules), from the API/SDKs, from n8n/Make/Zapier, or as an **MCP tool** so your AI agents can query AI Mode directly.

### FAQ

**Is this legal?** The Actor reads publicly available search result pages — no login, no personal data. Standard SEO-industry practice.

**Why do some queries return `aiModePresent: false`?** Google doesn't serve AI Mode answers for every query in every region; the Actor reports it honestly (and you can re-check on a schedule).

**How is this different from an AI Overview scraper?** AI Overviews are the summary box on the classic results page. AI Mode is the full conversational tab (`udm=50`) with richer answers, tables, and a different citation set — brands are often cited in one but not the other. This Actor covers AI Mode; the [companion Actor](https://apify.com/leohryndev/google-ai-overview-brand-monitor) covers both plus brand analysis.

**What exactly is Google AI Mode?** Google's end-to-end AI search experience, rolled out from 2025: instead of ten blue links with a summary on top, the whole results page is a conversational answer (powered by Gemini) with inline sources, follow-up questions, and comparison tables. It has its own tab in Google Search and its own URL parameter (`udm=50`).

**Do AI Mode citations differ from AI Overview citations?** Massively. In our own 25-keyword study the two surfaces shared only ~16% of cited sources. If you're measuring "does Google's AI cite us?", you need both surfaces.

**Can I track answers over time?** Yes — schedule the Actor and each run appends dated rows, giving you a time series of how the answer, tables, and cited sources for each keyword evolve.

***

*More AI-search tools from this developer: [apify.com/leohryndev](https://apify.com/leohryndev) — AI Overview Brand Monitor (multi-engine), Brave AI Answer Scraper, and more.*

*Keywords: Google AI Mode scraper, AI Mode API, scrape Google AI Mode, udm=50, conversational search results, Google AI answers JSON, GEO tool, AEO, AI search citations, generative engine optimization.*

# Actor input Schema

## `queries` (type: `array`):

Search queries to run in Google AI Mode (one per line).

## `countryCode` (type: `string`):

Google country (gl parameter + proxy country). Two-letter code, e.g. `us`, `gb`, `de`, `es`.

## `languageCode` (type: `string`):

Google UI language (hl parameter), e.g. `en`, `de`, `es`.

## `maxConcurrency` (type: `integer`):

How many queries to process in parallel.

## `debugSaveHtml` (type: `boolean`):

Store fetched AI Mode HTML into the key-value store for troubleshooting.

## `proxyConfiguration` (type: `object`):

Residential proxies in the target country are strongly recommended (default).

## Actor input object example

```json
{
  "queries": [
    "best project management software"
  ],
  "countryCode": "us",
  "languageCode": "en",
  "maxConcurrency": 3,
  "debugSaveHtml": false,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "best project management software"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("leohryndev/google-ai-mode-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "queries": ["best project management software"] }

# Run the Actor and wait for it to finish
run = client.actor("leohryndev/google-ai-mode-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "best project management software"
  ]
}' |
apify call leohryndev/google-ai-mode-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=leohryndev/google-ai-mode-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Google AI Mode Scraper",
        "description": "Scrape Google AI Mode — the conversational search tab — at scale. Full AI answers, comparison tables as structured JSON, every cited source with position. Multi-country. The first dedicated AI Mode scraper on Apify.",
        "version": "1.0",
        "x-build-id": "99rGDvNL2tr5efiAo"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/leohryndev~google-ai-mode-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-leohryndev-google-ai-mode-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/leohryndev~google-ai-mode-scraper/runs": {
            "post": {
                "operationId": "runs-sync-leohryndev-google-ai-mode-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/leohryndev~google-ai-mode-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-leohryndev-google-ai-mode-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "queries"
                ],
                "properties": {
                    "queries": {
                        "title": "Queries",
                        "minItems": 1,
                        "type": "array",
                        "description": "Search queries to run in Google AI Mode (one per line).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "countryCode": {
                        "title": "Country",
                        "pattern": "^[a-zA-Z]{2}$",
                        "type": "string",
                        "description": "Google country (gl parameter + proxy country). Two-letter code, e.g. `us`, `gb`, `de`, `es`.",
                        "default": "us"
                    },
                    "languageCode": {
                        "title": "Language",
                        "type": "string",
                        "description": "Google UI language (hl parameter), e.g. `en`, `de`, `es`.",
                        "default": "en"
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "How many queries to process in parallel.",
                        "default": 3
                    },
                    "debugSaveHtml": {
                        "title": "Save raw HTML (debug)",
                        "type": "boolean",
                        "description": "Store fetched AI Mode HTML into the key-value store for troubleshooting.",
                        "default": false
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Residential proxies in the target country are strongly recommended (default).",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
