# Google AI Mode Scraper & API ($4.00/1k) 🤖 (`unitbytes/google-ai-mode-scraper`) Actor

⚡ Scrape Google AI Mode ($4/1k — 50x cheaper): full Markdown answers, cited web sources, follow-ups & brand audits. Export JSON, CSV, or Excel.

- **URL**: https://apify.com/unitbytes/google-ai-mode-scraper.md
- **Developed by:** [UnitBytes | Enterprise Web Data](https://apify.com/unitbytes) (community)
- **Categories:** SEO tools, AI, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 ai mode queries

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 🤖 Google AI Mode Scraper & Citation API: Conversational Answers in Markdown, Cited Web Sources, Follow-Ups & GEO Brand Audits

<div align="center">

[![Available on Apify](https://img.shields.io/badge/Available_on-Apify-28B52A?style=for-the-badge\&logo=apify\&logoColor=white)](https://apify.com/unitbytes/google-ai-mode-scraper)
[![Pricing](https://img.shields.io/badge/Price-From_$4.00_%2F_1%2C000_Queries-orange?style=for-the-badge)](#)
[![50x Cheaper](https://img.shields.io/badge/Savings-50x_Cheaper_Than_Browser_Scrapers-brightgreen?style=for-the-badge)](#)
[![Markdown](https://img.shields.io/badge/Output-GFM_Tables_%7C_Code_%7C_LaTeX_Math-purple?style=for-the-badge)](#)
[![Global Markets](https://img.shields.io/badge/Localization-US_%7C_UK_%7C_EU_%7C_CA_%7C_AU_%7C_IN_%7C_JP_%7C_BR-blue?style=for-the-badge)](#)
[![Zero Login](https://img.shields.io/badge/Account_Required-None-blue?style=for-the-badge)](#)

**The fastest and most cost-effective Google AI Mode scraper & Generative Engine Optimization (GEO / AEO) citation monitoring API for brand visibility platforms, SEO/GEO agencies, competitive product analysts, and RAG data teams. Extract full multi-section conversational Google AI Mode answers in clean GitHub-Flavored Markdown, unwrapped inline `citations` vs. corroborating `sources`, suggested `followUpQuestions`, and automated `brandCitationAudit` reports — at `$4.00 / 1,000 queries` (`50x` cheaper than `$200/1K` browser scrapers, with `$0` event charge on unsupported regions).**

[**🚀 Try it Live on Apify**](https://apify.com/unitbytes/google-ai-mode-scraper) • [**💰 From $4.00 / 1,000 Queries (50x Cheaper)**](#-transparent-pay-per-event-pricing-50x-cheaper-than-browser-scrapers) • [**🔗 Cited vs. Related Sources**](#-inline-citations-vs-corroborating-web-sources) • [**💬 Support**](https://apify.com/unitbytes/google-ai-mode-scraper/issues)

</div>

***

<p align="center">
  <a href="https://apify.com/unitbytes/google-ai-mode-scraper">
    <img src="https://img.shields.io/badge/Try_It_Free_on_Apify-~995_AI_Mode_Prompts_Free%2FMo-28B52A?style=for-the-badge&logo=apify&logoColor=white" height="42" alt="Try it for Free on Apify">
  </a>
  <br>
  <sub>⚡ <b>1-Click Free Trial:</b> Run up to ~995 Google AI Mode prompts every month free with Apify's $5 monthly credit (up to ~1,248 per $5 on volume plans) • No credit card required</sub>
</p>

***

### 📖 Overview

**Google AI Mode** is Google's dedicated conversational AI search experience — decomposing complex multi-part B2B comparisons, technical architecture trade-offs, financial regulation questions, and buyer research prompts into deep, structured answers backed by live web grounding.

Whereas classic **Google AI Overviews** appear selectively above traditional SERPs, **Google AI Mode** generates rich conversational responses on virtually every informational, comparative, and analytical prompt — making it the #1 frontier for **Generative Engine Optimization (GEO)**, **LLM brand share-of-voice tracking**, and **web-grounded RAG dataset curation**.

Until now, collecting Google AI Mode responses at scale meant paying **$150 to $200 per 1,000 prompts** for slow, memory-hungry headless browsers that frequently stall on verification walls, mangle Markdown tables and code blocks, or leak opaque Google redirect links.

**Google AI Mode Scraper by UnitBytes** runs on a tiny **`256 MB` memory footprint** with zero browser overhead — delivering complete Markdown answers, unwrapped canonical source URLs, follow-up prompts, and brand citation audits starting **from `$4.00` per 1,000 queries (`50x` cheaper)**, while charging **`$0.00` in query events** if a prompt targets an unsupported region.

<table>
  <tr>
    <td colspan="3" style="padding:10px 14px;background:#0284C7;color:#FFFFFF;font-size:13px;font-weight:700;border-radius:6px 6px 0 0">
      ⚡ UnitBytes · Google AI, Search, News, Trends, Shopping &amp; Local Intelligence Ecosystem
    </td>
  </tr>
  <tr>
    <td style="padding:10px 12px;border:1px solid #E2E8F0;background:#FFF4ED;vertical-align:top;width:33.3%">
      <span style="white-space:nowrap">🤖 <b><a href="https://apify.com/unitbytes/google-ai-mode-scraper" style="color:#C2410C;text-decoration:none;font-size:13px">Google AI Mode Scraper</a></b></span><br><span style="color:#EA580C;font-size:11px;font-weight:700">📍 You are here (From $4.00/1K)</span><br>
      <span style="color:#64748B;font-size:11px">Deep conversational AI Mode answers, web sources &amp; GEO brand audits</span>
    </td>
    <td style="padding:10px 12px;border:1px solid #E2E8F0;background:#FAFAFA;vertical-align:top;width:33.3%">
      <span style="white-space:nowrap">✨ <b><a href="https://apify.com/unitbytes/google-ai-overviews-scraper" style="color:#0F172A;text-decoration:none;font-size:13px">Google AI Overviews Scraper</a></b></span><br><span style="color:#2563EB;font-size:11px;font-weight:600">From $4.00/1K • SERP + AEO</span><br>
      <span style="color:#64748B;font-size:11px">Classic SERP AI Overviews + Page 1 organic ranks &amp; People Also Ask</span>
    </td>
    <td style="padding:10px 12px;border:1px solid #E2E8F0;background:#FAFAFA;vertical-align:top;width:33.3%">
      <span style="white-space:nowrap">📈 <b><a href="https://apify.com/unitbytes/google-trends-scraper" style="color:#0F172A;text-decoration:none;font-size:13px">Google Trends Scraper</a></b></span><br><span style="color:#2563EB;font-size:11px;font-weight:600">From $0.30/1K • Search Demand</span><br>
      <span style="color:#64748B;font-size:11px">Breakout topics, interest over time, regional heatmaps &amp; rising queries</span>
    </td>
  </tr>
  <tr>
    <td style="padding:10px 12px;border:1px solid #E2E8F0;background:#FAFAFA;vertical-align:top;width:33.3%">
      <span style="white-space:nowrap">📰 <b><a href="https://apify.com/unitbytes/google-news-scraper" style="color:#0F172A;text-decoration:none;font-size:13px">Google News Scraper</a></b></span><br><span style="color:#2563EB;font-size:11px;font-weight:600">From $1.00/1K • PR &amp; Grounding</span><br>
      <span style="color:#64748B;font-size:11px">Direct publisher URLs, recency filters &amp; clean full-article text</span>
    </td>
    <td style="padding:10px 12px;border:1px solid #E2E8F0;background:#FAFAFA;vertical-align:top;width:33.3%">
      <span style="white-space:nowrap">🛍️ <b><a href="https://apify.com/unitbytes/google-shopping-scraper" style="color:#0F172A;text-decoration:none;font-size:13px">Google Shopping Scraper</a></b></span><br><span style="color:#2563EB;font-size:11px;font-weight:600">From $2.00/1K • Product Offers</span><br>
      <span style="color:#64748B;font-size:11px">Live retail prices, deals, multi-seller offers &amp; store checkout URLs</span>
    </td>
    <td style="padding:10px 12px;border:1px solid #E2E8F0;background:#FAFAFA;vertical-align:top;width:33.3%">
      <span style="white-space:nowrap">📍 <b><a href="https://apify.com/unitbytes/google-maps-leads-scraper" style="color:#0F172A;text-decoration:none;font-size:13px">Google Maps &amp; Jobs</a></b></span><br><span style="color:#2563EB;font-size:11px;font-weight:600">From $0.25/1K • Local &amp; Hiring</span><br>
      <span style="color:#64748B;font-size:11px"><a href="https://apify.com/unitbytes/google-maps-leads-scraper">B2B Leads</a>, <a href="https://apify.com/unitbytes/google-maps-reviews-scraper">Reviews</a> &amp; <a href="https://apify.com/unitbytes/google-jobs-scraper">Google Jobs</a></span>
    </td>
  </tr>
</table>

***

### 🌟 Why GEO Platforms, Brand Trackers & AI Teams Choose UnitBytes

| Capability / Metric | **UnitBytes Google AI Mode Scraper** | **Browser-Based AI Mode Scrapers** | **Generic SERP APIs** |
| :--- | :---: | :---: | :---: |
| **💰 Price per 1,000 Prompts** | **From $4.00 ($0.0040 / prompt — 50x cheaper)** | $150.00 – $200.00 per 1K + heavy GB-hour compute | $15.00 – $30.00 per 1K |
| **📝 GFM Tables, Code & LaTeX Fidelity** | **✅ Multi-col GFM tables, syntax-tagged code (`python`, `sql`) & `$LaTeX$`** | ⚠️ Collapsed whitespace or leaked UI disclaimers | ⚠️ Often flattened to plain text |
| **🔗 Inline `citations` vs. `sources`** | **✅ Explicit `section: "cited"` vs `"related"` + unwrapped canonical URLs** | ❌ Lumps sidebar cards together or leaves redirects | ⚠️ Partial URL resolution |
| **💬 Conversational `followUpQuestions`** | **✅ Extracted cleanly as string array** | ⚠️ Frequently missed | ⚠️ Inconsistent |
| **🎯 Built-In GEO `brandCitationAudit`** | **✅ `cited` / `related_only` vs `competitor_cited` / `not_cited`** | ❌ Manual post-processing required | ❌ Not included |
| **🌍 Global Markets + `$0` Region Guard** | **✅ `US`, `GB`, `DE`, `FR`, `CA`, `AU`, `IN`, `BR`, `JP` + `$0` on unsupported regions** | ❌ Fails on UK/EEA consent or bills full browser runtime | ⚠️ Charges per request regardless |

***

### 🔗 Inline `citations` vs. Corroborating Web `sources`

Google AI Mode distinguishes between pages **explicitly cited inline** to back specific claims inside the answer and **corroborating web cards** displayed in the source panel. This Actor preserves both cleanly:

1. **`citations` (`citedSourcesCount`)**: Every source with `section: "cited"` that Google AI Mode directly linked inside the body of its answer.
2. **`sources` (`sourcesCount`)**: The complete ordered list of all web sources surfaced for the prompt — combining `section: "cited"` inline references and `section: "related"` corroborating web pages, each with unwrapped `url`, normalized root `domain`, `title`, `publisher`, `snippet`, and `faviconUrl`.
3. **`followUpQuestions`**: Suggested next-turn questions generated by Google AI Mode — ideal for automated prompt-tree expansion, topic cluster mapping, and buyer-journey research.

***

### 💰 Transparent Pay-Per-Event Pricing (`50x` Cheaper Than Browser Scrapers)

This Actor uses **Pay-Per-Event (PPE)** billing on a `256 MB` container footprint so you pay strictly for answered AI Mode prompts — **never** for unsupported regions (`status: "unsupported_region"` = **`$0.00` event fee**).

| Apify Plan Tier | Event Name | Price per Prompt | Price per 1,000 Prompts | Savings vs. $200/1K Browser Scrapers |
| :--- | :--- | :--- | :--- | :--- |
| **Free Plan** (`FREE`) | `ai-mode-query` | `$0.0050` | **`$5.00 / 1,000 prompts`** | **40x cheaper** (**~995 prompts/mo free** with `$5` credit) |
| **Paid Volume Plans** (`GOLD`+) | `ai-mode-query` | **`$0.0040`** | **`$4.00 / 1,000 prompts`** | **50x cheaper** (**~1,248 prompts per $5**) |
| **Actor Run Start** | `apify-actor-start` | `$0.0050` | `$5.00 / 1,000 runs` | One-time startup fee per run (`256 MB` allocation) |
| **Unsupported Territories** | — | **`$0.00 / prompt`** | **`$0.00 event fee`** | Instant detection with zero `ai-mode-query` charge |

> 💡 **Budget Caps Built In:** Set **Maximum cost per run** in Apify Console or via API (`maxTotalChargeUsd`), and the Actor stops cleanly with exit code `0` the instant your exact budget ceiling is reached.

***

### 💡 High-Impact Use Cases

1. **🎯 Generative Engine Optimization (GEO / AEO) Share-of-Voice Tracking**: Pass buyer-intent prompts (`"best SOC2 compliance automation platform"`, `"hubspot vs salesforce vs pipedrive for a 25 person b2b saas team"`) with `targetDomains` to measure how often Google AI Mode recommends and cites your brand versus competitors across `US`, `GB`, `DE`, `FR`, `CA`, `AU`, `IN`, `BR`, and `JP`.
2. **🧠 Web-Grounded RAG & Fine-Tuning Dataset Curation**: Collect deeply structured Markdown explanations complete with verified GFM tables, runnable code blocks, LaTeX equations, and provenance URLs at `$0.0040` per prompt.
3. **🔎 Prompt-Tree & Content Gap Discovery**: Harvest `followUpQuestions` and `topCompetitorDomains` to uncover the exact comparison matrices and third-party review publications (`pcmag.com`, `g2.com`, niche benchmarks) driving AI Mode recommendations in your category.

***

### 🛠️ How to Use via API (Python, Node.js & cURL)

#### 🐍 Python Example (GEO Brand Citation Monitoring)

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

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_API_TOKEN")

run_input = {
    "queries": [
        "compare postgresql vs mysql for high write workloads",
        "hubspot vs salesforce vs pipedrive for a 25 person b2b saas team",
    ],
    "country": "US",
    "targetDomains": ["hubspot.com", "pipedrive.com", "postgresql.org"],
    "resolveUrls": True,
    "maxQueries": 25,
}

run = client.actor("unitbytes/google-ai-mode-scraper").call(run_input=run_input)
items = client.dataset(run["defaultDatasetId"]).list_items().items

for row in items:
    audit = row.get("brandCitationAudit") or {}
    print(
        f"[{row['country']}] {row['query']} | status={row['status']} "
        f"| cited={row['citedSourcesCount']}/{row['sourcesCount']} "
        f"| audit={audit.get('citationStatus')}"
    )
```

***

#### 🟨 JavaScript / Node.js Example

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

const client = new ApifyClient({ token: 'YOUR_APIFY_API_TOKEN' });

const run = await client.actor('unitbytes/google-ai-mode-scraper').call({
    queries: [
        'stocks and shares isa vs lifetime isa uk rules and fee comparison',
    ],
    country: 'GB',
    targetDomains: ['gov.uk', 'moneysavingexpert.com'],
    resolveUrls: true,
    maxQueries: 10,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].markdown);
console.log('Follow-up prompts:', items[0].followUpQuestions);
```

***

#### 🌐 cURL Example

```bash
curl -X POST "https://api.apify.com/v2/acts/unitbytes~google-ai-mode-scraper/runs?token=YOUR_APIFY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "queries": ["tfsa vs rrsp vs fhsa contribution limits and tax comparison canada"],
    "country": "CA",
    "targetDomains": ["canada.ca"],
    "resolveUrls": true,
    "maxQueries": 5
  }'
```

***

### 📤 Example Output Record

```json
{
  "query": "compare postgresql vs mysql for high write workloads",
  "country": "US",
  "language": "en",
  "status": "ok",
  "statusMessage": null,
  "hasAnswer": true,
  "markdown": "When choosing between **PostgreSQL** and **MySQL** for **high write workloads**, the decision comes down to how each database handles **concurrency**, **storage architecture**, and **background maintenance**.\n\n#### Core Architectural Differences Under Writes\n\n| Feature | PostgreSQL | MySQL (InnoDB) |\n| --- | --- | --- |\n| MVCC Model | Append-only row versions (requires `AUTOVACUUM` tuning) | In-place clustered primary key updates via undo logs |\n| Concurrent Writes | Strong under complex mixed read/write & JSONB indexing | Predictable throughput for simple primary-key OLTP updates |",
  "text": "When choosing between PostgreSQL and MySQL for high write workloads, the decision comes down to how each database handles concurrency, storage architecture, and background maintenance...",
  "textBlocks": [
    {
      "type": "paragraph",
      "text": "When choosing between PostgreSQL and MySQL for high write workloads, the decision comes down to how each database handles concurrency, storage architecture, and background maintenance."
    },
    {
      "type": "heading",
      "level": 4,
      "text": "Core Architectural Differences Under Writes"
    },
    {
      "type": "table",
      "headers": ["Feature", "PostgreSQL", "MySQL (InnoDB)"],
      "rows": [
        ["MVCC Model", "Append-only row versions (requires AUTOVACUUM tuning)", "In-place clustered primary key updates via undo logs"]
      ]
    }
  ],
  "sources": [
    {
      "position": 1,
      "title": "MySQL or PostgreSQL? A Workload-by-Workload Decision Guide",
      "url": "https://panelica.com/blog/mysql-or-postgresql-workload-decision-guide-2026",
      "domain": "panelica.com",
      "publisher": "Panelica",
      "snippet": "PostgreSQL stores multiple versions of each row (called tuples). Dead tuples accumulate and must be cleaned up by the VACUUM process.",
      "faviconUrl": "https://encrypted-tbn2.gstatic.com/faviconV2?url=https://panelica.com&size=32",
      "section": "cited"
    }
  ],
  "citations": [
    {
      "position": 1,
      "title": "MySQL or PostgreSQL? A Workload-by-Workload Decision Guide",
      "url": "https://panelica.com/blog/mysql-or-postgresql-workload-decision-guide-2026",
      "domain": "panelica.com",
      "publisher": "Panelica",
      "snippet": "PostgreSQL stores multiple versions of each row (called tuples). Dead tuples accumulate and must be cleaned up by the VACUUM process.",
      "faviconUrl": "https://encrypted-tbn2.gstatic.com/faviconV2?url=https://panelica.com&size=32",
      "section": "cited"
    }
  ],
  "sourcesCount": 1,
  "citedSourcesCount": 1,
  "followUpQuestions": [
    "What is the approximate write volume (e.g., rows per second)?",
    "Is it mostly inserts, updates, or a mix of both?"
  ],
  "brandCitationAudit": {
    "targetDomains": ["postgresql.org", "dev.to"],
    "citationStatus": "competitor_cited",
    "isCited": false,
    "citedTargetUrls": [],
    "citedTargetCount": 0,
    "topCompetitorDomains": [
      { "domain": "panelica.com", "citationsCount": 1 }
    ]
  },
  "googleAiModeUrl": "https://www.google.com/search?q=compare+postgresql+vs+mysql+for+high+write+workloads&gl=us&hl=en",
  "scrapedAt": "2026-11-14T12:00:00Z"
}
```

#### Complete Output Fields Reference (`17` Root Fields)

| Field | Type | Description |
| :--- | :--- | :--- |
| `query` | `string` | Normalized prompt or search query processed. |
| `country` | `string` | Uppercase 2-letter ISO 3166-1 country code (`"US"`, `"GB"`, `"DE"`, `"JP"`, etc.). |
| `language` | `string` | Effective interface language code used (`"en"`, `"de"`, `"fr"`, `"pt-BR"`, `"ja"`, etc.). |
| `status` | `string` | `"ok"` when answered, or `"unsupported_region"` (`$0` event charge) when Google AI Mode is unavailable in `country`. |
| `statusMessage` | `string \| null` | Upstream status note when `status` is `"unsupported_region"`, otherwise `null`. |
| `hasAnswer` | `boolean` | `true` when `status == "ok"` and a non-empty AI Mode answer was extracted. |
| `markdown` | `string` | Full Google AI Mode response in clean GitHub-Flavored Markdown (headings, tables, lists, code, math). |
| `text` | `string` | Clean plain-text representation of the AI Mode answer. |
| `textBlocks` | `object[]` | Structured block list (`paragraph`, `heading`, `list`, `table`, `code`) for RAG ingestion. |
| `sources` | `object[]` | All web sources (`position`, `title`, `url`, `domain`, `publisher`, `snippet`, `faviconUrl`, `section`). |
| `citations` | `object[]` | Subset of `sources` directly cited inline inside the answer (`section: "cited"`). |
| `sourcesCount` | `integer` | Total count of web sources (`len(sources)`). |
| `citedSourcesCount` | `integer` | Count of inline-cited web sources (`len(citations)`). |
| `followUpQuestions` | `string[]` | Suggested conversational follow-up prompts returned by Google AI Mode. |
| `brandCitationAudit` | `object \| null` | GEO brand audit (`targetDomains`, `citationStatus`, `isCited`, `citedTargetUrls`, `citedTargetCount`, `topCompetitorDomains`) when `targetDomains` is set. |
| `googleAiModeUrl` | `string` | Direct Google Search / AI Mode URL for the prompt and market. |
| `scrapedAt` | `string` | UTC ISO 8601 extraction timestamp. |

***

### 📊 Data Honesty & Realistic Upstream Behavior

- **Regional Rollout & `$0` Unsupported-Territory Protection**: Google AI Mode is live across major global markets (`US`, `GB`, `CA`, `AU`, `IN`, `BR`, `JP`, `DE`, `FR`, etc.). If you query a restricted or unlaunched territory, the Actor detects it immediately on the first check, emits a transparent record with `status: "unsupported_region"` and `hasAnswer: false`, and **never bills an `ai-mode-query` event**.
- **Pure Coding & Generative Synthesis Prompts**: On self-contained coding or mathematical prompts (e.g., *"write a Python binary search helper with unit tests"*), Google AI Mode often answers from model synthesis with `sourcesCount: 0` (`sources: []`) while returning complete runnable code blocks in `markdown` and `textBlocks`.
- **Suggested Follow-Up Questions (`followUpQuestions`)**: Google AI Mode includes suggested follow-up prompts on roughly 75–90% of queries depending on topic complexity; exhaustive comparison responses occasionally omit follow-up chips upstream (`followUpQuestions: []`).

***

### ⚙️ Input Parameters Reference

| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `queries` | `string[]` | `["compare postgresql vs mysql...", ...]` | Conversational prompts, comparison queries, or Google Search URLs. Automatically deduplicated. |
| `startUrls` | `object[]` | `[]` | Optional Google Search URLs (`{"url": "https://www.google.com/search?q=..."}`). |
| `maxQueries` | `integer` | `25` | Maximum unique prompts to process in this run (`1` – `1000`). |
| `country` | `string` | `"US"` | 2-letter ISO 3166-1 country code (`US`, `GB`, `CA`, `AU`, `IN`, `BR`, `JP`, `DE`, `FR`, etc.). Unsupported territories exit cleanly at `$0` event charge. |
| `language` | `string` | `""` | Optional ISO/BCP-47 language override. Leave empty (`""`) to automatically use the natural language of `country`. |
| `targetDomains` | `string[]` | `[]` | Brand/client domains (e.g. `["hubspot.com"]`) to populate `brandCitationAudit`. |
| `resolveUrls` | `boolean` | `true` | Unwrap Google redirect links into clean canonical external URLs. |
| `proxyConfiguration` | `object` | `null` | Optional custom proxy override (`proxyUrls`). Managed residential proxies are configured automatically on Cloud. |

***

#### 📋 Copy-and-Paste Directive for AI Coding Assistants (Cursor, Windsurf & Claude Code)

> *"Use the `unitbytes/google-ai-mode-scraper` Actor on Apify to extract full conversational Google AI Mode answers in clean GitHub-Flavored Markdown, unwrapped `citations` and `sources`, `followUpQuestions`, and `brandCitationAudit` (`targetDomains`). Pair it with `unitbytes/google-ai-overviews-scraper` to compare classic SERP AI Overviews against conversational AI Mode. Example call: `client.actor('unitbytes/google-ai-mode-scraper').call(run_input={'queries': ['compare postgresql vs mysql for high write workloads'], 'country': 'US', 'targetDomains': ['postgresql.org'], 'maxQueries': 25})`"*

***

#### 🔌 MCP Server Setup: Claude Code, Cursor & AI Agents

```json
{
  "mcpServers": {
    "apify": {
      "type": "http",
      "url": "https://mcp.apify.com/?tools=actors,docs,unitbytes/google-ai-mode-scraper,unitbytes/google-ai-overviews-scraper"
    }
  }
}
```

***

### ⚖️ Compliance & Privacy

This Actor extracts **strictly publicly available AI Mode responses and cited web references** served on Google Search. It never accesses private user accounts, personal histories, or personally identifiable information (PII). Read Apify's guide on [the legality of web scraping](https://blog.apify.com/is-web-scraping-legal/) to ensure compliance with applicable regulations.

#### Disclaimer

This Actor is an independent software tool and is not affiliated with, endorsed by, or sponsored by Google LLC.

***

### 💬 Support & Feedback

Tracking LLM brand visibility across global markets or curating web-grounded AI benchmarks?

- 💬 **Apify Issues**: Open a ticket on the [Actor Issues Tab](https://apify.com/unitbytes/google-ai-mode-scraper/issues)
- 🚀 **Apify Store**: [Google AI Mode Scraper](https://apify.com/unitbytes/google-ai-mode-scraper)

# Actor input Schema

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

List of conversational prompts, software/product comparisons, research questions, or technical queries to submit to Google AI Mode. Also accepts direct Google Search URLs.

## `startUrls` (type: `array`):

Optional list of Google Search URLs (e.g. 'https://www.google.com/search?q=compare+postgresql+vs+mysql\&gl=us'). Merged and deduplicated automatically with AI Mode Prompts.

## `maxQueries` (type: `integer`):

Maximum number of unique prompts to process in this run (1 to 1,000). Execution stops cleanly once this cap is reached.

## `country` (type: `string`):

Two-letter ISO 3166-1 country code (e.g. 'US', 'GB', 'CA', 'AU', 'IN', 'BR', 'JP', 'DE', 'FR'). Google AI Mode is rolled out across major global markets; if queried from a territory where Google has not rolled out AI Mode yet, the Actor detects it immediately (`status: 'unsupported_region'`) at `$0` event charge.

## `language` (type: `string`):

Optional ISO / BCP-47 interface language override (e.g. 'en', 'de', 'fr', 'es', 'ja', 'pt-BR'). Leave empty ('') to automatically use the natural primary language of the selected country.

## `targetDomains` (type: `array`):

Optional list of your brand or client root domains (e.g. \['hubspot.com', 'pipedrive.com']) to compute `brandCitationAudit`: classifies whether Google AI Mode cited your brand ('cited', 'related_only', 'competitor_cited', 'not_cited', or 'unavailable'), lists exact `citedTargetUrls`, and ranks `topCompetitorDomains`.

## `resolveUrls` (type: `boolean`):

Unwraps Google redirect wrappers into clean, direct canonical external destination URLs across all cited and related web sources.

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

Managed residential proxies are automatically configured by default on Apify Cloud. Optionally supply custom HTTP/SOCKS5 `proxyUrls` if you prefer to route requests through your own proxy gateway.

## Actor input object example

```json
{
  "queries": [
    "compare postgresql vs mysql for high write workloads",
    "hubspot vs salesforce vs pipedrive for a 25 person b2b saas team"
  ],
  "maxQueries": 25,
  "country": "US",
  "language": "",
  "targetDomains": [],
  "resolveUrls": true
}
```

# Actor output Schema

## `results` (type: `string`):

Extracted Google AI Mode conversational answers in GitHub-Flavored Markdown, structured textBlocks, unwrapped cited and related web sources, follow-up questions, and AEO brand citation audits

## `geoAuditView` (type: `string`):

Focused table view comparing Google AI Mode brand citation status, cited source counts, and competitor domains

# 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": [
        "compare postgresql vs mysql for high write workloads",
        "hubspot vs salesforce vs pipedrive for a 25 person b2b saas team"
    ],
    "maxQueries": 25,
    "country": "US",
    "language": ""
};

// Run the Actor and wait for it to finish
const run = await client.actor("unitbytes/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": [
        "compare postgresql vs mysql for high write workloads",
        "hubspot vs salesforce vs pipedrive for a 25 person b2b saas team",
    ],
    "maxQueries": 25,
    "country": "US",
    "language": "",
}

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

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": [
    "compare postgresql vs mysql for high write workloads",
    "hubspot vs salesforce vs pipedrive for a 25 person b2b saas team"
  ],
  "maxQueries": 25,
  "country": "US",
  "language": ""
}' |
apify call unitbytes/google-ai-mode-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,unitbytes/google-ai-mode-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/5wOE5EuM9hcJnyeDG/builds/UtPo8Z4N77qyKy8AW/openapi.json
