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

# Scrape a Google AI Mode answer

> Asks Google AI Mode (the `udm=50` AI Mode tab, not the AI Overview on a results page) the question `q` and returns its full answer as JSON: `answer.text` (plain text), `answer.markdown` and `answer.blocks` (paragraphs, headings, lists, tables and code, in order), `references` (the pages the answer cites: `title`, `url`, `domain`, `source`, `snippet`), `links` (links written into the answer text) and `followUps` (the follow-up questions Google closes the answer with, if any). Set `proxy_country` to ask from a market - the Google market (`gl`) follows it - and `hl` for the answer's language. Answers differ between identical requests, as they do for a person.



## OpenAPI

````yaml /api-reference/openapi.json post /search/google-ai-mode
openapi: 3.1.0
info:
  title: ScrapeUnblocker API
  description: >-
    Public API for the ScrapeUnblocker proxy/anti-bot service. Authenticate
    every request with the `x-scrapeunblocker-key` header. Documented here:
    page-source extraction, Google SERP scraping, image fetch, and the dedicated
    plugin endpoints (search engines, marketplaces, reviews, travel, social and
    more). All other paths exist for internal operations and are intentionally
    hidden from this spec.
  version: 3.0.0
servers:
  - url: https://api.scrapeunblocker.com
    description: Production
security: []
paths:
  /search/google-ai-mode:
    post:
      tags:
        - Plugins
      summary: Scrape a Google AI Mode answer
      description: >-
        Asks Google AI Mode (the `udm=50` AI Mode tab, not the AI Overview on a
        results page) the question `q` and returns its full answer as JSON:
        `answer.text` (plain text), `answer.markdown` and `answer.blocks`
        (paragraphs, headings, lists, tables and code, in order), `references`
        (the pages the answer cites: `title`, `url`, `domain`, `source`,
        `snippet`), `links` (links written into the answer text) and `followUps`
        (the follow-up questions Google closes the answer with, if any). Set
        `proxy_country` to ask from a market - the Google market (`gl`) follows
        it - and `hl` for the answer's language. Answers differ between
        identical requests, as they do for a person.
      operationId: google_ai_mode_search_google_ai_mode_post
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
            description: >-
              The question to ask Google AI Mode, e.g. 'how to learn python
              fast'.
            title: Q
          description: The question to ask Google AI Mode, e.g. 'how to learn python fast'.
        - name: proxy_country
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Proxy country the request is sent from (ISO-2, e.g. 'US', 'DE').
              The Google market (`gl`) follows it unless `gl` is set.
            title: Proxy Country
          description: >-
            Proxy country the request is sent from (ISO-2, e.g. 'US', 'DE'). The
            Google market (`gl`) follows it unless `gl` is set.
        - name: gl
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Optional Google market override (ISO-2, e.g. 'us', 'de'). Default:
              `proxy_country`, else 'us'.
            title: Gl
          description: >-
            Optional Google market override (ISO-2, e.g. 'us', 'de'). Default:
            `proxy_country`, else 'us'.
        - name: hl
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Language Google answers in, e.g. 'en', 'de', 'pt-BR'. Default
              'en'.
            title: Hl
          description: Language Google answers in, e.g. 'en', 'de', 'pt-BR'. Default 'en'.
      responses:
        '200':
          description: JSON with the answer, its references and links.
          content:
            application/json:
              schema: {}
        '400':
          description: Invalid parameters (plain-text message).
        '403':
          description: Blocked by Google CAPTCHA after retries - try another proxy_country.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: >-
            No complete AI Mode answer (upstream block, the answer did not
            finish streaming, or the call did not finish in time). Not billed.
        '503':
          description: >-
            No proxy exit was free for this market - retry or pick another
            proxy_country.
      security:
        - ScrapeUnblockerKey: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ScrapeUnblockerKey:
      type: apiKey
      in: header
      name: x-scrapeunblocker-key
      description: Your ScrapeUnblocker API key. Apply on every request.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.