Skip to main content

Overview

The ScrapeBadger Gemini API sends a prompt to the real gemini.google.com — not the Gemini developer API — and returns the answer as structured JSON, including the web sources Gemini actually grounded on and cited. Requests are anonymous: no Google account, no Gemini API key, no billing relationship with Google. You see what a logged-out user in your chosen country sees, answered by the anonymous surface’s Gemini Flash-Lite model.
All endpoints live under https://scrapebadger.com/v1/gemini/* and authenticate with the X-API-Key header. /ask and /brand-visibility accept both GET (query params) and POST (JSON body). Credits are charged per request and reported on the X-Credits-Used response header.
Answers are a live render of gemini.google.com, not a cached lookup — the clock includes Gemini composing the answer and, when it grounds, running its own web search. Set your HTTP client timeout to 130 s; the default 5–10 s timeout in most SDKs will abort the call. At volume, run asks asynchronously.

Features

  • Real Gemini answers — the full text as rendered on gemini.google.com, plus a Markdown variant when one is available.
  • Anchored citations — every citation carries start_index / end_index character offsets into answer and the matched_text it supports, so you can highlight exactly which sentence a source backs.
  • The full search trail — search_results is everything Gemini retrieved, each flagged cited: true/false. citations is the subset it actually referenced. Most APIs only give you the second list.
  • Did it really search? — web_search_triggered tells you whether Gemini grounded the answer with a web search or answered from its own weights. Ask for one with web_search=force (more likely, not guaranteed), or suppress it with web_search=off.
  • Brand visibility (AEO/GEO) built in — one call returns mention counts, position score, share of voice against named competitors, and whether your domain was cited. No separate subscription.
  • Country control — country picks the egress country, so you can compare the answer a user in DE gets against the one in US.
  • No image input — image_url and image_base64 return 422 and are not billed. Signed-out Gemini accepts the upload and then refuses to answer about it (PERMISSION_DENIED from its own generate call), so we fail immediately rather than charge for a request that cannot succeed. Use ChatGPT /ask for image input. Image generation is not available either: anonymous gemini.google.com gates that behind a login.

Honesty caveat

Each request is a single, fresh, anonymous question. There is no conversation memory, no multi-turn follow-up, no model selection, no streaming, and no image input or output — conversation_id and message_id identify the one-shot exchange, they are not handles you can continue from. Attaching a picture returns 422; ChatGPT’s /ask takes one. The anonymous surface always answers with a Gemini Flash-Lite model; the model field reports which build answered, it is not a request parameter.Gemini is non-deterministic: the same prompt asked twice can produce different wording and different sources. For monitoring use cases, sample repeatedly and aggregate rather than trusting a single call.

Credits

At the PAYG rate of $0.15 per 1K credits, an `/ask` call is **$0.003** — $3.00 per 1,000 answers. Subscription tiers cut that substantially. Non-2xx responses are never billed.

Quickstart

What you can build

AEO / GEO monitoring

Track whether Gemini names your brand for the prompts your buyers ask, how early it names you, and how you rank against competitors — with /brand-visibility.

Citation-source auditing

Find which domains Gemini trusts for a topic. search_results shows everything it retrieved; cited shows what survived into the answer.

Answer-quality research

Compare answers across countries, or with web_search forced on and off, to separate what Gemini knows from what it looked up.

Cross-model comparison

Ask the same prompt on the ChatGPT API and here — both return the same response shape, so comparing how each model answers and who each model cites is a diff, not a project.

Run this asynchronously

Calls on this API can run in the background, so you don’t hold a connection open while they work. Add one of these to the call:
An async call is billed once, when it completes. See Async requests and webhooks for webhooks, signatures and the SDK helpers.

FAQ

No. This drives the public gemini.google.com web interface as an anonymous visitor. You do not need a Google account, a Gemini API key, or a Google AI subscription — and answers include the web citations Gemini showed, which the developer API does not return in this form.
Because a real answer is being generated, and when Gemini grounds it runs its own web search first. Budget a 130 s client timeout, or run calls asynchronously and poll for the result.
No. Every request is a fresh, standalone question with no memory of previous calls. Put all necessary context in the single prompt (up to 4,096 characters).
No. The anonymous gemini.google.com surface always answers with a Gemini Flash-Lite model. The model field in a response reports which build answered — but you cannot request a specific one.
Check web_search_triggered. If it is false, Gemini answered from its training data and there were no sources to cite — that is normal for general-knowledge prompts. Set web_search=force to make grounding more likely. It does not guarantee a search or citations, and a 2xx answer is billed whether or not it has citations.
No. Gemini is non-deterministic, and the live web changes. For tracking, sample the same prompt on a schedule and look at the trend, not a single result.
It changes the egress country of the request, which affects the localised results Gemini retrieves and can change the answer’s emphasis and language. Pass any ISO-3166 alpha-2 code; the default is US. Targeting is country-level, not city-level. A country with no available exit fails with 502 and is not billed; the ask never falls back to another country. See Proxy countries for measured coverage.
You get {"detail": {"code": ..., "message": ...}} with an HTTP status of 422, 429 or 502 depending on the cause. Non-2xx responses are never billed, so a retry costs you nothing extra beyond the successful call.
Start with /ask to see the shape of a real answer, then move to /brand-visibility once you know which prompts matter for your market.