AI Mode Endpoint
Get AI-generated answers with references and shopping results from Google AI Mode
Google AI Mode is a conversational search mode that returns a full AI-generated response as the primary content, rather than traditional search results. Instead of a list of links, you get structured text blocks with inline references, shopping results, and detailed answers.
Endpoint
GET https://api.scrape.do/plugin/google/search/ai-modeCredit cost: 10 credits per request.
Request Parameters
Required
| Parameter | Type | Description |
|---|---|---|
token | string | Your Scrape.do API authentication token |
q | string | Search query. URL-encode spaces and special characters. best+noise+cancelling+headphones+2025 |
General
| Parameter | Type | Default | Description |
|---|---|---|---|
device | string | desktop | Device type. Accepted values: desktop, mobile |
include_html | boolean | false | When true, the raw HTML is included in the response html field |
Localization & Geo-targeting
| Parameter | Type | Default | Description |
|---|---|---|---|
hl | string | en | Host Language. Controls the language of the Google UI. ISO 639-1 codes. Examples: tr, de, fr, ja. Full list → |
gl | string | us | Geo Location. Country perspective for results. ISO 3166-1 alpha-2 codes. Examples: tr, de, gb. Full list → |
google_domain | string | google.com | Google domain to query. Examples: google.com.tr, google.de, google.co.uk. Full list → |
location | string | - | Location name in Google's canonical format. Examples: Istanbul,Istanbul,Turkey, New York,New York,United States |
uule | string | - | Google UULE-encoded location string. Auto-generated from location when not provided |
Filtering
| Parameter | Type | Default | Description |
|---|---|---|---|
safe | string | - | SafeSearch. Send active to filter adult content |
Example Usage
Step 1: Define Your Search Query
AI Mode works best with informational and research-oriented queries:
- Product research:
best noise cancelling headphones 2025 - Explanations:
how does mRNA vaccine work - Comparisons:
python vs javascript for beginners
For this example, we'll search for "best noise cancelling headphones 2025":
Step 2: Send the API Request
curl --location --request GET 'https://api.scrape.do/plugin/google/search/ai-mode?token=<SDO-token>&q=best+noise+cancelling+headphones+2025'import requests
import json
token = "<SDO-token>"
query = "best+noise+cancelling+headphones+2025"
url = f"https://api.scrape.do/plugin/google/search/ai-mode?token={token}&q={query}"
response = requests.request("GET", url)
print(json.dumps(response.json(), indent=2))const axios = require('axios');
const token = "<SDO-token>";
const query = "best+noise+cancelling+headphones+2025";
const url = `https://api.scrape.do/plugin/google/search/ai-mode?token=${token}&q=${query}`;
axios.get(url)
.then(response => {
console.log(JSON.stringify(response.data, null, 2));
})
.catch(error => {
console.error(error);
});package main
import (
"fmt"
"io/ioutil"
"net/http"
)
func main() {
token := "<SDO-token>"
query := "best+noise+cancelling+headphones+2025"
url := fmt.Sprintf(
"https://api.scrape.do/plugin/google/search/ai-mode?token=%s&q=%s",
token, query,
)
resp, err := http.Get(url)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}require 'net/http'
require 'json'
token = "<SDO-token>"
query = "best+noise+cancelling+headphones+2025"
url = URI("https://api.scrape.do/plugin/google/search/ai-mode?token=#{token}&q=#{query}")
response = Net::HTTP.get(url)
puts JSON.pretty_generate(JSON.parse(response))import java.net.HttpURLConnection;
import java.net.URL;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class GoogleAIMode {
public static void main(String[] args) throws Exception {
String token = "<SDO-token>";
String query = "best+noise+cancelling+headphones+2025";
String url = String.format(
"https://api.scrape.do/plugin/google/search/ai-mode?token=%s&q=%s",
token, query
);
HttpURLConnection conn = (HttpURLConnection) new URL(url).openConnection();
conn.setRequestMethod("GET");
BufferedReader reader = new BufferedReader(
new InputStreamReader(conn.getInputStream())
);
String line;
StringBuilder response = new StringBuilder();
while ((line = reader.readLine()) != null) {
response.append(line);
}
reader.close();
System.out.println(response.toString());
}
}using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string token = "<SDO-token>";
string query = "best+noise+cancelling+headphones+2025";
string url = $"https://api.scrape.do/plugin/google/search/ai-mode?token={token}&q={query}";
using HttpClient client = new HttpClient();
string response = await client.GetStringAsync(url);
Console.WriteLine(response);
}
}<?php
$token = "<SDO-token>";
$query = "best+noise+cancelling+headphones+2025";
$url = "https://api.scrape.do/plugin/google/search/ai-mode?token={$token}&q={$query}";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo json_encode(json_decode($response), JSON_PRETTY_PRINT);
?>Step 3: Receive AI-Generated Results
The API returns a JSON object with the AI-generated response structured into text blocks, references, and optional shopping results:
{
"search_parameters": {
"q": "best noise cancelling headphones 2025",
"hl": "en",
"gl": "us",
"device": "desktop",
"google_domain": "google.com"
},
"text_blocks": [
{
"type": "paragraph",
"snippet": "For 2025, the noise-cancelling headphone market is dominated by the Sony WH-1000XM6, which launched in May 2025 as the new industry leader.",
"snippet_links": [
{ "text": "Sony WH-1000XM6", "link": "https://example.com/sony" }
],
"reference_indexes": [0, 1, 2]
},
{
"type": "heading",
"snippet": "Top Over-Ear Recommendations",
"level": 3
},
{
"type": "list",
"list": [
{
"snippet": "Sony WH-1000XM6 — best overall noise cancellation",
"reference_indexes": [0]
},
{
"snippet": "Bose QuietComfort Ultra — best comfort for long wear",
"reference_indexes": [1]
}
]
}
],
"references": [
{
"title": "Sony WH-1000XM6 Review",
"link": "https://example.com/sony-review",
"snippet": "The XM6 offers industry-leading ANC...",
"source": "TechRadar",
"source_icon": "https://example.com/techradar-icon.png",
"index": 0
},
{
"title": "Bose QC Ultra Review",
"link": "https://example.com/bose-review",
"snippet": "Bose's latest flagship...",
"source": "RTINGS",
"index": 1
}
],
"shopping_results": [
{
"title": "Sony WH-1000XM6",
"product_link": "https://example.com/buy-sony",
"thumbnail": "https://example.com/sony.jpg",
"price": "$399.99",
"extracted_price": 399.99,
"old_price": "$460.00",
"extracted_old_price": 460.00,
"source": "Sony",
"rating": 4.7,
"reviews": 5300,
"index": 0
}
]
}Response Structure
Top-Level Fields
| Field | Type | When Empty | Description |
|---|---|---|---|
search_parameters | object | always present | Echo of the request parameters |
text_blocks | array | [] | AI-generated content blocks (paragraphs, headings, lists, reference cards) |
references | array | [] | Sources cited by the AI response |
shopping_results | array | [] | Product results with pricing (when relevant) |
html | string | omitted | Raw HTML. Only present when include_html=true |
text_blocks[]
The AI response is structured as an ordered array of content blocks. Each block has a type that determines which fields are present.
| Field | Type | Description |
|---|---|---|
type | string | "heading", "paragraph", "list", "ordered_list", or "reference_cards" |
snippet | string | Text content (for headings and paragraphs) |
level | integer | Heading level, e.g. 3 (only when type=heading) |
snippet_links | array | Inline links within the snippet (optional) |
list | array | List items when type=list or type=ordered_list (optional) |
cards | array | Reference preview cards when type=reference_cards (optional) |
reference_indexes | array of int | Indexes into the references array (optional) |
ListItem Object
| Field | Type | Description |
|---|---|---|
snippet | string | Item text |
snippet_links | array | Inline links (optional) |
shopping_result | object | Embedded shopping result (optional) |
list | array | Nested sub-items (optional, recursive) |
reference_indexes | array of int | Indexes into the references array (optional) |
SnippetLink Object
| Field | Type | Description |
|---|---|---|
text | string | Link text |
link | string | URL |
ReferenceCard Object
| Field | Type | Description |
|---|---|---|
title | string | Card title |
link | string | URL |
snippet | string | Preview text (optional) |
references[]
Sources cited by the AI-generated response. Each reference has an index that text blocks point to via reference_indexes.
| Field | Type | Description |
|---|---|---|
title | string | Page title |
link | string | URL |
snippet | string | Description excerpt |
source | string | Domain or site name |
source_icon | string | Favicon URL (optional) |
thumbnail | string | Preview image URL (optional) |
index | integer | Position index |
shopping_results[]
Product results with pricing and ratings. Present when the query has commercial intent.
| Field | Type | Description |
|---|---|---|
title | string | Product name |
product_link | string | Product URL |
thumbnail | string | Image URL (optional) |
price | string | Display price, e.g. "$399.99" (optional) |
extracted_price | float | Numeric price (optional) |
old_price | string | Original price before discount (optional) |
extracted_old_price | float | Numeric old price (optional) |
source | string | Retailer name (optional) |
rating | float | Star rating (optional) |
reviews | integer | Review count (optional) |
index | integer | Position index |
Differences from AI Overview
| AI Overview | AI Mode | |
|---|---|---|
| Trigger | Automatic on regular SERP | Dedicated endpoint |
| Endpoint | /plugin/google/search | /plugin/google/search/ai-mode |
| Content | Optional panel within SERP results | Full AI response (primary content) |
| Shopping results | No | Yes (when relevant) |
| Headings | No | Yes (type=heading) |
| Ordered lists | No | Yes (type=ordered_list) |
| Reference cards | No | Yes (type=reference_cards) |
| Credits | Same as SERP (or 5 for deferred follow-up) | 10 |
Example Requests
Basic AI Mode search:
/plugin/google/search/ai-mode?token=TOKEN&q=best+noise+cancelling+headphones+2025Turkish results from Turkey:
/plugin/google/search/ai-mode?token=TOKEN&q=en+iyi+kulaklık&hl=tr&gl=tr&google_domain=google.com.trLocation-targeted search:
/plugin/google/search/ai-mode?token=TOKEN&q=best+restaurants&location=New+York,New+York,United+StatesMobile device:
/plugin/google/search/ai-mode?token=TOKEN&q=python+vs+javascript&device=mobileSearch queries must be URL-encoded. The response is gzip compressed with a minimum size of 2KB.

