AI Mode API

Google AI Mode Search Scraper API for AI Answers, Source References, and Structured Output

Search Google AI Mode, retrieve structured AI-generated answers and source references, and access Markdown or cleaned HTML output through one purpose-built API endpoint.

1,000 free credits
No credit card required

Use the same API key and credit balance across every ScrapeBadger API.

GET /v1/google/ai-mode/search
{
  "query": "what is container orchestration",
  "text_blocks": [
    {
      "type": "paragraph",
      "snippet": "Container orchestration automates the deployment...",
      "text": "Container orchestration automates the deployment and management of containerised applications."
    }
  ],
  "references": [
    {
      "title": "Example container orchestration guide",
      "link": "https://example.com/container-orchestration",
      "source": "example.com"
    }
  ]
}
Endpoints

Explore the Google AI Mode Search API Endpoint

Move from a search query to AI-generated text blocks, source references, Markdown, and optional HTML with structured JSON responses.

  1. Submit a query
  2. Retrieve the AI-generated answer
  3. Reuse its text blocks, references, Markdown, or HTML
GET/v1/google/ai-mode/search7 credits

Google AI Mode Search

Search Google AI Mode for a query and receive the AI-generated answer as structured text blocks, source references, Markdown, and optional cleaned HTML.

Control the country and language context with gl and hl. Use include_html=false when your workflow needs only the structured text blocks, references, and compact Markdown instead of the larger raw answer HTML.

Parameters
qrequiredSearch query for the AI-generated response.
Request
curl --get \
  'https://scrapebadger.com/v1/google/ai-mode/search' \
  --data-urlencode 'q=what is container orchestration' \
  --data-urlencode 'gl=us' \
  --data-urlencode 'hl=en' \
  --data-urlencode 'include_html=false' \
  --header 'x-api-key: YOUR_API_KEY'
Response200 OK
{
  "query": "what is container orchestration",
  "text_blocks": [
    {
      "type": "paragraph",
      "snippet": "Container orchestration automates the deployment...",
      "text": "Container orchestration automates the deployment, scaling, networking, and management of containerised applications.",
      "level": 0,
      "header": [],
      "rows": []
    },
    {
      "type": "paragraph",
      "snippet": "It is commonly used to coordinate...",
      "text": "It is commonly used to coordinate containers across multiple machines and application environments.",
      "level": 0,
      "header": [],
      "rows": []
    }
  ],
  "references": [
    {
      "title": "Example container orchestration guide",
      "link": "https://example.com/container-orchestration",
      "snippet": "An introduction to managing containers across application environments.",
      "source": "example.com"
    },
    {
      "title": "Example container platform documentation",
      "link": "https://docs.example.org/container-platform",
      "snippet": "Documentation covering automated deployment, scaling, and management.",
      "source": "docs.example.org"
    }
  ],
  "language": "en",
  "country": "us",
  "markdown": "Container orchestration automates the deployment, scaling, networking, and management of containerised applications.",
  "answer_html": null
}
View Google AI Mode Search documentation

What Can You Build With the Google AI Mode Search Scraper API?

AI answer and search-visibility monitoring

Search commercially or editorially relevant queries and capture the answers Google AI Mode generates. Track answer text, structured blocks, cited sources, country, and language across consistent searches to study how subjects are represented in AI-powered search.

Google AI Mode Search

Brand and source-reference monitoring

Search brand names, products, executives, competitors, and industry topics to examine whether Google AI Mode mentions the organisation or references its website. Preserve the answer, reference title, link, snippet, and source so changes can be reviewed over time.

Google AI Mode Search

Generative-search competitive research

Compare how Google AI Mode describes competing products, companies, technologies, or services for the same queries. Analyse differences in answer structure, terminology, referenced sources, and country or language context without treating a single response as permanent.

Google AI Mode Search

AI search research and quality analysis

Build structured datasets of AI-generated answers and references for search research, journalism, content analysis, source-diversity studies, or internal quality reviews. Store the original query, collection time, country, language, text blocks, references, and Markdown so every observation retains its context.

Google AI Mode Search
Sign Up For Free

1,000 free credits · No credit card required

More Google Data APIs

Use the same ScrapeBadger account, API key, and credit balance to connect AI-generated answers with traditional search results, current news, academic sources, and demand signals.

Why Choose ScrapeBadger?

Build Faster

Structured JSON responses remove browser automation, proxy orchestration, and HTML parsing from your roadmap. Make your first request in minutes and move from proof of concept to production without maintaining scrapers.

Scale Confidently

99.9% uptime SLA. Your data pipeline does not stop because Google changes a page, rotates an anti-bot challenge, or moves a result block. Monitoring, session management, browser infrastructure, and parsing are all us.

All Google Data on One Platform

Search, Maps, News, Hotels, Trends, Jobs, Shopping, Patents, Scholar, Images, Videos, Finance, AI Mode, Lens, Local, Shorts, Flights, Products, and Autocomplete — every Google surface under one API key.

Integrate Anywhere

RESTful API, SDK support, MCP, CLI, and no-code options. Use ScrapeBadger in an existing system or a new application with consistent authentication, structured JSON, and unified billing.

Integrate With Your Stack

Use ScrapeBadger through an official SDK, a standard API request, MCP, CLI, or the tools already in your workflow.

Python SDK

Build asynchronous data pipelines with typed responses, retry handling, and access to the complete Google API suite.

Node.js SDK

Add Google data to Node.js and TypeScript applications with type definitions and support for both ESM and CommonJS.

REST API

Connect from any backend or programming language using standard HTTP requests. Responses arrive as structured JSON that can be stored, transformed, or passed into another service.

One API Key

Access Search, Maps, News, Trends, Shopping, Scholar, Flights, and every other supported Google product with one ScrapeBadger API key and one credit balance.

MCP for AI Tools

Give compatible AI agents access to Google Search, Maps, News, Trends, Shopping, Scholar, Images, Flights, and more through ScrapeBadger's MCP server.

ScrapeBadger CLI

Run Google searches, inspect trends, collect local business data, and export results as JSON, CSV, Markdown, or terminal-friendly tables without building an application.

Trusted by Developers Worldwide

See why developers choose ScrapeBadger for reliable, structured web data.

We switched from the official Twitter API and cut our costs by 95%. The pagination is seamless, and we've never hit a rate limit. Best decision we made this year.

MC
Marcus Chen
Lead Data Engineer at DataFlow Analytics
2 weeks ago

The follower and engagement endpoints are incredibly detailed. We use it for influencer research and competitor analysis. Response times are sub-100ms consistently.

SM
Sarah Mitchell
Marketing Director at SocialPulse Agency
1 month ago

Started with the Apify actor, then moved to the API for more control. The 1,000 free credits were enough to build our MVP. Now processing 2M+ tweets monthly.

JR
James Rodriguez
Founder at TweetMetrics
3 weeks ago

Perfect for academic research. The community and trends endpoints give us data we couldn't get anywhere else. Documentation could use more examples, but support is responsive.

EW
Emily Watson
Research Scientist at Stanford NLP Lab
1 month ago

We monitor 50,000+ accounts for our clients. ScrapeBadger handles it without breaking a sweat. The bulk ID endpoints are a game-changer for large-scale monitoring.

AP
Alex Petrov
CTO at MediaMonitor Pro
2 weeks ago

The geo and trends endpoints power our location-based analytics. Setup took 10 minutes. Their Apify actors are also great for quick one-off scrapes.

LP
Lisa Park
Product Manager at Trendy AI
3 weeks ago
Pricing

Simple, transparent pricing

Start with pay-as-you-go credits (never expire) or save up to 64% with a monthly or annual subscription. Failed requests never consume credits, and every Google API endpoint is included on every plan.

Not Sure Which Plan Fits Your Needs? Calculate Your Cost and Find the Right Plan.

Choose an endpoint and enter your expected request volume. Google APIs use flat per-request credits, making usage easy to forecast. Failed requests cost 0 credits.

FAQ

Frequently asked questions

Everything you need to know about the AI Mode API.

What data can I retrieve with the Google AI Mode Search Scraper API?

The endpoint returns the original query, structured text blocks, source references, language, country, compact Markdown, and optional cleaned answer HTML. A reference can include its title, link, snippet, and displayed source.

What is the difference between Google AI Mode and an AI Overview?

Google AI Mode is Google's dedicated generative-search experience, while an AI Overview is an AI-generated block that can appear within a standard Google search-results page. The documented endpoint on this page retrieves Google AI Mode search responses. Do not assume that its output is identical to an AI Overview shown in a standard SERP.

What is the difference between text_blocks and references?

The text_blocks array contains the structured parts of the AI-generated answer. Blocks can include text, snippets, heading levels, table headers, and table rows. The references array contains the source titles, links, snippets, and source names associated with the response.

What do markdown, answer_html, and include_html do?

The markdown field provides a compact Markdown representation of the complete answer. The answer_html field provides the cleaned raw answer-body HTML with scripts and styles removed. Because the HTML can contain hundreds of kilobytes, set include_html=false when your workflow needs only text blocks, references, and Markdown.

Can I rely on Google AI Mode answers and references as verified facts?

No. Google AI Mode generates answers that can be incomplete, outdated, inaccurate, or unsupported. A listed reference does not guarantee that it supports every statement in the response. Verify important claims by opening the references and consulting appropriate authoritative sources.

How much does the Google AI Mode Search Scraper API cost?

Google AI Mode Search currently costs 7 credits per successful request. There is no additional charge for each text block, reference, Markdown section, or HTML element returned. Failed requests cost 0 credits.

Start Building With the Google AI Mode Search Scraper API

Use 1,000 free credits to retrieve AI-generated answers, structured text blocks, source references, Markdown, and optional cleaned HTML through one structured JSON endpoint.

No credit card required · Failed requests cost 0 credits

Disclaimer: ScrapeBadger is not affiliated with, endorsed by, or in any way officially connected with Google LLC or any of its subsidiaries or affiliates. Google and related trademarks are the property of their respective owners.