Google AI Mode
Query Google AI Mode via API. JSON with text_blocks, reconstructed_markdown, and references.
Status: Experimental
Credit cost: 3 credits per call
Autorização
ApiKeyAuth Your API key. Include it in the x-api-key header for every request.
In: header
Parâmetros de consulta
The question or search query you want Google AI Mode to answer (supports advanced operators like site:, inurl:, intitle:).
Human-readable location to originate the search from (e.g. New York, NY, Paris, France). If several locations match, the most popular one is used. Note: location and uule cannot be used together.
Google encoded location parameter. Use for precise geo targeting. Note: uule and location cannot be used together.
Country to use for the Google AI Mode search (two-letter country code, e.g. us, fr).
Language to use for the Google AI Mode search (two-letter language code, e.g. en, fr).
Corpo da resposta
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/google/search/ai?query=string"{ "references": [ { "link": "https://www.mozilla.org/firefox/", "index": 0, "title": "Firefox Browser", "source": "mozilla.org" }, { "link": "https://en.wikipedia.org/wiki/Firefox", "index": 1, "title": "Firefox - Wikipedia", "source": "en.wikipedia.org" } ], "text_blocks": [ { "type": "paragraph", "snippet": "Mozilla Firefox is a free, open-source web browser developed by the Mozilla Foundation. It is available on desktop and mobile, supports extensions, and focuses on privacy controls such as Enhanced Tracking Protection." }, { "type": "heading", "snippet": "Key features" }, { "list": [ { "snippet": "Free and open-source, maintained by the Mozilla Foundation." }, { "snippet": "Available on desktop and mobile platforms." }, { "snippet": "Enhanced Tracking Protection to limit cross-site tracking." } ], "type": "list" } ], "search_parameters": { "q": "what is mozilla firefox", "gl": "us", "hl": "en", "engine": "google_ai_mode" }, "reconstructed_markdown": "Mozilla Firefox is a free, open-source web browser developed by the Mozilla Foundation. It is available on desktop and mobile, supports extensions, and focuses on privacy controls such as Enhanced Tracking Protection.\n\n### Key features\n\n- Free and open-source, maintained by the Mozilla Foundation.\n- Available on desktop and mobile platforms.\n- Enhanced Tracking Protection to limit cross-site tracking."}{ "error": "Bad Request"}{ "error": "Invalid API Key"}{ "error": "Payment required"}{ "error": "Rate limit exceeded for the API key: quota monthly"}{ "error": "Internal Error"}