Skip to content
Scrappa Get API key
Google Search API 1 credit/request

Google AI Mode

GET https://scrappa.co/api/google-ai-mode/search

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.

Google AI Mode 1 credit/request

Endpoint

Request preview
GET
https://scrappa.co/api/google-ai-mode/search
Auth header
x-api-key
Cost
1 credit/request
q = best espresso machine under 500
Response preview
200 OK
{
    "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"
        }
...

Parameters

Start with the required fields, then add optional filters only when your use case needs them.

Runnable path

1 required parameter needed before sending a request.

5 optional filters available.

q string Required

Search query sent to Google AI Mode

Example value best espresso machine under 500
hl string Optional

Interface language code (e.g. en, de)

Example value en
gl string Optional

Country code (e.g. us, de)

Example value us
google_domain string Optional

Google domain (e.g. google.de)

Example value example
uule string Optional

Encoded location (passed through when provided)

Example value example
follow_up_token string Optional

Opaque session token from a previous response; pass it back to continue the conversation

Example value example

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

references text_blocks follow_up_token shopping_results reconstructed_markdown

Common references fields

link index title source
JSON Response
200 OK
{
    "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

Handle these documented responses before retrying or showing customer-facing failures.

422

Validation Error

One or more query parameters failed validation.

{
    "errors": {
        "q": [
            "The q field is required."
        ]
    },
    "message": "The request validation failed"
}
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.

{
    "error": "Google AI Mode is temporarily unable to return a valid response."
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Related reading

Try It Live

Test this endpoint in our interactive playground with real data.