# Google AI Mode

Fetch a Google AI Mode answer for a query. Returns the generated answer as structured text blocks (paragraphs, headings, lists), cited references, shopping results when Google shows products, and customer-renderable markdown. Pass the follow_up_token from a previous response back as follow_up_token to ask a follow-up question in the same conversation. Queries that do not yield a parseable answer after retries return an unbilled 503; retry the request after a short delay.

- **Documentation:** [https://scrappa.co/docs/google-search-api/google_ai_mode](https://scrappa.co/docs/google-search-api/google_ai_mode)
- **API group:** Google Search API
- **Endpoint:** `GET https://scrappa.co/api/google-ai-mode/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `q` | string | Yes | Search query sent to Google AI Mode |
| `hl` | string | No | Interface language code (e.g. en, de) |
| `gl` | string | No | Country code (e.g. us, de) |
| `google_domain` | string | No | Google domain (e.g. google.de) |
| `uule` | string | No | Encoded location (passed through when provided) |
| `follow_up_token` | string | No | Opaque session token from a previous response; pass it back to continue the conversation |

## Example response

```json
{
    "references": [
        {
            "link": "http://www.bestbuy.com",
            "index": 0,
            "title": "bestbuy.com",
            "source": "www.bestbuy.com"
        },
        {
            "link": "https://corretticatering.com",
            "index": 1,
            "title": "corretticatering.com",
            "source": "corretticatering.com"
        }
    ],
    "text_blocks": [
        {
            "type": "paragraph",
            "snippet": "When looking for the best espresso machine under $500, the consensus among home baristas and coffee enthusiasts points to a clear winner that balances performance, speed, and quality, alongside a couple of strong alternative approaches.",
            "list_items": []
        },
        {
            "type": "paragraph",
            "snippet": "Price: Around $399 - $499Why it\u2019s the best: It features a rapid 3-second Thermojet heating system, precise digital temperature control (PID), and a 54mm professional-style portafilter. Crucially for milk drink lovers, it has a hands-free automatic steam wand that textures microfoam to your preferred setting. Note that it does not include a built-in grinder, meaning you'll need to budget for a separate standalone burr grinder for specialty third-wave coffee. You can look at retailer options like the Breville Bambino Plus on Best Buy or direct via Breville.",
            "list_items": []
        },
        {
            "type": "paragraph",
            "snippet": "Price: Around $299 - $349Why it\u2019s great: If you want to save extra cash from your $500 budget to put toward a high-end separate grinder (like a Baratza Encore ESP), the base Bambino gives you the same incredible 3-second heat-up time and 9-bar extraction quality, but trades the automatic steam wand for a manual one that you control yourself.",
            "list_items": []
        }
    ],
    "follow_up_token": "{\"garc\":\"<redacted session token>\",\"ei\":\"<redacted session token>\",\"stkp\":\"<redacted session token>\"}",
    "shopping_results": [
        {
            "price": "$399.95",
            "title": "Breville Bambino Plus",
            "rating": "4.4",
            "source": "Best Buy",
            "reviews": "(4K)",
            "old_price": "$500",
            "thumbnail": "https://encrypted-tbn0.gstatic.com/shopping?q=tbn:ANd9GcQ1FR0SMvZ5rngRRUxvNRaYwT_xAteBABXxPOQZEpKS7R1t5nD3EivC1P-pig&usqp=CAE",
            "product_link": "https://www.google.com/search?ibp=oshop&prds=pvt%3Ahg%2Cpvo%3A29%2Cmid%3A576462400073813698%2CimageDocid%3A7078112866254370644%2Cgpcid%3A16136524051369688375%2CheadlineOfferDocid%3A11619265825997315622%2Ccatalogid%3A1642596591823582493%2CproductDocid%3A9386520564642611570%2Crds%3APC_16136524051369688375%7CPROD_PC_16136524051369688375&q=product",
            "extracted_price": 399.95
        },
        {
            "price": "$249.95",
            "title": "Breville Bambino (Standard)",
            "rating": "4.2",
            "source": "Best Buy",
            "reviews": "(2.4K)",
            "old_price": "$300",
            "thumbnail": "https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcS0IzfwRfUpdzdhrLW-rVeNsLco19G6s9mbc6PBcmE5FsZ3kJgNS475Ftitfg&usqp=CAE",
            "product_link": "https://www.google.com/search?ibp=oshop&prds=pvt%3Ahg%2Cpvo%3A29%2Cmid%3A576462898025610453%2CimageDocid%3A13985285416643809395%2Cgpcid%3A14813439998292178854%2CheadlineOfferDocid%3A305801730593373698%2Ccatalogid%3A2389289435709119839%2CproductDocid%3A650686352670086840%2Crds%3APC_14813439998292178854%7CPROD_PC_14813439998292178854&q=product",
            "extracted_price": 249.95
        },
        {
            "price": "$122.48",
            "title": "De'Longhi Dedica Deluxe",
            "rating": "4.4",
            "source": "corretticatering.com",
            "reviews": "(5.5K)",
            "thumbnail": "https://encrypted-tbn1.gstatic.com/shopping?q=tbn:ANd9GcQKa2Qnb68jdnbpM6IbDS7TEe_lXqm3e_vFXNNjqwDPUfS6fgrnT_EXIgaiQ&usqp=CAE",
            "product_link": "https://www.google.com/search?ibp=oshop&prds=pvt%3Ahg%2Cpvo%3A29%2CimageDocid%3A798878515127000489%2Cgpcid%3A6504569009449975367%2CheadlineOfferDocid%3A16982648685117593396%2Ccatalogid%3A17789091989576343511%2CproductDocid%3A809795475640462968%2Crds%3APC_6504569009449975367%7CPROD_PC_6504569009449975367&q=product",
            "extracted_price": 122.48
        }
    ],
    "reconstructed_markdown": "When looking for the best espresso machine under $500, the consensus among home baristas and coffee enthusiasts points to a clear winner that balances performance, speed, and quality, alongside a couple of strong alternative approaches.\n\n**Price:** Around $399 - $499 **Why it\u2019s the best:** It features a rapid 3-second Thermojet heating system, precise digital temperature control (PID), and a 54mm professional-style portafilter. Crucially for milk drink lovers, it has a hands-free automatic steam wand that textures microfoam to your preferred setting. Note that it **does not** include a built-in grinder, meaning you'll need to budget for a separate standalone burr grinder for specialty third-wave coffee. You can look at retailer options like the Breville Bambino Plus on Best Buy or direct via Breville.\n\n**Price:** Around $299 - $349 **Why it\u2019s great:** If you want to save extra cash from your $500 budget to put toward a high-end separate grinder (like a Baratza Encore ESP), the base Bambino gives you the same incredible 3-second heat-up time and 9-bar extraction quality, but trades the automatic steam wand for a manual one that you control yourself.\n\n**Price:** Around $250 - $300 **Why it\u2019s great:** An ultra-slim budget pick that takes up almost no counter space while still delivering fast heat-up and quality espresso with a simple, easy-to-master interface.\n\nWould you prefer a machine with a built-in grinder (all-in-one style), or are you okay with a separate one?"
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | One or more query parameters failed validation. |
| 503 | AI Mode Unavailable | Google AI Mode is temporarily unable to return a valid answer. The request is not billed; retry it after a short delay. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
