# Gemini Search Scraper - AI Answers with Sources (`scrapewise/gemini-search-scraper`) Actor

Scrape Google Gemini answers to search queries, no login: full answer, cited sources with position, title and domain, citations per sentence, follow-up suggestions, by country. US$ 0.04 per answer, errors free.

- **URL**: https://apify.com/scrapewise/gemini-search-scraper.md
- **Developed by:** [Scrapewise Data](https://apify.com/scrapewise) (community)
- **Categories:** AI, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $34.00 / 1,000 gemini answer delivereds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 Search Scraper

Gemini Search Scraper collects **what Google Gemini answers to a search query**, without login. Give it a list of queries (best electric cars of 2026, Notion vs Obsidian, best running shoes for beginners) and get back, for each one, the **full answer**, every **source Gemini searched and cited** (URL, title, domain, position), the **citations sentence by sentence** (which source backs which part of the answer, with character offsets), the **products** Gemini shows for shopping queries (price, store, rating, Google Shopping link), follow-up suggestions, model version, country and date. One clean row per query, ready for a spreadsheet, a dashboard or an AI pipeline.

**US$ 0.04 per answer. No monthly fee, no start fee. Error rows are free.**

### At a glance

- **Price per answer:** US$ 0.04 (US$ 40 per 1,000), no run start fee
- **Engine:** Google Gemini with web search, logged-out
- **Sources:** Every searched or cited URL with position, title, domain and site name, flagged `citedInAnswer`
- **Citations:** Each cited sentence with its text, `startIndex` / `endIndex` in the answer and the sources behind it
- **Products:** For shopping queries, each product card with title, brand, store, price and currency, rating, review count, image and Google Shopping link
- **Location:** Ask from any country with a 2-letter code (US, GB, DE, BR, JP...); answers and sources change by country
- **Brand check (optional):** Mentioned or not, mention count, rank, cited as a source, same price
- **Error rows:** Free, with an `errorCode`

### What it fixes

- **Price.** A Gemini answer with its sources costs US$ 0.04 here, with no start fee and no charge for errors.
- **Inputs that just work.** Country and language are free text: `US`, `us`, `Japan`, `en-GB` and `pt-BR` all work, and an unknown value falls back to US with a log line instead of failing the run.
- **Citations you can use.** Sources come de-duplicated, with tracking parameters and `#:~:text=` fragments removed, and each one says whether Gemini actually cited it in the answer or only searched it.
- **No dead links.** Gemini's answer points product mentions and images to internal app links that do not open outside Gemini; here product links are replaced with their Google Shopping link, internal placeholders are removed, and citation offsets match the cleaned answer.
- **Two answer formats.** `answer` keeps Gemini's Markdown (headings, lists, inline links); `answerText` is the same answer as plain text for spreadsheets and NLP.
- **Clear failures.** A query that could not be answered becomes a free error row with a reason, so you never pay for an empty result.

### Switching from another Gemini search actor? Your existing input works

The input names used by other Gemini and AI search actors are accepted as they are, so you can paste your current input:

| You send | Read as |
|---|---|
| `queries`, `prompts`, `searchQueries`, `questions`, `query`, `prompt`, `keywords`, `searchTerms` | Search queries (a list or a single string) |
| `country`, `countryCode`, `location`, `proxyCountry`, `gl` | Country (code or name) |
| `language`, `languageCode`, `lang`, `hl` | Interface language |

Each output row carries both `query` and `prompt`, so downstream code written for either name keeps working.

### One real row

Query `What are the best electric cars of 2026?`, country `US` (collected in the Apify cloud on 2026-10-09; answer and lists shortened here):

```json
{
  "type": "answer",
  "query": "What are the best electric cars of 2026?",
  "answer": "The automotive market features an impressive lineup of electric vehicles spanning various categories, from affordable daily drivers to high-performance sports cars and spacious family SUVs. \n\n### Best Electric Sedans and Hatchbacks\n* **[Tesla Model 3](https://www.edmunds.com/electric-car/)**: Continues to be a top recommendation ...",
  "answerText": "The automotive market features an impressive lineup of electric vehicles spanning various categories, from affordable daily drivers to high-performance sports cars and spacious family SUVs. \n\nBest Electric Sedans and Hatchbacks\n- Tesla Model 3: Continues to be a top recommendation ...",
  "answerLength": 2468,
  "sourceCount": 8,
  "citedSourceCount": 7,
  "sources": [
    {
      "position": 1,
      "url": "https://www.reddit.com/r/electricvehicles/comments/1uz0izi/the_10_bestselling_evs_of_2026_so_far_in_the_us/",
      "title": "The 10 best-selling EVs of 2026 so far in the U.S. (Car & Driver)",
      "domain": "reddit.com",
      "citedInAnswer": false,
      "siteName": null
    },
    {
      "position": 2,
      "url": "https://www.carwow.co.uk/electric-cars",
      "title": "Best Electric Cars 2026 | EVs to Consider & Avoid - Carwow",
      "domain": "carwow.co.uk",
      "citedInAnswer": true,
      "siteName": "Carwow"
    },
    {
      "...": "6 more"
    }
  ],
  "citedDomains": [
    "carwow.co.uk",
    "roadandtrack.com",
    "caranddriver.com",
    "edmunds.com",
    "insideevs.com",
    "kbb.com"
  ],
  "citationCount": 8,
  "citations": [
    {
      "position": 1,
      "text": "The automotive market features an impressive lineup of electric vehicles spanning various categories, from affordable daily drivers to high-performance sports cars and spacious family SUVs.",
      "startIndex": 0,
      "endIndex": 189,
      "sources": [
        {
          "url": "https://www.edmunds.com/electric-car/",
          "title": "Best Electric Cars of 2026 and 2027 - Expert Reviews and Rankings",
          "domain": "edmunds.com",
          "siteName": "Edmunds",
          "snippet": "Luxury electric cars tend to cost a lot more than mainstream models, but you also get a lot more, typically including sports-car acceleration and the latest in..."
        }
      ]
    },
    {
      "...": "7 more"
    }
  ],
  "searchResultCount": 7,
  "webSearchUsed": true,
  "productCount": 0,
  "products": [],
  "followUpSuggestions": [],
  "model": "Gemini 3.5 Flash-Lite",
  "answerLanguage": "en",
  "country": "US",
  "language": "en",
  "geminiLocation": "New York, NY, USA",
  "responseSeconds": 6.3,
  "scrapedAt": "2026-10-09T02:29:01Z"
}
```

For a shopping query (`best budget noise cancelling headphones`, same run) the row also carries the product cards Gemini showed, one entry per product:

```json
{
  "productCount": 6,
  "products": [
    {
      "position": 1,
      "title": "JLab JBuds Lux ANC Over-Ear Headphones",
      "brand": "JLab",
      "merchant": "Best Buy",
      "price": "$39.99",
      "priceValue": 39.99,
      "currency": "USD",
      "rating": 4.6,
      "reviewCount": 7250,
      "productId": "8139787361734834398",
      "googleShoppingUrl": "https://google.com/search?q=JLab+JBuds+Lux+ANC+Over-Ear+Headphones&prds=...&ibp=oshop",
      "imageUrl": "https://encrypted-tbn0.gstatic.com/shopping?q=...",
      "description": "...",
      "mentionedInAnswer": true
    },
    {
      "...": "5 more"
    }
  ]
}
```

### What you can do with it

- **AI search monitoring:** see which pages Gemini searches and cites for the queries that matter in your market, by country.
- **GEO / AEO research:** find the domains Gemini trusts in a category, and where your content needs to earn coverage.
- **Product research:** which products, prices and stores Gemini recommends for "best X" shopping queries, by country.
- **Content and SEO research:** compare Gemini's answer and sources with the classic search results for the same query.
- **Datasets for analysis:** build a dated record of AI answers and citations, and track how they change run after run.

### Input

| Field | What it does |
|---|---|
| `queries` | Search queries, up to 300 characters each |
| `country` | Where the queries are asked from (IP location). Default `US` |
| `language` | Interface language. Empty follows the country |
| `brands` | Optional: brands or domains to check in each answer (`Tesla \| tesla.com`) |

```json
{
  "queries": ["What are the best electric cars of 2026?", "Notion vs Obsidian for personal notes"],
  "country": "US"
}
```

With no input at all, the Actor runs one example query, so a test run always returns data.

This Actor is built for search queries. Content generation requests (write, generate, translate, code...) and queries over 300 characters are returned as free `INVALID_INPUT` rows. Queries are asked one at a time, in a fresh chat each.

### Output fields

`query` and `prompt` (same value), `answer` (Markdown), `answerText` (plain text), `answerLength`, `sourceCount`, `citedSourceCount`, `sources` (`position`, `url`, `title`, `domain`, `siteName`, `citedInAnswer`), `citedDomains`, `allDomains`, `citationCount`, `citations` (`position`, `text`, `startIndex`, `endIndex`, `sources` with `snippet`), `searchResultCount`, `webSearchUsed`, `productCount`, `products` (`position`, `title`, `brand`, `merchant`, `price`, `priceValue`, `currency`, `rating`, `reviewCount`, `productId`, `googleShoppingUrl`, `imageUrl`, `description`, `mentionedInAnswer`), `followUpSuggestions`, `model`, `answerLanguage`, `country`, `language`, `geminiLocation` (the location Gemini inferred from the IP), `responseSeconds`, `scrapedAt`.

When you pass `brands`, each row also has `brands` (`brand`, `mentioned`, `mentionCount`, `firstMentionOffset`, `firstMentionRank`, `cited`, `citationPosition`), `brandsMentioned` and `brandsCited`.

#### Error codes (never charged)

| errorCode | Meaning |
|---|---|
| `INVALID_INPUT` | Query over 300 characters, or a content generation request |
| `BLOCKED` | Gemini did not answer after retries from fresh IPs; run again |
| `NOT_REACHED`, `UNEXPECTED` | The run timeout arrived, or something unforeseen broke; only that query is lost |

### Pricing

| Event | Price |
|---|---|
| Gemini answer delivered | US$ 0.04 |

100 queries cost US$ 4. Error rows are free, and there is no Apify compute or proxy bill on top.

### Limitations

- Answers are what a logged-out visitor sees on Gemini. AI answers vary from one run to the next; compare several runs before drawing conclusions.
- Queries run one at a time with a short pause, about 8 to 12 seconds each.
- If Gemini ever shows a challenge (captcha) to logged-out visitors, the Actor does not try to solve it: the query becomes a free `BLOCKED` row.
- This Actor reads public answers only and respects the sites' terms.

### FAQ

**Do I need a Google account, an API key or cookies?**
No. Queries are asked logged-out, as a visitor sees Gemini, through the Apify proxy.

**What does a run cost?**
US$ 0.04 per answer delivered, with no start fee. 100 queries cost US$ 4. Error rows are free, and there is no Apify compute or proxy bill on top.

**How do I get the products Gemini recommends?**
For shopping queries, each row carries `products` with `title`, `brand`, `merchant`, `price`, `rating`, `reviewCount` and `googleShoppingUrl`. Queries that show no product cards return an empty `products` list.

**Can I check whether my brand is mentioned or cited?**
Yes. Add it to `brands` as a name, a domain or both (`Tesla | tesla.com`). Each row then also has `brands`, `brandsMentioned` and `brandsCited`, at the same price.

**Can I ask from another country?**
Yes. Set `country` to a 2-letter code (US, GB, DE, BR, JP...) or a country name. Answers and cited sources change by country.

**What are the limits?**
Queries run one at a time, about 8 to 12 seconds each, up to 300 characters each. Content generation requests come back as free `INVALID_INPUT` rows, and a captcha is never solved: that query becomes a free `BLOCKED` row.

### Changelog

- **2026-10-17:** FAQ in this page.
- **2026-10-09, 0.1:** first release. Gemini answers with searched and cited sources, sentence-level citations with offsets, product cards, follow-up suggestions, any country, optional brand check, input names of other Gemini search actors accepted, free error rows.

# Actor input Schema

## `queries` (type: `array`):

What to search on Google Gemini, one query per line, up to 300 characters each (for example: best electric cars of 2026, best running shoes for beginners, Notion vs Obsidian). Each query is asked once, in a fresh chat. Content generation requests (write, generate, translate, code...) are returned as free INVALID_INPUT rows. Also accepted under the names prompts, searchQueries, questions, query, prompt and keywords.

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

Two-letter country code the queries are asked from (US, GB, CA, AU, DE, FR, ES, IT, NL, BR, MX, IN, JP...). Gemini answers and cited sources change by country. A country name (Brazil, Japan) also works; anything unrecognized falls back to US.

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

Interface language code sent to Gemini (en, pt, es, fr, de, ja, or a full tag like pt-BR). Leave empty to follow the country. The answer usually follows the language of the query.

## `brands` (type: `array`):

Optional. A name (Tesla), a domain (tesla.com) or both separated by | (Tesla | tesla.com). Each answer then also says whether the brand was mentioned, how often, its rank among the brands, and whether its domain was cited. Same price.

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

Keep Apify Proxy on (included in the price). The Actor picks the right IP for the country you chose.

## Actor input object example

```json
{
  "queries": [
    "What are the best electric cars of 2026?",
    "Notion vs Obsidian for personal notes"
  ],
  "country": "US",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `resultsCsv` (type: `string`):

No description

# 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 = {
    "queries": [
        "What are the best electric cars of 2026?",
        "Notion vs Obsidian for personal notes"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapewise/gemini-search-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 = {
    "queries": [
        "What are the best electric cars of 2026?",
        "Notion vs Obsidian for personal notes",
    ],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapewise/gemini-search-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 '{
  "queries": [
    "What are the best electric cars of 2026?",
    "Notion vs Obsidian for personal notes"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scrapewise/gemini-search-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapewise/gemini-search-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/qlF1UATiEl3jdPiA7/builds/dZNDyEPP0XUGsPDbS/openapi.json
