Google AI Mode API
Ask Google AI Mode a question and receive structured answer blocks with references. Localize by country, language, location or encoded location.
/ai10 credits / requestAI
Request
curl "https://api.fastaf.co/v1/ai?query=..." \
-H "Authorization: Bearer YOUR_KEY"Parameters
| Name | Description |
|---|---|
| query | Required. Question for AI-assisted search |
| country | Optional. Country code |
| language | Optional. Answer language |
| uule | Optional. Encoded location; cannot be combined with location |
| location | Optional. Human-readable location; cannot be combined with uule |
| safe | Optional. Safe-search setting |
| html | Optional boolean. Include the HTML response |
Response fields
- text_blocks
- snippet
- links
Guides
- Getting Google's AI Mode answer and its sources over an API
The composed answer and the pages it cites, as JSON, and why the wording is Google Search AI Mode output that can change between two identical calls. Tested August 2026.
- Measure your brand's visibility in AI answers with Python
We ran 45 prompts through Google AI Mode three times each. 43 of 45 changed which brands they named between identical runs. Method, numbers and a Python script.
FAQ
Can I combine location and uule?
No. Choose one location control per request.
What does an AI Mode request cost?
Each request costs 10 credits, or about $3.87 per 1,000 requests on a 75k prepaid pack.