---
title: "Google AI Mode API"
description: "Use SerpApi's Google AI Mode API to scrape Google AI Mode Results."
url: https://serpapi.com/google-ai-mode-api
site: "SerpApi – Real-time search engine results API"
signup: https://serpapi.com/users/sign_up
engine: "google_ai_mode"
docs:
  pricing: https://serpapi.com/pricing.md
  integrations: https://serpapi.com/integrations.md
---

# Google AI Mode API

Use SerpApi's Google AI Mode API to scrape Google AI Mode Results.

## Example Request

```
GET https://serpapi.com/search?api_key=YOUR_API_KEY&engine=google_ai_mode&q=QUERY
```

## API Parameters

### Search Query

| Parameter | Required | Description |
|-----------|----------|-------------|
| `q` | **Yes** | Parameter defines the query you want to search. You can use anything that you would use in a regular Google AI Mode search.   Google AI Mode may support multiple languages (including **English**), though not all are available yet. |

### Geographic Location

| Parameter | Required | Description |
|-----------|----------|-------------|
| `location` | No | Parameter defines from where you want the search to originate. If several locations match the location requested, we'll pick the most popular one. Head to the [/locations.json API](https://serpapi.com/locations-api) if you need more precise control. The `location` and `uule` parameters can't be used together. It is recommended to specify `location` at the city level in order to simulate a real user’s search. If `location` is omitted, the search may take on the location of the proxy. |
| `uule` | No | Parameter is the Google encoded location you want to use for the search.  `uule` and `location` parameters can't be used together. |

### Localization

| Parameter | Required | Description |
|-----------|----------|-------------|
| `gl` | No | Parameter defines the country to use for the Google search. It's a two-letter country code. (e.g., `us` for the United States, `uk` for United Kingdom, or `fr` for France). Head to the [Google countries page](https://serpapi.com/google-countries) for a full list of supported Google countries. |
| `hl` | No | Parameter defines the language to use for the Google search. It's a two-letter language code. (e.g., `en` for English, `es` for Spanish, or `fr` for French). Head to the [Google languages page](https://serpapi.com/google-languages) for a full list of supported Google languages. |

### Subsequent Request

| Parameter | Required | Description |
|-----------|----------|-------------|
| `continuable` | No | Set parameter to `true` to make the conversation continuable. It defaults to `false`. When set to `true`, SerpApi will return a `subsequent_request_token` in the response which can be used to continue the conversation with a follow-up question that includes the prior exchange as context (multi-turn). |
| `subsequent_request_token` | No | Parameter defines the token used to continue a Google AI Mode conversation. Pass this token to send a follow-up question that includes the prior exchange as context (multi-turn).  The token is returned by SerpApi from your previous request using our [Google AI Mode API](https://serpapi.com/google-ai-mode).  When using this token, include a new `q` for your follow-up prompt. For consistent behavior, reuse the same localization settings (`gl`, `hl`, and location) you used to obtain the token. |

### Advanced Parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| `image_url` | No | Parameter defines the URL of an image to include in the prompt. The image will be used as additional context for the AI to generate a response. |

### SerpApi Parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| `engine` | **Yes** | Set parameter to `google_ai_mode` to use the Google Ai Mode API engine. |
| `device` | No | Parameter defines the device to use to get the results. It can be set to `desktop` (default) to use a regular browser, `tablet` to use a tablet browser (currently using iPads), or `mobile` to use a mobile browser. |
| `no_cache` | No | Parameter will force SerpApi to fetch the Google Ai Mode results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to `false` (default) to allow results from the cache, or `true` to disallow results from the cache. `no_cache` and `async` parameters should not be used together. |
| `async` | No | Parameter defines the way you want to submit your search to SerpApi. It can be set to `false` (default) to open an HTTP connection and keep it open until you got your search results, or `true` to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our [Searches Archive API](https://serpapi.com/search-archive-api) to retrieve your results. `async` and `no_cache` parameters should not be used together. `async` should not be used on accounts with [Ludicrous Speed](https://serpapi.com/plan) enabled. |
| `zero_trace` | No | Enterprise only. Parameter enables [ZeroTrace mode](https://serpapi.com/zero-trace-mode). It can be set to `false` (default) or `true`. Enable this mode to skip storing search parameters, search files, and search metadata on our servers. This may make debugging more difficult. |
| `api_key` | **Yes** | Parameter defines the SerpApi private key to use. |
| `output` | No | Parameter defines the final output you want. It can be set to json (default) to get a structured `JSON` of the results, or `html` to get the raw html retrieved. |
| `json_restrictor` | No | Parameter defines the fields you want to restrict in the outputs for smaller, faster responses. See [JSON Restrictor](https://serpapi.com/json-restrictor) for more details. |

## Response Example

Truncated sample response. URLs are illustrative and not accessible.

```json
{
  "subsequent_request_token": "...",
  "shopping_results": [
    {
      "title": "Stumptown Coffee Roasters, Medium Roast Organic Whole Bean Coffee - Holler Mountain 12 Ounce Bag ...",
      "product_link": "https://www.google.com/search?ibp=oshop&prds=pvt:hg,pvo:29,imageDocid:12869278,headlineOfferDocid...",
      "immersive_product_page_token": "...",
      "serpapi_immersive_product_api": "https://serpapi.com/search.json?engine=google_immersive_product&page_token=eyJlaSI6bnVsbCwicHJvZH...",
      "thumbnail": "https://serpapi.com/searches/6960cceb/images/dd565051.jpeg",
      "price": "$21.49",
      "extracted_price": 21.49,
      "old_price": "$24.98",
      "extracted_old_price": 24.98,
      "index": 0
    }
  ],
  "text_blocks": [
    {
      "type": "paragraph",
      "snippet": "Coffee encompasses a wide range of beans, roasts, and flavor profiles, with top recommendations o...",
      "reference_indexes": [
        3
      ]
    }
  ],
  "reconstructed_markdown": "Coffee recommendations span a range of beans, roasts, and brewing methods.\n\n### Popular coffee br...",
  "references": [
    {
      "title": "10 Best Coffee Brands of 2025, Tested and Reviewed",
      "link": "https://www.foodnetwork.com/how-to/packages/shopping/best-coffee-brands#:~:text=Best%20Overall,Co...",
      "snippet": "Sep 18, 2025 — Our Top Coffee Brand Picks * Best Overall. La Colombe. Read Review From $11 at Ama...",
      "source": "Food Network",
      "thumbnail": "https://serpapi.com/searches/6960cceb/images/a4695e99.jpeg",
      "source_icon": "https://serpapi.com/searches/6960cceb/images/a4695e99.png",
      "index": 0
    }
  ],
  "related_questions": [
    {
      "question": "Compare Stumptown's Holler Mountain and Onyx Monarch blends",
      "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=google_ai_mode&q=Compare+Stumptown%27s+Holl..."
    }
  ]
}
```

