API reference · Search engines
Google AI Mode
Google's AI Mode answer to a question, as plain text and as Markdown with its headings, lists and tables, plus the pages it cites with their real URLs.
https://api.serpbase.dev/google/ai_modeExample
curl -X POST 'https://api.serpbase.dev/google/ai_mode' \
-H "Content-Type: application/json" \
-H 'X-API-Key: YOUR_API_KEY' \
--max-time 60 \
-d '{"gl":"us","hl":"en","q":"how does a heat pump work"}'No recorded response is published for this endpoint yet. Run the example in the Playground to see a live one.
Parameters
formatMore
markdown returns the same result as Markdown text (text/markdown) for language models: no envelope, no duplicate alias fields, no inline images. Same credits; failures keep the JSON envelope.
glhlqThe sample shows example parameters, not the complete request contract. Known fields are validated by the API; additional parameters are allowed.
What comes back
The fields are those in the response above; every endpoint also carries status, credits_charged and request_id.
If it fails
A failed request has a non-zero status and an error, and is not charged. The ones you will see here:
1000A parameter is missing or wrongFix the request1020No credits leftTop up1029Over your requests per secondWait Retry-After seconds1502 · 1504The source could not be read this timeRetry