Scrapers
Google AI Mode
Extract structured data from Google AI Mode - the AI answer panel in Google Search - including citations and organic search results as clean JSON.
GET
/
scrapers
/
google_ai_mode
cURL
# Streaming can take up to 300s - --max-time matches the server timeout
curl --max-time 300 \
-G "https://api.scrapellm.com/scrapers/google_ai_mode" \
--data-urlencode "api_key=YOUR_API_KEY" \
--data-urlencode "prompt=What brands do marketers recommend for email automation?" \
--data-urlencode "country=US"import requests
response = requests.get(
"https://api.scrapellm.com/scrapers/google_ai_mode",
params={
"api_key": "YOUR_API_KEY",
"prompt": "What brands do marketers recommend for email automation?",
"country": "US",
}
)
print(response.json())
const params = new URLSearchParams({
api_key: "YOUR_API_KEY",
prompt: "What brands do marketers recommend for email automation?",
country: "US",
});
const response = await fetch(
`https://api.scrapellm.com/scrapers/google_ai_mode?${params}`
);
const data = await response.json();
console.log(data);
const params = new URLSearchParams({
api_key: "YOUR_API_KEY",
prompt: "What brands do marketers recommend for email automation?",
country: "US",
});
const response = await fetch(
`https://api.scrapellm.com/scrapers/google_ai_mode?${params}`
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrapellm.com/scrapers/google_ai_mode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scrapellm.com/scrapers/google_ai_mode"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrapellm.com/scrapers/google_ai_mode")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrapellm.com/scrapers/google_ai_mode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"scraper": "google_ai_mode",
"status": "done",
"job_id": "job_abc123",
"prompt": "What brands do marketers recommend for email automation?",
"country": "US",
"result": "Marketers commonly recommend Mailchimp, HubSpot, and Klaviyo...",
"result_markdown": "Marketers commonly recommend **Mailchimp**, **HubSpot**, and **Klaviyo**...",
"citations": [
{
"title": "Best Email Marketing Platforms 2025",
"url": "https://example.com/email-marketing",
"snippet": "We tested 12 tools across deliverability, automation, and pricing...",
"website_name": "Marketing Weekly",
"thumbnail": "https://example.com/thumbnail.jpg",
"favicon": "https://example.com/favicon.ico"
}
],
"search_results": [
{
"title": "Top Email Automation Tools — Comparison Guide",
"url": "https://example.com/comparison",
"snippet": "A side-by-side look at the top email marketing platforms...",
"website_name": "TechReview",
"thumbnail": null
}
],
"raw_url": "https://www.google.com/search?q=What+brands+do+marketers+recommend+for+email+automation",
"credits_used": 3,
"elapsed_ms": 7318.6,
"cached": false,
"markdown_url": "https://scrapellm.com/md/job_abc123.md"
}{
"detail": "Missing API key. Pass your key in the X-API-Key header or as ?api_key= in the URL."
}{
"detail": "Invalid API key."
}{
"detail": "Invalid API key."
}{
"detail": "Invalid API key."
}{
"detail": "Invalid API key."
}{
"detail": "Invalid API key."
}AI answer + organic results togetherThis is the only scraper that returns both the AI-generated answer and the traditional organic search results shown on the same page - giving you a complete picture of Google Search visibility.
Overview
Use this endpoint to monitor your brand’s presence in Google’s AI Overviews, track which sources Google cites in its AI answers, and compare AI citation coverage against traditional organic rankings - all from a single request.Unique features
- Organic search results: Traditional Google search results returned alongside the AI answer
- AI citations with thumbnails: Each cited source includes a thumbnail image URL and favicon
- Raw URL capture: The underlying Google Search URL used to generate the response
Example request
# Streaming can take up to 300s - --max-time matches the server timeout
curl --max-time 300 \
-G "https://api.scrapellm.com/scrapers/google-ai-mode" \
--data-urlencode "api_key=YOUR_API_KEY" \
--data-urlencode "prompt=What brands do marketers recommend for email automation?" \
--data-urlencode "country=US"
import requests
response = requests.get(
"https://api.scrapellm.com/scrapers/google-ai-mode",
headers={"X-API-Key": "YOUR_API_KEY"},
params={
"prompt": "What brands do marketers recommend for email automation?",
"country": "US",
}
)
print(response.json())
const params = new URLSearchParams({
prompt: "What brands do marketers recommend for email automation?",
country: "US",
});
const response = await fetch(
`https://api.scrapellm.com/scrapers/google-ai-mode?${params}`,
{ headers: { "X-API-Key": "YOUR_API_KEY" } }
);
const data = await response.json();
Response schema
Includes common response fields plus:| Field | Type | Description |
|---|---|---|
result | string | Plain-text AI-generated answer |
result_markdown | string | Markdown-formatted AI answer |
citations | array | Sources cited in the AI answer |
citations[].title | string | Article title of the cited page |
citations[].url | string | URL of the cited source |
citations[].snippet | string | Text excerpt from the source page |
citations[].website_name | string | Human-readable site name |
citations[].thumbnail | string | Thumbnail image URL (nullable) |
citations[].favicon | string | Site favicon URL |
search_results | array | Traditional organic search results shown alongside the AI answer |
search_results[].title | string | Page title of the organic result |
search_results[].url | string | URL of the organic result |
search_results[].snippet | string | Search result snippet |
search_results[].website_name | string | Site name |
search_results[].thumbnail | string | Thumbnail image URL (nullable) |
raw_url | string | The Google Search URL used to generate the response |
credits_used | integer | Credits consumed - always 3 for Google AI Mode |
elapsed_ms | float | End-to-end request duration in milliseconds |
cached | boolean | true if served from cache |
Common questions
What is the difference between Google AI Mode and Gemini?
Google AI Mode is the AI answer panel shown within Google Search results on google.com. Gemini is Google’s standalone AI assistant at gemini.google.com. They use different models, different citation sources, and serve different user intents. Run both for full Google AI coverage.Are organic search results always present?
No - organic results are only included when Google shows them on the same page as the AI answer. For some queries Google shows only the AI panel; for others it shows both. Checksearch_results.length before processing.
Can I use this for AI Overview monitoring?
Yes. Google AI Mode is the same surface as Google’s AI Overviews. This endpoint captures both the AI answer and the citations, making it the primary tool for AI Overview brand monitoring.Authorizations
ApiKeyHeaderApiKeyQuery
Query Parameters
Response
Scrape completed successfully.
cURL
# Streaming can take up to 300s - --max-time matches the server timeout
curl --max-time 300 \
-G "https://api.scrapellm.com/scrapers/google_ai_mode" \
--data-urlencode "api_key=YOUR_API_KEY" \
--data-urlencode "prompt=What brands do marketers recommend for email automation?" \
--data-urlencode "country=US"import requests
response = requests.get(
"https://api.scrapellm.com/scrapers/google_ai_mode",
params={
"api_key": "YOUR_API_KEY",
"prompt": "What brands do marketers recommend for email automation?",
"country": "US",
}
)
print(response.json())
const params = new URLSearchParams({
api_key: "YOUR_API_KEY",
prompt: "What brands do marketers recommend for email automation?",
country: "US",
});
const response = await fetch(
`https://api.scrapellm.com/scrapers/google_ai_mode?${params}`
);
const data = await response.json();
console.log(data);
const params = new URLSearchParams({
api_key: "YOUR_API_KEY",
prompt: "What brands do marketers recommend for email automation?",
country: "US",
});
const response = await fetch(
`https://api.scrapellm.com/scrapers/google_ai_mode?${params}`
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrapellm.com/scrapers/google_ai_mode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.scrapellm.com/scrapers/google_ai_mode"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.scrapellm.com/scrapers/google_ai_mode")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrapellm.com/scrapers/google_ai_mode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"scraper": "google_ai_mode",
"status": "done",
"job_id": "job_abc123",
"prompt": "What brands do marketers recommend for email automation?",
"country": "US",
"result": "Marketers commonly recommend Mailchimp, HubSpot, and Klaviyo...",
"result_markdown": "Marketers commonly recommend **Mailchimp**, **HubSpot**, and **Klaviyo**...",
"citations": [
{
"title": "Best Email Marketing Platforms 2025",
"url": "https://example.com/email-marketing",
"snippet": "We tested 12 tools across deliverability, automation, and pricing...",
"website_name": "Marketing Weekly",
"thumbnail": "https://example.com/thumbnail.jpg",
"favicon": "https://example.com/favicon.ico"
}
],
"search_results": [
{
"title": "Top Email Automation Tools — Comparison Guide",
"url": "https://example.com/comparison",
"snippet": "A side-by-side look at the top email marketing platforms...",
"website_name": "TechReview",
"thumbnail": null
}
],
"raw_url": "https://www.google.com/search?q=What+brands+do+marketers+recommend+for+email+automation",
"credits_used": 3,
"elapsed_ms": 7318.6,
"cached": false,
"markdown_url": "https://scrapellm.com/md/job_abc123.md"
}{
"detail": "Missing API key. Pass your key in the X-API-Key header or as ?api_key= in the URL."
}{
"detail": "Invalid API key."
}{
"detail": "Invalid API key."
}{
"detail": "Invalid API key."
}{
"detail": "Invalid API key."
}{
"detail": "Invalid API key."
}