{"uid":"cap_6RUaH04Jz-IdDwbvb7m_W","slug":"agents-openwebninja-com-google-ai-mode-search-post-865e967a","name":"Google AI Mode Search (POST)","description":"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). Each request consumes 2 request credits.","url":"https://agents.openwebninja.com/realtime-web-search/v2/ai-mode?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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)."}}},"responseSchema":{"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."},"reference_links":{"type":"array","items":{"type":"object","required":["title","link"],"properties":{"date":{"type":"string","nullable":true,"description":"Publication date of the cited page, when present."},"link":{"type":"string","description":"URL of the cited page."},"title":{"type":"string","description":"Title of the cited page."},"source":{"type":"string","nullable":true,"description":"Publisher / source label."},"favicon":{"type":"string","nullable":true,"description":"Favicon URL of the cited page."},"snippet":{"type":"string","nullable":true,"description":"Short excerpt of the cited page."}}},"description":"Citation links referenced by the AI Mode reply."}}},"status":{"type":"string","description":"The status of the API response."},"parameters":{"type":"object","properties":{"gl":{"type":"string","description":"ISO 3166-1 alpha-2 country code used for the search."},"hl":{"type":"string","description":"ISO 639 language code used for the search."},"tbs":{"type":"string","nullable":true,"description":"Advanced Google search parameter (tbs) as received (only when explicitly passed)."},"uule":{"type":"string","nullable":true,"description":"Google uule location string as received (only when explicitly passed)."},"prompt":{"type":"string","description":"The AI Mode prompt as received."},"location":{"type":"string","nullable":true,"description":"Search origin location as received (only when explicitly passed)."},"session_token":{"type":"string","nullable":true,"description":"Session token as received (only when explicitly passed to continue a conversation)."}},"description":"The parameters the API received and used for this request, echoed back."},"request_id":{"type":"string","description":"A unique ID to trace the API request."}}},"example":null,"exampleRequest":null,"tags":[],"displayCostAmount":"unknown","displayCostAsset":"USD","priceDynamic":true,"priceHint":null,"priceStatus":"unprobed","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"unknown","summary":"price unknown","primary":{"kind":"dynamic","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"},"accepted":[{"kind":"dynamic","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"}]},"paymentMethods":[{"uid":"pm_UqYFjL0gbuNhYRz4O_Otq","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"unknown","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":"agents.openwebninja.com","brandSlug":"agents-openwebninja-com-x402","brandBaseUrl":"https://agents.openwebninja.com","brandDocsUrl":null,"whatItDoes":"Submits a prompt to Google's AI Mode and returns a structured, multi-part AI-generated answer with reference links and optional session continuity for follow-up questions.","exampleAgentPrompt":"Ask Google's AI Mode: 'What are the pros and cons of heat pumps versus gas furnaces for home heating?' and give me the full structured answer with all the source links it cites.","exampleUseCases":[{"title":"Step-by-step recipe with sources","prompt":"Use Google AI Mode to explain how to make sourdough bread from scratch step by step — I want the full AI answer broken into sections with all the reference links."},{"title":"Local business research by city","prompt":"Ask Google AI Mode about the best neighborhoods to open a coffee shop in Austin, Texas — I need a structured answer with citations, searching as if I'm located in Austin, TX, United States."},{"title":"PDF document Q&A with AI Mode","prompt":"Attach this PDF — https://pdfobject.com/pdf/sample.pdf — and ask Google AI Mode to summarize its key points and answer: what are the main conclusions of this document?"}],"resultDescription":"Returns a structured object containing: (1) reply_parts — an ordered array of content fragments (paragraphs, headings, numbered/bulleted lists, images) composing the full AI-generated answer; (2) reference_links — an array of cited source pages with title, URL, source name, and publication date; (3) a session_token for continuing the conversation in a subsequent request. Each fragment has a type field (paragraph, heading, list, images) and corresponding content fields.","failureModes":["Missing required 'prompt' field returns a 422 validation error","Prompt too long or attachment too large (>10MB) causes a request failure","Invalid session_token causes the conversation context to be lost or rejected","Unsupported location string returns a location resolution error or falls back to default","More than 5 PDF attachments causes a validation error","Combining 'location' and 'uule' parameters simultaneously returns a conflict error","Insufficient request credits (costs 2 per call, +1 per attachment) results in a 402 payment required","Google AI Mode unavailability or rate limits may cause upstream errors"],"whenToPreferThis":"Choose this endpoint when you need AI-synthesized, multi-part answers from Google's AI Mode rather than raw search result lists — especially for complex, multi-step questions, long prompts (POST avoids URL length limits), document-grounded Q&A with PDF attachments, location-specific queries, or multi-turn conversational search sessions. Prefer this over standard web search APIs when you need structured reply fragments (headings, lists, paragraphs) with cited sources, not just a list of blue links.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-14T00:35:52.274Z","isFirstParty":false,"canonicalSlug":"agents-openwebninja-com-google-ai-mode-search-post-69308376"}