# Google AI Mode Search (POST)

> Google AI Mode Search (POST) is a paid API for AI agents from agents.openwebninja.com, paid per call via MPP, price unknown, status unknown (last checked 2026-10-14).

Sends a prompt to Google's AI Mode and returns a structured, multi-part AI-generated answer with reference links, supporting multi-turn conversation and PDF attachments.

## Facts

- Endpoint: POST https://agents.openwebninja.com/realtime-web-search/ai-mode?utm_source=zero.xyz
- Price: price unknown
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Provider: agents.openwebninja.com
- Website: https://agents.openwebninja.com
- Canonical page: https://www.zero.xyz/c/agents-openwebninja-com-google-ai-mode-search-post-d06a9c55
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SlhS0a3XXPmFkscdS35gz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agents-openwebninja-com-google-ai-mode-search-post-d06a9c55 -d '<json body>'
```

Example prompt: Ask Google AI Mode: what are the best practices for securing a Node.js REST API in 2024? I want a structured answer with sources, searching from the United States in English.

## When to prefer this

Choose this endpoint when you need AI-synthesized answers from Google's AI Mode with structured output (not raw search results), especially for long or complex prompts where URL length limits would be a concern. Prefer this over the GET variant for prompts exceeding typical URL length limits, when attaching PDF documents, or when maintaining multi-turn conversation state via session tokens. Choose over generic web scraping endpoints when you need synthesized, citation-backed AI answers rather than raw HTML. Use when location-specific or language-specific AI Mode results are needed.

## Known failure modes

- Missing required 'prompt' field returns a 400 validation error
- Prompt too long or malformed JSON returns a 400 error
- Combining both 'location' and 'uule' parameters returns an error (mutually exclusive)
- More than 5 PDF attachments or files exceeding 10 MB each are rejected
- Image attachments (non-PDF) are unsupported and rejected
- Invalid session_token causes conversation context to be lost or returns an error
- Upstream Google AI Mode unavailability returns a 5xx error
- Invalid country code (gl) or language code (hl) may return unexpected or empty results
- Insufficient credits/payment results in a 402 Payment Required response

## How this service works

Send a prompt/query and get structured results and reference links from Google's AI Mode. POST variant of the AI Mode endpoint - accepts the same parameters in a JSON request body, with no URL length limit (recommended for long prompts).

## Output

Returns a structured object containing sequenced reply fragments (paragraphs, headings, ordered/unordered lists, and images) composing the AI-generated answer, plus an array of reference links with titles, URLs, source names, and publication dates. Also includes a session_token for continuing the conversation in follow-up requests, a request_id, and status/parameter echo fields.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "prompt"
 ],
 "properties": {
  "gl": {
   "type": "string",
   "default": "us",
   "example": "us",
   "description": "The country / region for which to make the query. 2-letter country code, see ISO 3166-1 alpha-2."
  },
  "hl": {
   "type": "string",
   "default": "en",
   "example": "en",
   "description": "The language to use for the search (Google's hl parameter). 2-letter country code, see ISO 639-1 alpha-2."
  },
  "tbs": {
   "type": "string",
   "nullable": true,
   "description": "This parameter defines advanced search parameters that aren't available using regular query parameters (to be searched)."
  },
  "uule": {
   "type": "string",
   "nullable": true,
   "description": "Google's own encoded location string (e.g. w+CAIQICIgU2VhdHRsZSxXYXNoaW5ndG9uLFVuaXRlZCBTdGF0ZXM=), passed to Google as is. Use it instead of location when you already generate uule values. Cannot be combined with location."
  },
  "query": {
   "type": "string"
  },
  "prompt": {
   "type": "string",
   "example": "How to make a pizza step by step?",
   "description": "AI Mode prompt."
  },
  "location": {
   "type": "string",
   "nullable": true,
   "description": "Where the AI Mode search originates from, for location-dependent prompts such as local businesses, weather or events. Recommended to specify at city level to simulate a real user's search (e.g. London, England, United Kingdom). See https://openwebninja.s3.us-east-1.amazonaws.com/locations.json for the list of supported locations. Cannot be combined with uule."
  },
  "attachments": {
   "type": "array",
   "items": {
    "type": "string"
   },
   "example": [
    "https://pdfobject.com/pdf/sample.pdf"
   ],
   "nullable": true,
   "description": "Optional list of document URLs (PDF) to attach to the prompt, as plain URL strings. Up to 5 files, 10 MB each. Images are not supported. Attaching one or more documents is charged a flat 1 extra request credit."
  },
  "session_token": {
   "type": "string",
   "nullable": true,
   "description": "Specify a session token from previous AI Mode response to continue the chat from the same point (preserving history in context for continuous conversation)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "status",
  "request_id",
  "parameters",
  "data"
 ],
 "properties": {
  "data": {
   "type": "object",
   "required": [
    "reply_parts",
    "reference_links"
   ],
   "properties": {
    "reply_parts": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "type"
      ],
      "properties": {
       "list": {
        "type": "array",
        "items": {
         "type": "object",
         "properties": {
          "text": {
           "type": "string",
           "description": "Item body text."
          },
          "title": {
           "type": "string",
           "nullable": true,
           "description": "Bold label preceding the item text, when present."
          }
         }
        },
        "nullable": true,
        "description": "Items of a list fragment."
       },
       "text": {
        "type": "string",
        "nullable": true,
        "description": "Text content of paragraph/heading fragments."
       },
       "type": {
        "type": "string",
        "description": "Fragment kind. Values: paragraph, heading, list, images."
       },
       "images": {
        "type": "array",
        "items": {
         "type": "object",
         "required": [
          "url"
         ],
         "properties": {
          "url": {
           "type": "string",
           "description": "Image URL."
          },
          "label": {
           "type": "string",
           "nullable": true,
           "description": "Image alt text / caption."
          },
          "width": {
           "type": "integer",
           "nullable": true,
           "description": "Image width in pixels."
          },
          "height": {
           "type": "integer",
           "nullable": true,
           "description": "Image height in pixels."
          }
         }
        },
        "nullable": true,
        "description": "Images carried by an images fragment."
       },
       "ordered": {
        "type": "boolean",
        "nullable": true,
        "description": "Whether a list fragment is ordered (numbered)."
       }
      }
     },
     "description": "Sequenced fragments composing the AI Mode reply (paragraphs, headings, lists, images)."
    },
    "session_token": {
     "type": "string",
     "nullable": true,
     "description": "Token to pass back as session_token on a follow-up request to continue this conversation. Null when the upstream did not surface one."
    },
    "
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agents-openwebninja-com-google-ai-mode-search-post-d06a9c55/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.openwebninja.com](https://www.zero.xyz/host/agents.openwebninja.com/llms.txt)
