Scrapers
Gemini
Extract structured data from the Google Gemini web interface - rich citation metadata with snippets, highlights, favicons, and site names - as clean JSON.
GET
/
scrapers
/
gemini
cURL
# Streaming can take up to 300s - --max-time matches the server timeout
curl --max-time 300 \
-G "https://api.scrapellm.com/scrapers/gemini" \
--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/gemini",
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/gemini?${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/gemini?${params}`
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrapellm.com/scrapers/gemini",
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/gemini"
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/gemini")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrapellm.com/scrapers/gemini")
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": "gemini",
"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...",
"highlights": [
"Klaviyo leads for e-commerce with advanced segmentation",
"Mailchimp remains the most accessible entry point"
],
"website_name": "Marketing Weekly",
"favicon": "https://example.com/favicon.ico"
}
],
"llm_model": "gemini-2.0-flash",
"credits_used": 3,
"elapsed_ms": 6521.8,
"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."
}Richest citation metadataGemini citations include
highlights - the exact excerpts Gemini pulled from each source to support its answer. No other scraper returns this level of citation detail.Overview
Use this endpoint to track brand citations in Google’s AI ecosystem, research which pages Google’s AI trusts for any topic, and monitor how Gemini presents your brand or competitors. Thehighlights field shows exactly which sentences from each source Gemini used - useful for content optimisation.
Unique features
- Highlights: The exact excerpts Gemini extracted from each source to support its answer
- Source snippets: Full text excerpt from each cited page
- Favicon + website name: Human-readable site identity for each citation
- Markdown response: Full response as markdown via
result_markdown
Example request
# Streaming can take up to 300s - --max-time matches the server timeout
curl --max-time 300 \
-G "https://api.scrapellm.com/scrapers/gemini" \
--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/gemini",
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/gemini?${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 response from Gemini |
result_markdown | string | Markdown-formatted response |
citations | array | Cited sources with rich metadata |
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[].highlights | array | Exact excerpts Gemini pulled from this source to support its answer |
citations[].website_name | string | Human-readable site name (e.g. "HubSpot Blog") |
citations[].favicon | string | URL of the site’s favicon |
llm_model | string | Gemini model used (e.g. gemini-2.0-flash) |
credits_used | integer | Credits consumed - always 3 for Gemini |
elapsed_ms | float | End-to-end request duration in milliseconds |
cached | boolean | true if served from cache |
Common questions
What are highlights and how are they different from snippet?
snippet is a general text excerpt from the page. highlights are the specific sentences Gemini extracted and used to ground its answer - they show exactly which parts of the source Gemini considered relevant. Highlights are especially useful for content optimisation: if Gemini highlights your content, that’s strong signal for AI citation potential.
How does Gemini compare to Google AI Mode?
Both are Google products but distinct surfaces. Gemini is the standalone AI assistant; Google AI Mode is the AI answer panel within Google Search. They return different citation sets, different source mixes, and serve different user intents. Run both for complete Google AI coverage.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/gemini" \
--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/gemini",
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/gemini?${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/gemini?${params}`
);
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrapellm.com/scrapers/gemini",
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/gemini"
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/gemini")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.scrapellm.com/scrapers/gemini")
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": "gemini",
"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...",
"highlights": [
"Klaviyo leads for e-commerce with advanced segmentation",
"Mailchimp remains the most accessible entry point"
],
"website_name": "Marketing Weekly",
"favicon": "https://example.com/favicon.ico"
}
],
"llm_model": "gemini-2.0-flash",
"credits_used": 3,
"elapsed_ms": 6521.8,
"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."
}