> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapellm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Google AI Mode

> Extract structured data from Google AI Mode - the AI answer panel in Google Search - including citations and organic search results as clean JSON.

<Info>
  **AI answer + organic results together**

  This is the only scraper that returns both the AI-generated answer and the traditional organic search results shown on the same page - giving you a complete picture of Google Search visibility.
</Info>

## Overview

Use this endpoint to monitor your brand's presence in Google's AI Overviews, track which sources Google cites in its AI answers, and compare AI citation coverage against traditional organic rankings - all from a single request.

## Unique features

* **Organic search results**: Traditional Google search results returned alongside the AI answer
* **AI citations with thumbnails**: Each cited source includes a thumbnail image URL and favicon
* **Raw URL capture**: The underlying Google Search URL used to generate the response

## Example request

<CodeGroup>
  ```bash cURL theme={null}
  # Streaming can take up to 300s - --max-time matches the server timeout
  curl --max-time 300 \
    -G "https://api.scrapellm.com/scrapers/google-ai-mode" \
    --data-urlencode "api_key=YOUR_API_KEY" \
    --data-urlencode "prompt=What brands do marketers recommend for email automation?" \
    --data-urlencode "country=US"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.scrapellm.com/scrapers/google-ai-mode",
      headers={"X-API-Key": "YOUR_API_KEY"},
      params={
          "prompt": "What brands do marketers recommend for email automation?",
          "country": "US",
      }
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const params = new URLSearchParams({
    prompt: "What brands do marketers recommend for email automation?",
    country: "US",
  });

  const response = await fetch(
    `https://api.scrapellm.com/scrapers/google-ai-mode?${params}`,
    { headers: { "X-API-Key": "YOUR_API_KEY" } }
  );
  const data = await response.json();
  ```
</CodeGroup>

## Response schema

Includes [common response fields](/guides/making-requests#common-response-fields) plus:

| Field                           | Type    | Description                                                      |
| ------------------------------- | ------- | ---------------------------------------------------------------- |
| `result`                        | string  | Plain-text AI-generated answer                                   |
| `result_markdown`               | string  | Markdown-formatted AI answer                                     |
| `citations`                     | array   | Sources cited in the AI answer                                   |
| `citations[].title`             | string  | Article title of the cited page                                  |
| `citations[].url`               | string  | URL of the cited source                                          |
| `citations[].snippet`           | string  | Text excerpt from the source page                                |
| `citations[].website_name`      | string  | Human-readable site name                                         |
| `citations[].thumbnail`         | string  | Thumbnail image URL (nullable)                                   |
| `citations[].favicon`           | string  | Site favicon URL                                                 |
| `search_results`                | array   | Traditional organic search results shown alongside the AI answer |
| `search_results[].title`        | string  | Page title of the organic result                                 |
| `search_results[].url`          | string  | URL of the organic result                                        |
| `search_results[].snippet`      | string  | Search result snippet                                            |
| `search_results[].website_name` | string  | Site name                                                        |
| `search_results[].thumbnail`    | string  | Thumbnail image URL (nullable)                                   |
| `raw_url`                       | string  | The Google Search URL used to generate the response              |
| `credits_used`                  | integer | Credits consumed - always `3` for Google AI Mode                 |
| `elapsed_ms`                    | float   | End-to-end request duration in milliseconds                      |
| `cached`                        | boolean | `true` if served from cache                                      |

## Common questions

### What is the difference between Google AI Mode and Gemini?

Google AI Mode is the AI answer panel shown within Google Search results on google.com. Gemini is Google's standalone AI assistant at gemini.google.com. They use different models, different citation sources, and serve different user intents. Run both for full Google AI coverage.

### Are organic search results always present?

No - organic results are only included when Google shows them on the same page as the AI answer. For some queries Google shows only the AI panel; for others it shows both. Check `search_results.length` before processing.

### Can I use this for AI Overview monitoring?

Yes. Google AI Mode is the same surface as Google's AI Overviews. This endpoint captures both the AI answer and the citations, making it the primary tool for AI Overview brand monitoring.


## OpenAPI

````yaml GET /scrapers/google_ai_mode
openapi: 3.1.0
info:
  title: ScrapeLLM — Google AI Mode Scraper
  version: 1.0.0
  description: >
    Scrape the real Google AI Mode search interface via ScrapeLLM's browser
    pool. Returns

    the full response — including the AI-generated answer, rich citations with
    snippets and

    favicons, and the supporting organic search results — as structured JSON.


    **Base URL:** `https://api.scrapellm.com`


    **Credits:** 3 per request · 500 free credits · No credit card required


    Get your API key at [scrapellm.com/signup](https://scrapellm.com/signup).
  contact:
    email: hello@scrapellm.com
    url: https://scrapellm.com
  license:
    name: ScrapeLLM Terms of Service
    url: https://scrapellm.com/terms
servers:
  - url: https://api.scrapellm.com
    description: Production
security:
  - ApiKeyHeader: []
  - ApiKeyQuery: []
tags:
  - name: Google AI Mode Scraper
    description: Submit queries to Google AI Mode and receive structured responses.
paths:
  /scrapers/google_ai_mode:
    get:
      tags:
        - Google AI Mode Scraper
      summary: Send a Google AI Mode Scraping Request
      description: >
        Send a query to Google AI Mode via a pool of real browsers and get the
        full response

        as structured JSON. Blocks until Google AI Mode responds or `timeout` is
        reached.


        The response combines two distinct data sets in a single call:

        - **`citations`** — sources referenced within the AI-generated answer

        - **`search_results`** — traditional organic results shown below the AI
        answer


        These two sets often differ, which is a key insight for AI SEO strategy.


        **Country restrictions** — JP and TW are not supported.


        **Authentication** — pass your API key via the `X-API-Key` header or as
        `?api_key=`

        in the URL.
      operationId: scrapeGoogleAIMode
      parameters:
        - name: prompt
          in: query
          required: true
          description: The query to send to Google AI Mode. Maximum 4,000 characters.
          schema:
            type: string
            minLength: 1
            maxLength: 4000
          example: Best running shoes 2026
        - name: country
          in: query
          required: false
          description: >
            ISO 3166-1 alpha-2 country code. Routes the request through
            infrastructure in

            that region for localised responses. JP and TW are not supported.
            Defaults to `US`.
          schema:
            type: string
            minLength: 2
            maxLength: 2
            default: US
          example: US
        - name: bypass_cache
          in: query
          required: false
          description: Skip the response cache and always fetch a fresh result.
          schema:
            type: boolean
            default: false
        - name: timeout
          in: query
          required: false
          description: >-
            Maximum seconds to wait for Google AI Mode to respond. Must be
            between 10 and 600.
          schema:
            type: number
            format: float
            minimum: 10
            maximum: 600
            default: 300
      responses:
        '200':
          description: Scrape completed successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoogleAIModeScrapeResponse'
              example:
                scraper: google_ai_mode
                status: done
                job_id: job_abc123
                prompt: What brands do marketers recommend for email automation?
                country: US
                result: >-
                  Marketers commonly recommend Mailchimp, HubSpot, and
                  Klaviyo...
                result_markdown: >-
                  Marketers commonly recommend **Mailchimp**, **HubSpot**, and
                  **Klaviyo**...
                citations:
                  - title: Best Email Marketing Platforms 2025
                    url: https://example.com/email-marketing
                    snippet: >-
                      We tested 12 tools across deliverability, automation, and
                      pricing...
                    website_name: Marketing Weekly
                    thumbnail: https://example.com/thumbnail.jpg
                    favicon: https://example.com/favicon.ico
                search_results:
                  - title: Top Email Automation Tools — Comparison Guide
                    url: https://example.com/comparison
                    snippet: >-
                      A side-by-side look at the top email marketing
                      platforms...
                    website_name: TechReview
                    thumbnail: null
                raw_url: >-
                  https://www.google.com/search?q=What+brands+do+marketers+recommend+for+email+automation
                credits_used: 3
                elapsed_ms: 7318.6
                cached: false
                markdown_url: https://scrapellm.com/md/job_abc123.md
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: >-
                  Missing API key. Pass your key in the X-API-Key header or as
                  ?api_key= in the URL.
        '429':
          description: Credit limit reached or rate limit exceeded — retry shortly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Scraper returned an empty result — safe to retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: >-
            Google AI Mode execution failed on the upstream scraper — safe to
            retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Scraper pool is still warming up — retry in a few seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '504':
          description: Network timeout reaching the scraper machine.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: >
            # Streaming can take up to 300s - --max-time matches the server
            timeout

            curl --max-time 300 \
              -G "https://api.scrapellm.com/scrapers/google_ai_mode" \
              --data-urlencode "api_key=YOUR_API_KEY" \
              --data-urlencode "prompt=What brands do marketers recommend for email automation?" \
              --data-urlencode "country=US"
        - lang: Python
          label: Python
          source: |
            import requests

            response = requests.get(
                "https://api.scrapellm.com/scrapers/google_ai_mode",
                params={
                    "api_key": "YOUR_API_KEY",
                    "prompt": "What brands do marketers recommend for email automation?",
                    "country": "US",
                }
            )
            print(response.json())
        - lang: JavaScript
          label: JavaScript
          source: |
            const params = new URLSearchParams({
              api_key: "YOUR_API_KEY",
              prompt: "What brands do marketers recommend for email automation?",
              country: "US",
            });

            const response = await fetch(
              `https://api.scrapellm.com/scrapers/google_ai_mode?${params}`
            );
            const data = await response.json();
            console.log(data);
        - lang: TypeScript
          label: TypeScript
          source: |
            const params = new URLSearchParams({
              api_key: "YOUR_API_KEY",
              prompt: "What brands do marketers recommend for email automation?",
              country: "US",
            });

            const response = await fetch(
              `https://api.scrapellm.com/scrapers/google_ai_mode?${params}`
            );
            const data = await response.json();
            console.log(data);
components:
  schemas:
    GoogleAIModeScrapeResponse:
      type: object
      required:
        - scraper
        - status
        - job_id
        - prompt
        - country
        - result
        - credits_used
        - elapsed_ms
        - cached
      properties:
        scraper:
          type: string
          description: Always `"google_ai_mode"`.
          example: google_ai_mode
        status:
          type: string
          description: '`"done"` on success.'
          example: done
        job_id:
          type: string
          description: Unique identifier for this scrape job.
          example: job_abc123
        prompt:
          type: string
          description: The query that was submitted.
          example: What brands do marketers recommend for email automation?
        country:
          type: string
          description: The country the request was routed through.
          example: US
        result:
          type: string
          description: Plain-text AI-generated answer from Google AI Mode.
          example: Marketers commonly recommend Mailchimp, HubSpot, and Klaviyo...
        result_markdown:
          type: string
          nullable: true
          description: Markdown-formatted AI-generated answer.
          example: >-
            Marketers commonly recommend **Mailchimp**, **HubSpot**, and
            **Klaviyo**...
        citations:
          type: array
          description: >
            Sources directly referenced within the AI-generated answer. These
            are the pages

            that influenced what the AI said — distinct from `search_results`.
          items:
            $ref: '#/components/schemas/GoogleAIModeCitation'
        search_results:
          type: array
          description: >
            Traditional organic search results shown below the AI answer. Often
            different from

            `citations` — understanding that gap is a key AI SEO signal.
          items:
            $ref: '#/components/schemas/GoogleAIModeSearchResult'
        raw_url:
          type: string
          format: uri
          nullable: true
          description: The original Google search URL used to fetch this response.
          example: https://www.google.com/search?q=What+brands+do+marketers+recommend
        credits_used:
          type: integer
          description: Credits consumed by this request. Always `3` for Google AI Mode.
          example: 3
        elapsed_ms:
          type: number
          format: float
          description: Total end-to-end request duration in milliseconds.
          example: 7318.6
        cached:
          type: boolean
          description: '`true` if this response was served from cache.'
          example: false
        markdown_url:
          type: string
          nullable: true
          description: |
            Hosted `.md` URL for this response. Expires after 24 hours.
          example: https://scrapellm.com/md/job_abc123.md
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: Human-readable description of the error.
          example: Invalid API key.
    GoogleAIModeCitation:
      type: object
      required:
        - title
        - url
      properties:
        title:
          type: string
          description: Title of the cited page.
          example: Best Email Marketing Platforms 2025
        url:
          type: string
          format: uri
          description: Absolute URL of the cited source.
          example: https://example.com/email-marketing
        snippet:
          type: string
          nullable: true
          description: Excerpt from the cited page as shown in the AI answer.
          example: We tested 12 tools across deliverability, automation, and pricing...
        website_name:
          type: string
          nullable: true
          description: Human-readable site name (e.g. `"Wikipedia"`, `"Marketing Weekly"`).
          example: Marketing Weekly
        thumbnail:
          type: string
          format: uri
          nullable: true
          description: Thumbnail image URL from the cited page, if available.
          example: https://example.com/thumbnail.jpg
        favicon:
          type: string
          format: uri
          nullable: true
          description: Favicon URL for the cited domain.
          example: https://example.com/favicon.ico
    GoogleAIModeSearchResult:
      type: object
      required:
        - title
        - url
      properties:
        title:
          type: string
          description: Title of the organic search result page.
          example: Top Email Automation Tools — Comparison Guide
        url:
          type: string
          format: uri
          description: Absolute URL of the result.
          example: https://example.com/comparison
        snippet:
          type: string
          nullable: true
          description: Organic search snippet for this result.
          example: A side-by-side look at the top email marketing platforms...
        website_name:
          type: string
          nullable: true
          description: Human-readable site name.
          example: TechReview
        thumbnail:
          type: string
          format: uri
          nullable: true
          description: Thumbnail image URL if available.
          example: null
  securitySchemes:
    ApiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your ScrapeLLM API key passed in the request header.
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: Your ScrapeLLM API key passed as a query parameter.

````