ai_mode
Fetches Google AI Mode (SGE) answers for a keyword and location, returning generated response text, local business recommendations, reference links, and shopping items.
Instructions
Use when getting the Google AI Mode (SGE) generated answer for a keyword. Returns ai_response text, local_businesses, reference links, and shopping items. Costs 2 credits. May take 10-30 seconds; Google generates the answer per request.
LOCAL BUSINESSES: on a local question Google recommends businesses inside the answer and we return them as local_businesses — rank, name, category, rating, reviews_count, address, website, domain, cid. Field names shared with /v1/serp/local-pack mean the same things; the sets differ in that this adds category and domain and has no hours. cid is an empty string when the Directions link was unreadable. Two differences from ai_scraper on chat_gpt: phone is always empty (Google renders a Call button and never sends the number), and cid is populated — Google's own identifier for the business, in decimal, which /v1/business/profile also takes. Match on cid rather than on name where you can.
REVIEW COUNTS ARE ROUNDED: Google abbreviates above a thousand, so reviews_count is 1200 where the exact figure is 1194. Do not compare it to a count from another endpoint and read the difference as change.
parse_status reports whether the businesses could be read: "ok", "no_businesses" when the answer named none, or "unparsed" when business cards were present and none could be read — which means Google changed the format. references is unreliable for citations: on some answers it carries real domains, on others every entry collapses to a google.com redirect, and it never names the businesses either way.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fresh | No | Bypass the hour of caching and run the query again. Use when sampling the same prompt repeatedly to measure how the answer varies — a cached hit would return the earlier run and hide the variance. Always billed at the normal price, since there is no cache hit to be free. | |
| keyword | Yes | Search keyword (e.g. "best plumber near me") | |
| location | Yes | City and state (e.g. "Orchard Park, NY") |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keyword | Yes | ||
| location | Yes | ||
| references | Yes | ||
| ai_response | Yes | ||
| parse_status | No | ||
| location_used | No | ||
| shopping_items | Yes | ||
| local_businesses | No | ||
| location_alternatives | No |