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

# Ask Google Gemini and get its answer and cited sources

> Asks Google Gemini (gemini.google.com, signed out) one question and returns `answer` (plain text) and `answerMarkdown`, `citations` (pages cited inline: `position`, `title`, `url`, `domain`, `siteName`, `description`, `citedText` - the answer sentences that page backs - and `firstCitedAt`, the character offset of the first of them), `sources` (pages Gemini consulted when it searched the web: `position`, `title`, `url`, `domain`), `webSearch` (whether it searched the web), `followUpPrompts` (`label`, `prompt`), `richBlocks` (cards Gemini drew that have no text, e.g. a sports score or image strip, left out of the answer), `model` (the model label the app shows), `location` and `locationCountry` (where Gemini placed the visitor), `complete` and `conversationId`. `country` asks from that country. Answers vary between identical calls, as they do for people. One unit per call.



## OpenAPI

````yaml /api-reference/openapi.json post /ai/gemini
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:
  /ai/gemini:
    post:
      tags:
        - Plugins
      summary: Ask Google Gemini and get its answer and cited sources
      description: >-
        Asks Google Gemini (gemini.google.com, signed out) one question and
        returns `answer` (plain text) and `answerMarkdown`, `citations` (pages
        cited inline: `position`, `title`, `url`, `domain`, `siteName`,
        `description`, `citedText` - the answer sentences that page backs - and
        `firstCitedAt`, the character offset of the first of them), `sources`
        (pages Gemini consulted when it searched the web: `position`, `title`,
        `url`, `domain`), `webSearch` (whether it searched the web),
        `followUpPrompts` (`label`, `prompt`), `richBlocks` (cards Gemini drew
        that have no text, e.g. a sports score or image strip, left out of the
        answer), `model` (the model label the app shows), `location` and
        `locationCountry` (where Gemini placed the visitor), `complete` and
        `conversationId`. `country` asks from that country. Answers vary between
        identical calls, as they do for people. One unit per call.
      operationId: gemini_ai_gemini_post
      parameters:
        - name: prompt
          in: query
          required: true
          schema:
            type: string
            description: >-
              The question to ask Gemini, as a user would type it, e.g. 'best
              CRM for small business' (max 4000 characters). Each call starts a
              new conversation.
            title: Prompt
          description: >-
            The question to ask Gemini, as a user would type it, e.g. 'best CRM
            for small business' (max 4000 characters). Each call starts a new
            conversation.
        - name: country
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Two-letter country code to ask from, e.g. US, GB, DE. Gemini
              answers for where it locates the visitor (local results, currency,
              language defaults); `locationCountry` in the answer says where it
              placed this call. Leave blank for any European location.
            title: Country
          description: >-
            Two-letter country code to ask from, e.g. US, GB, DE. Gemini answers
            for where it locates the visitor (local results, currency, language
            defaults); `locationCountry` in the answer says where it placed this
            call. Leave blank for any European location.
      responses:
        '200':
          description: JSON with Gemini's answer and its sources.
          content:
            application/json:
              schema: {}
        '400':
          description: Invalid parameters.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: >-
            Gemini refused every attempt, gave no answer, or did not answer in
            time.
      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.