{"uid":"cap_4Fp4ZY3X-jbQ1behQB0Xk","slug":"agents-openwebninja-com-google-ai-mode-search-post-69308376","name":"Google AI Mode Search (POST)","description":"Send a prompt/query and get structured results and reference links from Google 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).","url":"https://agents.openwebninja.com/google-ai-mode/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)."},"url":{"type":"string","nullable":true,"description":"A full Google AI Mode URL to fetch instead of a prompt, e.g. https://www.google.com/search?q=coffee&udm=50. Must be a Google /search URL (google.com or a Google country domain) with udm=50 and a non-empty q. The page is loaded as is, so other Google parameters in it (e.g. uule) apply, and its own gl and hl take precedence over the gl and hl parameters. Cannot be combined with prompt, session_token, location, uule or attachments. A url request is charged 2 request credits."},"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)."},"return_raw_html":{"type":"boolean","default":false,"description":"Return the raw HTML (in data.raw_html) instead of the parsed results. With prompt, the HTML of the AI Mode answer. With url, the full rendered AI Mode page, with the sources panel expanded."}}},"responseSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"raw_html":{"type":"string","description":"Raw HTML, returned instead of the parsed results (the only data field) when return_raw_html=true. With prompt: the AI Mode answer fragment as streamed by Google. With url: the full rendered AI Mode page with the sources panel expanded."},"session_token":{"type":"string","description":"Token used to maintain session context for follow-up interactions"}}},"status":{"type":"string","description":"The status of the API response"},"parameters":{"type":"object","properties":{"gl":{"type":"string","description":"Geolocation/country code used for localization"},"hl":{"type":"string","description":"Language code used for localization"},"url":{"type":"string","description":"The AI Mode URL as received (only for url requests)"},"uule":{"type":"string","nullable":true,"description":"Google uule location string as received (only when explicitly passed)."},"prompt":{"type":"string","description":"The input prompt provided by the user"},"location":{"type":"string","nullable":true,"description":"Search origin location as received (only when explicitly passed)."},"return_raw_html":{"type":"boolean","description":"Present (true) when return_raw_html=true was passed"}}},"request_id":{"type":"string","description":"A unique identifier for 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_a08Jcgh2iFr3t0wpS-VcB","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":"Sends a prompt or query to Google AI Mode via POST and returns structured AI-generated answers with reference links and session context.","exampleAgentPrompt":"Use Google AI Mode to answer this for me: what are the best practices for securing a Node.js REST API? I'm searching from London, England, United Kingdom.","exampleUseCases":[{"title":"Step-by-step how-to question","prompt":"Ask Google AI Mode how to make homemade sourdough bread from scratch — I want a full step-by-step answer with sources."},{"title":"Local business AI search","prompt":"Search Google AI Mode for the best brunch spots near me — I'm in Austin, Texas, United States — and give me the AI-generated summary with reference links."},{"title":"Multi-turn research session","prompt":"Continue my Google AI Mode conversation using my previous session token and ask a follow-up: what are the side effects of the medications you just listed?"}],"resultDescription":"Returns a JSON object containing the AI-generated answer (structured results and/or raw HTML), a session token for follow-up queries, the echoed input parameters, a unique request ID, and a status field. The answer includes reference links to source pages as cited by Google AI Mode.","failureModes":["Invalid or missing prompt field returns a validation error","Combining 'url' parameter with 'prompt' or 'location' returns a parameter conflict error","Unsupported location value causes location resolution failure","Long prompts that exceed internal limits may be truncated or return an error","Expired or invalid session tokens break multi-turn continuity","Rate limiting or credit exhaustion returns a 402 or quota error","Invalid country/language codes may default silently or return errors"],"whenToPreferThis":"Choose this POST variant over the GET variant when your prompt is long (to avoid URL length limits), when you need to pass complex parameters like attachments or advanced search options, or when you want structured AI Mode results with citation links rather than plain web search results. Prefer this over AI Overviews when you need a full AI Mode conversational answer rather than a quick overview snippet, and over ChatGPT/Gemini chat endpoints when you specifically want Google's AI Mode search results with web citations.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-14T00:36:47.676Z","isFirstParty":false,"canonicalSlug":"agents-openwebninja-com-google-ai-mode-search-post-69308376"}