Google AI Mode API
for AI answers as clean JSON
Get Google's AI Mode answer for any query as clean JSON. One request returns the full response as typed blocks, paragraphs, headings, lists, and tables, each with the key phrases already highlighted. No headless browser, no session juggling.
of requests succeed
median response
95% finish faster
per 1k AI answers at volume
AI Mode is a moving target. Your code shouldn't care.
- A headless browser for a JS-only surface
- Sessions and consent gates
- Blocks that change shape per query
- Answers that stream in chunks
- Fix the parser again next week
One GET Request. That's the whole integration.
Start with just a query. Add more parameters when your use case needs them.
curl -G 'https://api.hasdata.com/scrape/google/ai-mode' \
--data-urlencode 'q=Is coffee good for health?' \
--data-urlencode 'location=Austin,Texas,United States' \
--header 'x-api-key: <YOUR_API_KEY>' \
--header 'Content-Type: application/json'q * Search Querylocation Locationuule Encoded Locationgl Countryhl Languagecontinuable ContinuablesubsequentRequestToken Subsequent Request TokenStructured blocks, not a screenshot
The answer comes back as an ordered textBlocks array. Each block is typed, so you render the prose, tables, and code the way you want.
{
"textBlocks": [
{
"type": "paragraph",
"snippet": "The Apple MacBook Air (M4) is widely regarded by tech experts as the overall best laptop for college students.",
"snippetHighlightedWords": [
"Apple MacBook Air (M4)",
"all-day battery life, blazing-fast M4 performance, and a premium, lightweight design"
]
}
]
}type stringparagraph | heading | list | table | code | shoppingResults | localResults
snippet stringBlock text
snippetHighlightedWords string[]Key phrases emphasized in the answer
{
"textBlocks": [
{
"type": "list",
"list": [
{
"snippet": "Explore local parks: hike, pack a picnic, or relax at a park near you."
},
{
"snippet": "Go camping: pitch a tent in the backyard or find a nearby campsite."
},
{
"snippet": "Try kayaking or canoeing: rent a boat and get some exercise on the water."
}
]
}
]
}type string"list"
list object[]Ordered items, each with a snippet
list[].snippet stringItem text
{
"textBlocks": [
{
"type": "table",
"rows": [
[
"Laptop",
"Best For",
"Key Highlight",
"OS"
],
[
"Apple MacBook Air (M4)",
"Overall Best",
"15+ hour battery, silent fanless build",
"macOS"
],
[
"Microsoft Surface Laptop (7th Ed)",
"Premium Windows",
"Stunning 120Hz display, great haptic trackpad",
"Windows"
]
]
}
]
}type string"table"
rows string[][]Row-major cells; the first row is the header
{
"textBlocks": [
{
"type": "code",
"language": "javascript",
"snippet": "const crypto = require('crypto');\nconst hash = crypto.createHash('sha256');\nstream.on('data', (c) => hash.update(c));\nstream.on('end', () => console.log(hash.digest('hex')));"
}
]
}type string"code"
language stringDetected language
snippet stringCode, newlines preserved
{
"textBlocks": [
{
"type": "shoppingResults",
"shoppingResults": [
{
"position": 1,
"title": "Asus Zenbook 14 OLED",
"price": "$999.99",
"extractedPrice": 999.99,
"reviews": 1000,
"rating": 4.5,
"immersiveProductPageToken": "eyJhbGciOiJIUzI1NiIs…",
"hasdataLink": "https://api.hasdata.com/scrape/google/immersive-product?pageToken=eyJ…"
}
]
}
]
}title stringProduct name
price / extractedPrice string / numberFormatted and numeric price
rating / reviews numberScore and review count
hasdataLink stringReady-made call to the Immersive Product API for full detail
{
"textBlocks": [
{
"type": "localResults",
"localResults": [
{
"position": 1,
"title": "Siragusa's Taste of Italy",
"address": "4115 S Redwood Rd",
"openState": "Open",
"reviews": 2200,
"rating": 4.4,
"type": "Italian"
}
]
}
]
}title stringBusiness name
address stringStreet address
rating / reviews numberScore and review count
openState stringOpen / Closed status
An all-in-one scraping service
Every feature you need to collect data from thousands to millions of requests.
Discover similar
scrapers and APIs
to expand your projects.
Google SERP API
Live SERP Data • $0.75 / 1k Request
Google SERP Scraper
SERP Data • $0.07 / 1k Rows
Fits right into your stack.
Works with the tools you already use.
View Documentation ->Teams that deleted their scraper
Now it's the part of the pipeline they don't think about
The SERP API provides accurate, structured search engine data across multiple regions and devices, enabling us to monitor market trends and performance with ease.
HasData delivers exactly what we need: speed and comprehensive search features. It's the fastest API we've used in this space. Plus, their customer support is fantastic.
We use the Google SERP API by HasData for its AI-overview feature. It delivers real-time data with consistent reliability. The JSON output includes an actual SERP screenshot, ensuring full accuracy.
We rely on HasData for search performance data and broader scraping needs. Their APIs deliver highly structured data that integrates directly into our platforms.
We are using this service for google scraping and it works well. We used to use several services, but this looks like best match efficiency/cost.
Plans that get cheaper at scale
Fixed price, fixed volume, no surprises at the end of the month. Upgrade when you need more.
Free
Startup
Business
RecommendedEnterprise
Monthly AI answer volume
Start with 66 free AI answers. No credit card required.
Questions, answered
Per successful request. One request returns the complete AI Mode answer. A failed request costs nothing.
Yes, a one-time trial of 66 AI answers with every block type included. No credit card required. When you're done testing, pick a plan that fits your volume.
Paid plans start at $49 per month for about 13,000 answers and scale to 6 million a month. The unit price drops with volume, from $3.68 down to $1.12 per 1,000 answers.
The answer as an ordered array of typed blocks: paragraphs, headings, lists, tables, and code, plus product and local blocks when Google includes them. Each block carries its text and highlighted key phrases.
Google generates the answer on demand, so a request takes as long as the answer takes to generate. Budget several seconds per call.
No. HasData renders AI Mode and returns the structured result. No browser, no tokens, no prompt engineering.
Nothing on your side. We track the changes and keep the response schema stable. Fields keep their names and types, and existing keys don't disappear.
Yes, you can cancel your subscription at any time from your dashboard in a few seconds. Once cancelled, there are no recurring payments.
Your first AI Mode answer
is minutes away
66 AI answers free · no credit card