{"uid":"cap_7D5lOjM05Ma4Ylz9w79BC","slug":"agents-openwebninja-com-google-ai-mode-search-5611a610","name":"Google AI Mode Search","description":"Send a prompt/query and get structured results and reference links from Google AI Mode.","url":"https://agents.openwebninja.com/google-ai-mode/ai-mode?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["prompt"],"properties":{"gl":{"type":"string","default":"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","description":"The language to use for the search (Google's hl parameter). 2-letter country code, see ISO 639-1 alpha-2."},"url":{"type":"string","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. URL-encode it when sent in the query string."},"uule":{"type":"string","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."},"prompt":{"type":"string","description":"AI Mode prompt. Required unless url is specified."},"location":{"type":"string","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":"string","description":"Optional JSON array of document URLs (PDF) to attach to the prompt, passed as a string, e.g. [\"https://example.com/file.pdf\"]. Up to 5 files, 10 MB each. Images are not supported. Attaching one or more documents is charged a flat 1 extra request credit. For multiple or long URLs use the POST method (no URL length limit)."},"session_token":{"type":"string","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_DZDZ8IYHsjv1UlgZaTSVs","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":"Send a natural language prompt to Google AI Mode and receive structured AI-generated answers with reference links, supporting session continuity and location context.","exampleAgentPrompt":"Search Google AI Mode for 'best practices for container security in Kubernetes' and give me the structured answer with source links, localized to the United States in English.","exampleUseCases":[{"title":"Localized restaurant recommendations","prompt":"Ask Google AI Mode what the best ramen restaurants are in London, England — make sure the results are location-aware for London so I get local picks, not generic ones."},{"title":"Multi-turn research conversation","prompt":"I was just asking Google AI Mode about climate change mitigation strategies — use the session token from that last response to follow up and ask: which of those strategies has the strongest scientific consensus?"},{"title":"PDF document Q&A via AI Mode","prompt":"Attach this PDF contract at https://example.com/contract.pdf and ask Google AI Mode to summarize the key obligations and deadlines in it."}],"resultDescription":"Returns a JSON object containing the AI Mode answer (structured results and reference links), a session_token for follow-up queries, echo of input parameters, and a unique request_id. When return_raw_html is true, returns raw HTML of the AI Mode answer fragment instead of parsed results.","failureModes":["Missing required 'prompt' parameter without a 'url' fallback returns a 400 error","Combining 'location' and 'uule' parameters simultaneously is not allowed and returns an error","Combining 'url' with 'prompt', 'session_token', 'location', or 'uule' is invalid","Invalid or unsupported location string may yield no location-specific results","PDF attachments exceeding 5 files or 10 MB each will be rejected","Rate limit or credit exhaustion returns a 402 or 429 response","Google AI Mode may occasionally return empty or incomplete results for ambiguous queries"],"whenToPreferThis":"Choose this endpoint when you need AI-synthesized, structured answers from Google AI Mode specifically — not just raw Google search results. Prefer it over generic web search endpoints when you need conversational continuity via session tokens, location-aware AI answers, or the ability to attach PDFs for document-grounded queries. It is especially useful when you want Google's own AI reasoning layer applied to a question, complete with cited reference links.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-14T00:37:03.780Z","isFirstParty":false,"canonicalSlug":"agents-openwebninja-com-google-ai-mode-search-5611a610"}