# Gemini AI Answer, Citation & Brand Mention Tracker (`xyrelith-data/gemini-answer-tracker`) Actor

Ask Google Gemini logged-out web prompts and record the full answer, sections, inline citations and sources, follow-up suggestions, the model label, and per-brand visibility so teams can track how generative search answers change.

- **URL**: https://apify.com/xyrelith-data/gemini-answer-tracker.md
- **Developed by:** [Xyrelith Data](https://apify.com/xyrelith-data) (community)
- **Categories:** AI, SEO tools, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 results

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/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 AI Answer, Citation & Brand Mention Tracker

Ask **Google Gemini** a list of prompts and get a structured record of what Gemini answered, how the answer is organised, which pages it cited, which follow-ups it suggested, and whether your brand or a competitor appeared or was cited. No Google account, cookie, API key or proxy setup is required.

This is an answer-visibility tracker for the logged-out Gemini web experience. It keeps the full answer as plain text and Markdown, keeps every inline citation chip and its source cards, and turns brand mentions into comparable flags so you can measure generative search visibility over time.

### What this actor does

- **Fresh logged-out chat per prompt** — every prompt is asked in its own Gemini chat, so one answer cannot influence the next.
- **Full answer in two formats** — readable `answerText`, faithful `answerMarkdown`, word/character counts, and `answerSections` with headings.
- **Citation-level detail** — every inline citation chip, its position in the answer, the sentence it supports, the exact supporting text Gemini highlights, and every source card with title, URL, domain and snippet.
- **Follow-up intelligence** — Gemini's suggested next prompts, the conditional follow-up question, and its action buttons when shown.
- **Brand and domain visibility** — for each tracked brand: mentioned, mention count, first position, surrounding sentence, simple sentiment, and whether the brand's domain is among the cited sources.
- **Prompt × language matrix** — ask the same prompts across several interface languages in one run.
- **Optional run aggregate** — one extra row with brand share of voice, mention/citation rates and the most-cited domains.
- **Empty fields are omitted** — never `null`, `""`, `[]` or `{}` in a record.

### Output per answer

One row per prompt (or per prompt-language pair) with `recordType: "geminiAnswer"`.

- `prompt`, `promptSent` — your prompt and the exact text sent to Gemini, including the optional search instruction.
- `mode`, `language`, `runLabel` — the mode, the `hl` language code used, and your run label.
- `status` — `ANSWERED`, `EMPTY_ANSWER`, `BLOCKED`, `TIMEOUT` or `ERROR`.
- `error` — a short reason when the row is not `ANSWERED`.
- `modelLabel` — the model name Gemini shows to logged-out users (for example `Flash-Lite`).
- `webSearchTriggered` — whether Gemini showed inline citations for this answer.
- `answerText`, `answerMarkdown` — the full answer as plain text and Markdown with headings, lists and tables.
- `answerWordCount`, `answerCharCount`, `answerSections[]` — size and section breakdown.
- `citations[]` — one object per inline citation chip: `position`, `chipLabel`, `ariaLabel`, `firstCitedAtChar`, `firstCitedAtPct`, `sentence`, `sourceCount`, `sources[]`.
- `sources[]` — the unique source cards in first-citation order: `position`, `title`, `url`, `domain`, `site`, `snippet`, `supportingText`, `firstCitedAtChar`, `firstCitedAtPct`, `citedInCitations[]`.
- `sourceCount`, `citationCount`, `citedDomains[]` — source totals and unique cited domains.
- `followUpSuggestions[]`, `followUpQuestion`, `followUpActions[]` — Gemini's suggested next steps, when it offers them.
- `trackedBrands[]` — per brand or domain: `brand`, `domain`, `kind`, `mentioned`, `mentionCount`, `firstMentionAtChar`, `firstMentionPositionPct`, `firstMentionSentence`, `firstMentionParagraph`, `sentiment`, `sentimentScore`, `cited`, `citedDomainMatch`, `citedPosition`, `citedUrls[]`.
- `trackedDomainCitations[]` — per watched domain: `domain`, `cited`, `citationCount`, `positions[]`, `sourceUrls[]`.
- `conversationUrl`, `sourceUrl` — the public Gemini conversation URL and the traceability URL.
- `responseTimeSeconds`, `scrapedAt` — timing and UTC timestamp.

### Output per run aggregate

When `includeAggregates` is on, the run also emits one row with `recordType: "geminiRunAggregate"`.

- `runLabel`, `promptCount`, `answeredCount`, `failedCount`
- `brandShareOfVoice[]` — `brand`, `domain`, `kind`, `mentions`, `promptsMentioned`, `promptsCited`, `citationMatches`, `promptMentionRate`, `promptCitationRate`, `visibilityScore`, `shareOfMentions`, `shareOfCitationMatches`
- `topCitedDomains[]` — `domain`, `citationCount`, `sourceCount`, `shareOfAnsweredPrompts`
- `trackedDomainCitations[]`, `modelLabels[]`, `languages[]`
- `totalSources`, `uniqueDomains`, `scrapedAt`

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `mode` | string | `answers` | `answers` (one row per prompt) or `languages` (prompt × language matrix) |
| `prompts` | array | – | Questions or keywords to ask Gemini |
| `language` | string | `auto` | Interface language sent as `hl` (mode=answers) |
| `languages` | array | – | Language codes for the matrix (mode=languages), for example `en`, `de`, `ja` |
| `maxItems` | integer | `20` | Hard cap on answer rows (1–500) |
| `runLabel` | string | – | Label written to every row for time-series comparisons |
| `trackBrands` | array | – | Brand names, domains, or `Name \| domain.com` |
| `trackDomains` | array | – | Domains whose citation status should be reported |
| `includeAggregates` | boolean | `false` | Emit one run aggregate row |
| `forceWebSearch` | boolean | `true` | Ask Gemini to search the web and cite its sources |
| `responseTimeoutSecs` | integer | `150` | Answer timeout in seconds (30–300) |
| `retries` | integer | `1` | Extra fresh-chat attempts on an empty answer (0–3) |
| `proxyConfiguration` | object | – | Optional; no proxy is needed to run the actor |

The daily test prefill asks one CRM question with one tracked brand and a cap of one row, so it is the smallest run that still produces a useful record.

### Examples

#### Example: single-brand visibility check

```json
{
  "mode": "answers",
  "prompts": ["best CRM tools for small businesses HubSpot Salesforce"],
  "maxItems": 1,
  "trackBrands": ["HubSpot | hubspot.com", "Salesforce | salesforce.com"],
  "trackDomains": ["hubspot.com", "salesforce.com"],
  "runLabel": "daily-crm-check"
}
```

#### Example: compare three languages with a run aggregate

```json
{
  "mode": "languages",
  "prompts": ["best project management tools for startups"],
  "languages": ["en", "de", "ja"],
  "maxItems": 3,
  "trackBrands": ["Notion", "Asana", "Monday.com"],
  "includeAggregates": true,
  "runLabel": "2026-11-17 multi-market"
}
```

#### Example: a small prompt set with per-domain citation watch

```json
{
  "mode": "answers",
  "prompts": [
    "best accounting software for freelancers",
    "how do I choose an accounting tool",
    "compare QuickBooks and FreshBooks"
  ],
  "maxItems": 3,
  "trackBrands": ["QuickBooks | quickbooks.intuit.com", "FreshBooks | freshbooks.com"],
  "trackDomains": ["wikipedia.org", "nerdwallet.com", "forbes.com"],
  "includeAggregates": true,
  "runLabel": "accounting-baseline"
}
```

### Use cases

- **GEO and AEO reporting** — track whether Gemini names your brand, how early, in what context, and whether it cites your site.
- **Citation research** — see which pages Gemini relies on for a topic and the exact sentence each citation supports.
- **Competitive share of voice** — compare your brand with competitors across the same prompt set and languages.
- **Answer monitoring** — schedule the same prompts and compare dated answer, citation and sentiment changes.
- **Content gap analysis** — find the pages that win citations and the claims they support.
- **LLM evaluation datasets** — export structured answers, sections, citations and follow-ups for analysis.

### FAQ

#### Do I need a Google account, cookie or API key?

No. The actor uses the public logged-out Gemini web experience and the prompt is sent exactly as a signed-out visitor would send it. No account, cookie or API key is used.

#### Do I need to configure a proxy?

No. The actor works without a proxy. If Google blocks the container's network location, the actor can retry through Apify's automatic datacenter proxy. You only need the optional proxy input if you want to route the browser yourself.

#### Why does a row sometimes have no citations?

Gemini decides when to search the web. `forceWebSearch` appends an explicit request to search and cite, which usually produces citations, but it cannot force Gemini's hidden tool choice. Every row reports `webSearchTriggered` and `citationCount` honestly instead of pretending a model-only answer was grounded.

#### What does `language` change?

It sets Gemini's interface language through the `hl` parameter and changes the regional source mix. The answer itself follows the language of your prompt. To get a German answer, write a German prompt and set `language` to `de`.

#### Why are follow-ups missing on some rows?

Gemini shows suggested follow-ups and the conditional follow-up question only when it decides they are useful. The fields are omitted when Gemini does not show them.

#### Why is the model label sometimes different?

Logged-out Gemini can be served by different models or modes. The actor records the label Gemini displays, it does not choose or hardcode a model.

#### Are sources deduplicated?

Yes. Inline chips keep their own source list, while the top-level `sources[]` list is unique by cleaned URL and keeps every chip position in `citedInCitations[]`. Tracking parameters and citation text fragments are removed from `url`; the highlighted text is kept in `supportingText`.

#### What is `visibilityScore`?

It is a 0–100 score from the aggregate row: half the share of answered prompts where the brand is mentioned, plus half the share where its domain is cited. It is a simple summary, not a ranking of answer quality.

#### Is this affiliated with Google?

No. This is an independent third-party actor that reads publicly available logged-out Gemini answers. Gemini and Google are trademarks of Google LLC.

### Data source

Public logged-out Gemini web at `gemini.google.com`. The actor reads only what the public page returns for the prompts you supply. It does not use a Google account, cookies, the Gemini API, or any paid third-party answer API.

### Limitations

- **Gemini's web search is model-decided.** A row can be a complete answer with no citations; the status fields make that visible.
- **Logged-out UI only.** Image generation, app connectors, Drive files, personalisation and other sign-in-only features are out of scope.
- **Follow-ups are conditional.** Gemini shows them for some answers and not others.
- **Multi-source chips** are expanded by opening each citation chip. If Gemini's source card does not open, the primary source from the chip metadata is still recorded and `sourceCount` reflects what was visible.
- **Model selection is not an input.** The actor records the model Gemini serves; the logged-out model picker is not exposed as a setting.
- **Answers vary.** The same prompt can produce different wording, sources and citations on different runs; the row records exactly what was returned at that moment.

# Actor input Schema

## `mode` (type: `string`):

`answers` asks every prompt once in the selected language. `languages` asks every prompt once per language in `languages` and returns one row per prompt-language pair.

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

Questions or keywords to ask Gemini. Each prompt runs in a fresh logged-out chat and produces one row (or one row per language in languages mode).

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

Interface language sent to Gemini as the `hl` parameter. The answer follows the language of your prompt; this setting changes the interface and the regional source mix. `Same as the prompt` leaves `hl` unset.

## `languages` (type: `array`):

Language codes to run for every prompt (for example `en`, `de`, `fr`, `ja`). Each code is sent as Gemini's `hl` parameter. One row is emitted per prompt-language pair.

## `maxItems` (type: `integer`):

Hard cap on emitted answer rows. An optional aggregate row is extra.

## `runLabel` (type: `string`):

Optional label written to every row so you can compare runs over time (for example `2026-11-17 baseline`).

## `trackBrands` (type: `array`):

Brand names such as `HubSpot` or domains such as `salesforce.com`. `Name | domain.com` is also accepted. Each row reports whether the brand is named, how often, where it first appears, the surrounding sentence, simple sentiment, and whether its domain is cited.

## `trackDomains` (type: `array`):

Domains whose citation status should be reported for every answer, for example `wikipedia.org` or `hubspot.com`.

## `includeAggregates` (type: `boolean`):

Emit one extra `geminiRunAggregate` row per run with brand share of voice, prompt mention/citation rates and the most-cited domains.

## `forceWebSearch` (type: `boolean`):

Append a short instruction asking Gemini to search the web and cite its sources. The exact prompt sent is recorded in `promptSent`. The answer and citations still depend on what Gemini decides to use.

## `responseTimeoutSecs` (type: `integer`):

How long to wait for the answer text before marking the row TIMEOUT.

## `retries` (type: `integer`):

Extra fresh-chat attempts when Gemini returns no answer or times out.

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

Optional. The actor works without a proxy and retries through Apify's automatic datacenter proxy only if Google blocks the container IP. Provide a proxy only if you want to route the browser yourself.

## Actor input object example

```json
{
  "mode": "answers",
  "prompts": [
    "best CRM tools for small businesses HubSpot Salesforce"
  ],
  "language": "auto",
  "languages": [],
  "maxItems": 1,
  "trackBrands": [
    "HubSpot"
  ],
  "trackDomains": [],
  "includeAggregates": false,
  "forceWebSearch": true,
  "responseTimeoutSecs": 150,
  "retries": 1
}
```

# Actor output Schema

## `answers` (type: `string`):

Dataset containing one row per asked prompt.

# 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 = {
    "mode": "answers",
    "prompts": [
        "best CRM tools for small businesses HubSpot Salesforce"
    ],
    "language": "auto",
    "languages": [],
    "maxItems": 1,
    "trackBrands": [
        "HubSpot"
    ],
    "trackDomains": [],
    "includeAggregates": false,
    "forceWebSearch": true,
    "responseTimeoutSecs": 150,
    "retries": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("xyrelith-data/gemini-answer-tracker").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 = {
    "mode": "answers",
    "prompts": ["best CRM tools for small businesses HubSpot Salesforce"],
    "language": "auto",
    "languages": [],
    "maxItems": 1,
    "trackBrands": ["HubSpot"],
    "trackDomains": [],
    "includeAggregates": False,
    "forceWebSearch": True,
    "responseTimeoutSecs": 150,
    "retries": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("xyrelith-data/gemini-answer-tracker").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 '{
  "mode": "answers",
  "prompts": [
    "best CRM tools for small businesses HubSpot Salesforce"
  ],
  "language": "auto",
  "languages": [],
  "maxItems": 1,
  "trackBrands": [
    "HubSpot"
  ],
  "trackDomains": [],
  "includeAggregates": false,
  "forceWebSearch": true,
  "responseTimeoutSecs": 150,
  "retries": 1
}' |
apify call xyrelith-data/gemini-answer-tracker --silent --output-dataset

```

## MCP server setup

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

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/ru41d8uKLvsfRsZuN/builds/lehKDXMvfBvIsFegP/openapi.json
