# Google Hydrogen Ai Mode Scraper (`egsand/google-hydrogen-ai-mode-scraper`) Actor

- **URL**: https://apify.com/egsand/google-hydrogen-ai-mode-scraper.md
- **Developed by:** [Enrique G.](https://apify.com/egsand) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $100.00 / 1,000 results

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/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 Hydrogen AI Mode & Search Scraper (Gemini 4)

> Extract real-time **Google Hydrogen (Gemini 4 Hydrogen)** responses from **Google Search AI Mode (`udm=50`)** and **AI Overviews**. Capture full Markdown syntheses, structured comparison tables, cited source links, publisher domains, and interactive follow-up questions at scale for **Generative Engine Optimization (GEO)** and **Answer Engine Optimization (AEO)**.

***

### What is Google Hydrogen AI Mode Scraper?

**Google Hydrogen** (Gemini 4 Hydrogen) is Google's default AI model powering **Google Search AI Mode (`udm=50`)** globally as well as complex multi-part **AI Overviews**. Powered by *Query Fan-Out* technology, Google Hydrogen runs multiple background sub-queries simultaneously to synthesize comprehensive conversational answers, structured comparison tables, and rich citation cards.

**Google Hydrogen AI Mode & Search Scraper** automates querying and capturing these live generative responses across any keyword, prompt, country, or language. It handles warm-session navigation into `udm=50`, waits for asynchronous streaming (`/async/folif` & `/async/folwr`) to complete, preserves organic SERP results as fallback data, and outputs clean plain text, structured GitHub-flavored Markdown (including tables), resolved citation URLs, and suggested follow-up prompts.

***

### Key Features & Capabilities

- **Dedicated Google Hydrogen AI Mode (`udm=50`) Extraction:** Warm-starts on standard Google Search to validate session challenges cleanly, then transitions directly into Google Hydrogen conversational AI Mode (`udm=50`).
- **Async Streaming Stabilization:** Automatically monitors Google's `/async/folif` and `/async/folwr` streaming render cycle until the full Hydrogen synthesis and citation pills finish loading.
- **Comparison Tables & Structured Markdown:** Converts Google Hydrogen's dynamic HTML comparison tables (`<table>`), headings, paragraphs, and bullet lists into clean, LLM-ready Markdown.
- **Query Fan-Out Citation & Backlink Mapping:** Extracts inline citation pills and right-hand/bottom source cards, stripping `/url?q=` redirect wrappers to expose clean destination URLs and publisher domains.
- **Follow-Up Prompts Capture:** Collects interactive follow-up questions generated by Gemini 4 Hydrogen to map conversational search journeys.
- **Organic SERP Pre-Capture & AI Overview Fallback:** Captures standard organic SERP listings *before* switching into `udm=50` and falls back seamlessly to SERP AI Overviews when `udm=50` is unavailable for a specific query or region.
- **Global Geo & Language Targeting:** Supports any ISO 3166-1 alpha-2 country code (`countryCode`) and interface language (`languageCode`).

***

### Why Use It? (GEO, AEO & SEO Use Cases)

| Use Case | Benefit |
|---|---|
| **Generative Engine Optimization (GEO / AEO)** | Track whether your brand, website, or product is cited by **Google Hydrogen** inside Google Search AI Mode (`udm=50`). |
| **Query Fan-Out Citation Auditing** | Discover which competitor pages and authoritative domains Google Hydrogen pulls into its multi-query synthesis. |
| **Comparison Table & Product Visibility** | Extract structured comparison tables generated by Gemini 4 Hydrogen for commercial and software comparison prompts. |
| **RAG & AI Agent Grounding** | Feed real-time, web-grounded Google Hydrogen Markdown syntheses and citations directly into AI workflows and knowledge bases. |
| **Brand Reputation & Fact Monitoring** | Audit how Google's latest Search AI model describes your brand, pricing, features, and alternatives across markets. |

***

### Input Parameters

Configure the Actor via the Apify Console UI or JSON API payload:

| Field | Type | Required | Description | Default |
|---|---|:---:|---|---|
| `queries` | Array of strings | No\* | List of keywords, questions, or complex prompts to run in Google Hydrogen AI Mode (`udm=50`). | `["what is generative engine optimization", "how does google hydrogen gemini 4 ai mode work"]` |
| `searchUrls` | Array of strings | No\* | Direct Google search URLs with custom parameters or explicit `udm=50` views. | `[]` |
| `forceAiMode` | Boolean | No | Activates Google's conversational AI Mode (`udm=50`) powered by Gemini 4 Hydrogen, with fallback to standard AI Overview. | `true` |
| `countryCode` | String | No | Two-letter ISO 3166-1 alpha-2 country code for localized results (e.g., `US`, `GB`, `ES`, `DE`, `FR`, `MX`, `CA`). | `"US"` |
| `languageCode` | String | No | Language code for interface and responses (e.g., `en`, `es`, `de`, `fr`, `pt`). | `"en"` |
| `includeFollowUps` | Boolean | No | Captures suggested follow-up questions generated by Google Hydrogen AI Mode. | `true` |
| `includeOrganicFallback` | Boolean | No | Extracts organic SERP listings from the initial search page alongside or as fallback to AI Mode. | `true` |
| `maxOrganicResults` | Integer | No | Maximum number of organic search listings to extract per query (`0` to `50`). | `5` |
| `proxyConfiguration` | Object | No | Proxy settings. Apify Residential proxies (`RESIDENTIAL`) are strongly recommended. | Apify Residential |
| `maxConcurrency` | Integer | No | Maximum simultaneous search requests (`1` to `10`). Recommended: `1`–`2`. | `1` |

*\* Provide at least one item in `queries` or one URL in `searchUrls`.*

#### Example Input

```json
{
  "queries": [
    "what is generative engine optimization",
    "compare best enterprise crm software 2026"
  ],
  "forceAiMode": true,
  "countryCode": "US",
  "languageCode": "en",
  "includeFollowUps": true,
  "includeOrganicFallback": true,
  "maxOrganicResults": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  },
  "maxConcurrency": 1
}
```

***

### Output Data Structure

Extracted records are stored in the default Apify Dataset and exposed via the Actor Output Schema views (`overview` and `detailed`) and direct JSON export.

#### Dataset Fields

- **`query`**: The searched keyword, question, or prompt.
- **`searchUrl`**: The final Google Search URL executed (including `&udm=50` when AI Mode is active).
- **`forceAiMode`**: Whether Google Hydrogen AI Mode (`udm=50`) was requested.
- **`hasAiAnswer`**: Boolean (`true` if a generative AI response was extracted).
- **`aiModeStatus`**:
  - `GENERATED`: AI answer successfully synthesized and extracted.
  - `NOT_PRESENT`: Query did not trigger an AI Mode or AI Overview answer.
  - `GENERATE_BUTTON_FOUND`: Interactive trigger detected.
  - `ERROR`: Extraction or request failure after retries.
- **`aiModel`**: Identified engine label (`"Gemini 4 Hydrogen (AI Mode udm=50)"`, `"Gemini 4 Hydrogen (AI Overview)"`, or `null`).
- **`responseMode`**: Exact extraction mode (`"AI_MODE_UDM50"`, `"AI_OVERVIEW"`, or `"NONE"`).
- **`answerSummary`**: Concise preview summary of the AI response (up to 250 characters).
- **`answerText`**: Clean plain-text version of the complete response.
- **`answerMarkdown`**: Full structured Markdown output preserving headings (`###`), bullet lists (`- `), and comparison tables (`| Col | Col |`).
- **`citationsCount`**: Total count of unique cited sources extracted.
- **`citations`**: Array of source objects (`position`, `title`, `url`, `domain`, `snippet`).
- **`followUpQuestions`**: Array of interactive follow-up prompts suggested by Google Hydrogen.
- **`organicResults`**: Array of standard organic SERP listings (`position`, `title`, `url`, `domain`, `snippet`).
- **`countryCode`**: Target country code used.
- **`languageCode`**: Target language code used.
- **`scrapedAt`**: ISO 8601 timestamp.
- **`errorMessage`**: Error details if `aiModeStatus` is `ERROR`.

#### Example Output: Google Hydrogen AI Mode (`udm=50`)

```json
{
  "query": "what is generative engine optimization",
  "searchUrl": "https://www.google.com/search?q=what+is+generative+engine+optimization&hl=en&gl=us&udm=50",
  "forceAiMode": true,
  "countryCode": "US",
  "languageCode": "en",
  "scrapedAt": "2026-11-16T10:00:00.000Z",
  "hasAiAnswer": true,
  "aiModeStatus": "GENERATED",
  "aiModel": "Gemini 4 Hydrogen (AI Mode udm=50)",
  "responseMode": "AI_MODE_UDM50",
  "answerSummary": "Generative Engine Optimization (GEO) is the practice of structuring digital content so AI search models like Google Hydrogen (Gemini 4) retrieve, synthesize, and cite your brand in conversational answers...",
  "answerText": "Generative Engine Optimization (GEO) is the practice of structuring digital content so AI search models like Google Hydrogen (Gemini 4) retrieve, synthesize, and cite your brand in conversational answers.",
  "answerMarkdown": "Generative Engine Optimization (GEO) is the practice of structuring digital content so AI search models like Google Hydrogen (Gemini 4) retrieve, synthesize, and cite your brand in conversational answers.\n\n### Core GEO Strategies\n\n- **Query Fan-Out Coverage**: Answer related sub-questions directly.\n- **Structured Comparison Data**: Publish clean tables and verifiable metrics.\n\n| Dimension | Traditional SEO | GEO (Google Hydrogen) |\n| --- | --- | --- |\n| Primary Goal | Blue-link rankings | Synthesis & citations |\n| Key Signal | Backlinks & keywords | Entity authority & clarity |",
  "citationsCount": 2,
  "citations": [
    {
      "position": 1,
      "title": "Generative Engine Optimization Guide for Google AI Mode",
      "url": "https://searchengineland.com/geo-guide-google-ai-mode",
      "domain": "searchengineland.com",
      "snippet": "How Google Hydrogen query fan-out selects authoritative web citations."
    },
    {
      "position": 2,
      "title": "Optimizing Content for Gemini 4 Hydrogen Search",
      "url": "https://searchenginejournal.com/gemini-4-hydrogen-seo",
      "domain": "searchenginejournal.com"
    }
  ],
  "followUpQuestions": [
    "How does Google Hydrogen query fan-out choose citations?",
    "What schema markup helps visibility in udm=50 AI Mode?"
  ],
  "organicResults": [
    {
      "position": 1,
      "title": "What Is Generative Engine Optimization (GEO)?",
      "url": "https://example.com/what-is-geo",
      "domain": "example.com",
      "snippet": "A complete overview of optimizing brand visibility in generative search engines."
    }
  ]
}
```

***

### Best Practices for Consistent Results

1. **Always Use Residential Proxies:** Google protects `udm=50` aggressively against datacenter IPs. Configure `RESIDENTIAL` proxies in `proxyConfiguration` and match the proxy country to `countryCode` for authentic geo-localized Google Hydrogen results.
2. **Keep Concurrency Low (`1`–`2`):** Because AI Mode performs live streaming generation per query, keeping `maxConcurrency` between `1` and `2` reduces `/sorry/` CAPTCHA triggers and session retries.
3. **Informational & Comparative Prompts:** Google Hydrogen AI Mode (`udm=50`) delivers the richest multi-source syntheses and Markdown comparison tables on informational, multi-part, and comparative queries.

# Actor input Schema

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

List of keywords, questions, or complex prompts to execute in Google Hydrogen (Gemini 4 Hydrogen) AI Mode (udm=50). Example: 'what is generative engine optimization' or 'compare top enterprise CRM tools'.

## `searchUrls` (type: `array`):

Optional list of full Google search URLs. Useful if you want to pass custom parameters, filters, or direct udm=50 views.

## `forceAiMode` (type: `boolean`):

Directly activates Google's conversational AI Mode (udm=50) powered by Gemini 4 Hydrogen, with warm-session fallback to standard AI Overview if unavailable.

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

Two-letter country code (ISO 3166-1 alpha-2) used for localization and proxy routing (e.g., 'US', 'GB', 'ES', 'DE', 'FR', 'MX', 'CA').

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

Interface and response language code for Google Hydrogen AI Mode (e.g., 'en' for English, 'es' for Spanish, 'de' for German, 'fr' for French, 'pt' for Portuguese).

## `includeFollowUps` (type: `boolean`):

Captures interactive follow-up prompts and suggested conversational threads generated by Google Hydrogen AI Mode.

## `includeOrganicFallback` (type: `boolean`):

Extracts standard organic search results from the initial SERP alongside or as a fallback to Google Hydrogen AI Mode.

## `maxOrganicResults` (type: `integer`):

Maximum number of organic search listings to extract per query.

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

Residential proxies are strongly recommended to ensure consistent access to Google Hydrogen AI Mode (udm=50) and bypass anti-bot challenges.

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

Maximum number of concurrent search requests. Keep it at 1-2 when using residential proxies to avoid rate limits.

## Actor input object example

```json
{
  "queries": [
    "what is generative engine optimization",
    "how does google hydrogen gemini 4 ai mode work"
  ],
  "forceAiMode": true,
  "countryCode": "US",
  "languageCode": "en",
  "includeFollowUps": true,
  "includeOrganicFallback": true,
  "maxOrganicResults": 5,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 1
}
```

# Actor output Schema

## `overviewResults` (type: `string`):

Summary table view of queries, AI model status, answer summaries, and citation counts.

## `detailedResults` (type: `string`):

Comprehensive view containing full Google Hydrogen Markdown responses, comparison tables, cited source URLs, and follow-up questions.

## `jsonExport` (type: `string`):

Direct JSON endpoint to download all extracted Google Hydrogen AI Mode search results.

# 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": [
        "what is generative engine optimization",
        "how does google hydrogen gemini 4 ai mode work"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("egsand/google-hydrogen-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": [
        "what is generative engine optimization",
        "how does google hydrogen gemini 4 ai mode work",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("egsand/google-hydrogen-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": [
    "what is generative engine optimization",
    "how does google hydrogen gemini 4 ai mode work"
  ]
}' |
apify call egsand/google-hydrogen-ai-mode-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,egsand/google-hydrogen-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/w66XUXGqI352pQr9L/builds/bbvgY7mG5xSRgIFoj/openapi.json
