# Gemini Answer Scraper: Screenshots, Citations, Any Country (`dxffffff/gemini-answer-scraper`) Actor

Ask Google Gemini any prompt anonymously in a real browser. Get the full answer as Markdown, every cited source and a full-page screenshot as proof, per country. No API key, no login.

- **URL**: https://apify.com/dxffffff/gemini-answer-scraper.md
- **Developed by:** [Daniel B](https://apify.com/dxffffff) (community)
- **Categories:** AI, SEO tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 gemini answers

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Gemini Answer Scraper

**See exactly what Google Gemini tells a real visitor, and keep the screenshot to prove it.**

Gemini Answer Scraper asks Google Gemini your prompts the way a real person does: in a
real Chrome browser, logged out, from the country you choose. For every prompt you get the
full answer as clean Markdown, every source Gemini cited, and a **full-page screenshot**
of the answer as it appeared on screen.

Use it to capture how Gemini answers a question, which sites it cites, and how that answer
changes from one country to another — with a screenshot you can put in a report.

#### Why this Gemini scraper

- 📸 **Screenshot proof for every prompt.** A full-page JPEG of the real Gemini page,
  stored with the run and linked from each result. A prompt that fails gets a screenshot too,
  so you can see why.
- 🔗 **The citations Gemini actually used.** Sources are read from Gemini's own Sources
  panel, not guessed from the text. Duplicate links to one article are merged into one.
- 🌍 **Per-country answers.** Gemini answers for the country a visitor connects from. Pick a
  country and the run connects from there, with the browser language, region and time zone
  to match.
- 🕵️ **Anonymous, like a real visitor.** No Google account, no API key, no cookies of yours.
  You see the answer a first-time visitor in that country sees.
- 📦 **Batch runs.** Up to 20 prompts per run, each in a fresh tab of one browser session.
- 🛡️ **Automatic login-wall fallback.** Starts on cheap datacenter proxies. If Google shows
  a login wall, the run moves to a new datacenter address, then to residential, and asks
  that prompt again. Other failures (Gemini timing out, or a country datacenter can't reach)
  are recorded, not rerouted; a Gemini error reply is asked once more.

#### What data you get

| Field | What it is |
|---|---|
| `prompt` | The prompt you asked |
| `answered` | `true` when Gemini gave an answer |
| `text` | The full answer as Markdown (headings, lists, tables, code) |
| `citations` | Every cited source: `{ title, url }` |
| `citationCount` | Number of distinct sources |
| `citedDomains` | The cited sources' domains, in order |
| `screenshotUrl` | Link to the full-page screenshot |
| `country`, `language` | Where and how the prompt was asked |
| `egressPath`, `proxyGroup`, `fallbackUsed`, `attempts` | Which proxy answered it (`datacenter#0`, `residential-fallback`, `residential`, `custom-proxy`, …), and whether the run had to switch |
| `error` | Why a prompt failed (login wall, timeout, no answer, Gemini error), or `null` |
| `durationMs`, `scrapedAt` | Timing |

Export to JSON, CSV, Excel or HTML, or read it from the API.

#### How to use it

1. Enter one prompt, or a list of up to 20.
2. Pick a country (for example `us`, `es`, `de`) and a browser language.
3. Click **Start**. Each answer lands in the dataset as soon as it is ready.

#### Input example

```json
{
  "prompts": [
    "What are the best running shoes in 2026?",
    "Best budget noise-cancelling headphones?"
  ],
  "country": "us",
  "language": "en",
  "screenshot": true
}
```

Advanced options: `proxyConfiguration` (datacenter by default; choose `RESIDENTIAL` to
skip datacenter; your own proxy URLs are used as given, without fallback), `datacenterRotations` (0–3), `residentialFallback` (on by default) and
`answerWaitSecs` (10–300).

#### Output example

From a real run (answer and citations shortened):

```json
{
  "prompt": "Best budget noise-cancelling headphones?",
  "country": "us",
  "language": "en",
  "answered": true,
  "text": "When shopping for budget noise-cancelling headphones (typically under $100), you no longer have to sacrifice decent sound quality or effective Active Noise Cancellation (ANC). …",
  "citations": [
    { "title": "Best Noise Cancelling Over-Ear Headphones under $100", "url": "https://recordingnow.com/blog/best-noise-cancelling-headphones-under-100/" },
    { "title": "The 6 best budget headphones of 2026 (all under $100) - Mashable", "url": "https://mashable.com/roundup/best-budget-headphones-under-100-2026" }
  ],
  "citationCount": 2,
  "citedDomains": ["recordingnow.com", "mashable.com"],
  "screenshotUrl": "https://api.apify.com/v2/key-value-stores/<store-id>/records/screenshot-2",
  "egressPath": "datacenter#0",
  "proxyGroup": "AUTO",
  "fallbackUsed": false,
  "attempts": 1,
  "error": null,
  "durationMs": 43058,
  "scrapedAt": "2026-11-04T13:30:18.809Z"
}
```

#### FAQ

**What will a run cost me?**
You pay a fee per answered prompt, plus Apify platform usage (compute + proxy), which is
billed for failed prompts too. Failed prompts are not charged an answer fee. The current
per-answer price for your Apify plan is on this Actor's Pricing tab in Apify Store. Usage
depends on how much of the run needs residential proxies.

**Why does my answer differ from what I see in Gemini?**
You are probably logged in, in another country, or on a paid Gemini plan. This Actor shows
what an anonymous first-time visitor sees in the country you picked, which is the answer
most people get. Anonymous Gemini currently answers with Google's free default model.

**What is the screenshot for?**
Proof. It shows the page exactly as Gemini rendered it: the answer, its citation chips and the
logged-out session. Put it in a report when someone asks "did Gemini really say that?"

**Which countries work?**
Any country Gemini is available in. Datacenter proxies cover fewer countries. If a country
fails on datacenter, set the proxy group to `RESIDENTIAL`.

**Why did a prompt fail?**
The `error` field says why, and the screenshot shows it. Common causes: Google's login
wall (the run switches proxy and asks again automatically), Gemini taking longer than
`answerWaitSecs`, or Gemini replying with its own error message (asked once more
automatically). Failed prompts are not charged an answer fee. If no prompt in a run is
answered, the run ends as failed.

**Why did my run stop early, or fail with "maximum cost"?**
Each run has a maximum cost you set in Apify. Before each prompt the Actor checks that one
more answer still fits under it; if not, the remaining prompts are skipped (no rows, no
charge) and the status says "N skipped (max charge reached)". If the limit doesn't cover
even one answer (check the per-answer price for your plan on the Store Pricing tab), no
prompt is asked and the run ends as **failed** with a message saying so. Raise the maximum
cost per run in the run options.

**Why at most 20 prompts per run?**
Google limits how much one address can ask. Twenty per run keeps each run on one clean
session. For more prompts, start more runs, or schedule them.

**Is there an official Gemini API?**
Yes, but the API is not the Gemini app. It doesn't browse the web the same way, and it
doesn't give you the answer or citations a real visitor sees. Use this Actor when you care
about what people actually see.

**Is it legal to scrape Gemini?**
This Actor reads publicly available answers anonymously and stores no personal data. Check
the terms that apply to you and your use case, and ask a lawyer if in doubt.

**Can I use it from my own tools?**
Yes: the Apify API, webhooks, scheduled runs, Make, Zapier, n8n, Google Sheets, and MCP for
AI agents.

# Actor input Schema

## `prompt` (type: `string`):

One prompt to ask Gemini.

## `prompts` (type: `array`):

Additional prompts, each asked in a fresh tab, one after another. Combined with `prompt`, at most 20 per run (one egress address).

## `country` (type: `string`):

Two-letter country code (e.g. `es`, `us`). Sets the Apify proxy exit country (if the proxy has none set) and the browser locale region. Gemini answers for the country it is reached from.

## `language` (type: `string`):

Browser language, e.g. `en`, `es`, or a full tag like `es-419`.

## `proxyConfiguration` (type: `object`):

Apify proxy. Datacenter by default: a prompt that hits Gemini's login wall moves the run to a new datacenter session, then to residential (see the two fields below). Each egress is one sticky session. Pick the RESIDENTIAL group here to skip datacenter entirely. Your own proxy URLs are used as given (no fallback); rows then say egressPath `custom-proxy`.

## `datacenterRotations` (type: `integer`):

After a datacenter session hits Gemini's login wall, how many NEW datacenter sessions to try before residential. Each one relaunches the browser on a new exit IP. A rotation that comes back on an IP that already hit the wall is skipped.

## `residentialFallback` (type: `boolean`):

When every datacenter session has hit the login wall, move the rest of the run to one sticky RESIDENTIAL session and ask the walled prompt again there, once. Residential is billed per GB. Only applies when the proxy above is Apify datacenter.

## `browserChannel` (type: `string`):

`chrome`: the image's Google Chrome (a real Chrome build, new headless mode). `chromium`: Playwright's bundled Chromium (headless = chromium-headless-shell).

## `headless` (type: `boolean`):

Run the browser headless (default). Off = headed on the image's virtual display (Xvfb).

## `blockAssets` (type: `boolean`):

Experimental, off by default. Don't load images, web fonts or audio/video (stylesheets and scripts still load; the HTTP cache stays on). In our tests it showed no compute saving, and the batch it ran in had more timeouts and Gemini error replies. Icons in the screenshot render as text.

## `answerWaitSecs` (type: `integer`):

Max time to wait for a streamed answer to finish, per prompt.

## `screenshot` (type: `boolean`):

Store a full-page JPEG per prompt in the key-value store. A failed prompt always gets one.

## Actor input object example

```json
{
  "prompt": "What are the best running shoes in 2026?",
  "language": "en",
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "datacenterRotations": 1,
  "residentialFallback": true,
  "browserChannel": "chrome",
  "headless": true,
  "blockAssets": false,
  "answerWaitSecs": 90,
  "screenshot": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset with Markdown answers, citations, cited domains, and screenshot URLs.

## `files` (type: `string`):

Key-value store with per-prompt JPEG screenshots and RUN_STATS.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "prompt": "What are the best running shoes in 2026?",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dxffffff/gemini-answer-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "prompt": "What are the best running shoes in 2026?",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("dxffffff/gemini-answer-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "prompt": "What are the best running shoes in 2026?",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call dxffffff/gemini-answer-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dxffffff/gemini-answer-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/HdNbYCMou8BlDBJ6y/builds/6mnkHefM3JxJbxgio/openapi.json
