# AI Visibility Tracker: ChatGPT, Perplexity, Gemini (`xsi/ai-visibility-tracker`) Actor

\[$8 per 1,000 checks + your own LLM API cost] Is your brand mentioned, ranked and cited when buyers ask ChatGPT models, Perplexity, Gemini or Claude? Share of voice vs competitors, citations, sentiment, run-to-run changes. Official APIs, bring your own keys.

- **URL**: https://apify.com/xsi/ai-visibility-tracker.md
- **Developed by:** [Bilal Belferkous](https://apify.com/xsi) (community)
- **Categories:** SEO tools, AI, Automation
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 prompt checks

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

## AI Search Visibility Tracker (GEO / AEO): is your brand recommended by ChatGPT, Perplexity, Gemini and Claude?

**Give your brand, your competitors and the questions your buyers ask.** For every prompt and every AI engine, this Actor asks the question through the engine's **official API with live web search**, then tells you whether your brand is mentioned, in which position, whether your website is cited, which competitors are named instead, which sources the AI used and in what tone it talks about you. A summary gives **share of voice, mention rate (with a 95 % confidence interval), average rank and citation rate** per engine and brand. Turn on **monitor mode** and schedule it weekly to see what you gained or lost.

Part of **xsi — Ad Intelligence**: small, honest, pay-per-result tools.

- ✅ **4 engines**: OpenAI (the models behind ChatGPT, Responses API + `web_search`), Perplexity (Agent API with its web search tool; legacy Sonar API on request), Google Gemini (Google Search grounding), Anthropic Claude (web search tool). Use any subset.
- ✅ **Bring your own keys (BYOK)**: you pay the AI providers directly at their list prices, no mark-up. This Actor only charges a small fee per check.
- ✅ **Samples, not a single shot**: AI answers change every time. Ask each prompt up to 5 times and get a mention rate with a confidence interval.
- ✅ **Clear definitions** (below): what counts as a mention, a rank, a citation. Raw answer excerpt and cited URLs in every row, so you can verify.
- ✅ **Monitor mode**: gained / lost mentions, rank up / down, new and lost cited domains, share-of-voice deltas.
- ✅ **Errors are free**: rejected key, quota, timeouts, provider errors, empty answers → `charged: false`.
- ✅ Official APIs only. No scraping of chatgpt.com or perplexity.ai, no browser, no CAPTCHA, no account sharing.

### Pricing: $8 per 1,000 checks (down to $6 on higher Apify plans) + your own LLM cost

One pay-per-event charge, **`prompt-check`** = one prompt answered by one engine (one sample) and analysed.

| Apify plan | Price per check | Per 1,000 checks |
|---|---|---|
| Free | $0.008 | $8.00 |
| Bronze | $0.0072 | $7.20 |
| Silver | $0.0064 | $6.40 |
| Gold / Platinum / Diamond | $0.006 | $6.00 |

**Plus the AI provider's own usage, billed by the provider to your key** (not by Apify, not by us). It depends on the model, the answer length and the number of web searches the engine decides to run, so we cannot promise a figure. Check the providers' pricing pages: OpenAI charges tokens plus a fee per web search call; Perplexity charges tokens plus a per-request fee; Gemini grounding with Google Search and Claude web search are billed per search on top of tokens.

Example (Free plan fee only): 20 prompts × 3 engines × 1 sample = 60 checks = **$0.48** + provider usage.

**Never charged:** API key rejected (`invalid_key`; once a key is rejected, the next checks of that engine are skipped instead of calling the API again), model not found, quota / no credit, rate limits after one retry, timeouts, provider errors, empty answers. Engines without a key are skipped. The summary rows, the HTML report and monitor snapshots are free. Your *Maximum cost per run* and `maxChecks` are always respected: the Actor stops **before** a check it could not pay for, so no extra LLM call is made on your key either.

### Quick start

```json
{
  "brand": "Ethias",
  "brandDomain": "ethias.be",
  "competitors": ["AG Insurance | ag.be | AG", "AXA | axa.be", "Baloise | baloise.be"],
  "prompts": ["What is the best car insurance in Belgium?", "Cheapest car insurance for young drivers in Belgium"],
  "country": "BE",
  "perplexityApiKey": "pplx-…",
  "geminiApiKey": "AIza…"
}
```

→ 2 prompts × 2 engines = 4 checks ($0.032 on the Free plan) + your Perplexity and Gemini usage.

### Definitions (how every number is computed)

| Term | Exact meaning |
|---|---|
| **Mention** | The brand name, an alias or the bare domain appears in the answer as a whole word (case-insensitive; short all-caps names like "AXA" or "AG" are case-sensitive to avoid false hits). "Taxation" does not match "AXA". |
| **Rank** (`brand_rank`) | Order of first mention among *your tracked brands* (1 = named first among them). It is not a position among all brands in the answer. |
| **List position** | When the answer is a numbered / bulleted list or uses headings, the item number that contains the brand. |
| **Citation** | Needs `brandDomain` / a competitor domain (otherwise `null`). A source URL returned by the API whose host is your domain or a subdomain (`blog.acme.com` counts, `acme.com.evil.io` does not). Gemini returns redirect links, so its sources are matched on the domain Google gives as title. |
| **Share of voice** | Your mentions ÷ mentions of all tracked brands, over the same answers. |
| **Mention rate + CI** | Answers that mention the brand ÷ answers; 95 % Wilson interval. With 1 sample per prompt and few prompts, the interval is wide: that is the honest uncertainty. |
| **Sentiment** | Keyword heuristic on the sentences that mention the brand (positive / negative / mixed / neutral) + the sentence itself in `brand_snippet`. Not an LLM judgement: read the snippet. |

### What you get

**Check rows** (`row_type: "check"`, one per prompt × engine × sample): `prompt`, `engine`, `sample`, `model` (as reported by the API), `model_requested`, `model_fallback`, `web_search`, `country`, `language`, `brand_mentioned`, `brand_mention_count`, `brand_rank`, `brand_list_position`, `brand_cited`, `brand_citation_position`, `brand_sentiment`, `brand_snippet`, `top_brand`, `tracked_brands_mentioned`, `competitors_mentioned` (in order), `competitors_cited`, `competitor_details` (same metrics per competitor), `citations` (url, title, domain), `cited_urls`, `cited_domains`, `citations_count`, `search_queries` (the searches the engine ran, when the API exposes them: OpenAI, Gemini, Claude), `answer_excerpt`, `answer_length`, `checked_at`, `duration_ms`, `error_type`, `error`, `charged`. In monitor mode: `change`, `mention_change`, `rank_change`, `previous_rank`, `new_cited_domains`, `lost_cited_domains`.

**Summary rows** (`row_type: "summary"`, free), per engine and for `all` engines, per brand: `answers`, `mentions`, `mention_rate`, `mention_rate_ci_low`, `mention_rate_ci_high`, `share_of_voice`, `avg_rank`, `first_place_count`, `citations`, `citation_rate`, sentiment counts; in monitor mode `mention_rate_change`, `share_of_voice_change`, `avg_rank_change`.

**Key-value store**: `OUTPUT` (run summary JSON, monitor changes) and `REPORT.html` (share-of-voice tables you can send to a client).

Dataset views in the Console: *Answers*, *Share of voice*, *Changes vs previous run*, *Citations*.

Example check row (from the offline test suite, using the documented response format of the OpenAI Responses API; shortened):

```json
{
  "row_type": "check", "prompt": "best car insurance in Belgium", "engine": "openai", "sample": 1, "model": "gpt-6-luna",
  "brand": "Ethias", "brand_mentioned": true, "brand_rank": 2, "brand_list_position": 2, "brand_cited": true, "brand_citation_position": 1,
  "brand_sentiment": "positive", "brand_snippet": "**Ethias** – popular and affordable, good digital service.",
  "top_brand": "AG Insurance", "competitors_mentioned": ["AG Insurance", "AXA", "Baloise"],
  "cited_domains": ["ethias.be", "test-achats.be"], "search_queries": ["best car insurance Belgium 2026"],
  "change": "new_check", "charged": true
}
```

### Monitor mode

With `monitor: true`, a small snapshot (per prompt × engine × sample: mentioned, rank, cited, cited domains; per brand: mention rate, share of voice, average rank) is saved in the named key-value store **`ai-visibility-tracker-state`** of *your* Apify account, under a key derived from brand + country + language (or your `monitorKey`). No answer text and no key is stored there. The next run adds the change columns and deltas. Keep the same competitors and prompts between runs so share-of-voice deltas compare like with like. Delete that store to reset the history. Schedule the Actor (e.g. every Monday) in Apify Console → Schedules.

### Use cases

- **GEO / AEO reporting:** see whether ChatGPT models, Perplexity, Gemini or Claude mention and cite your brand when buyers ask real questions, with share of voice against named competitors.
- **Agency or in-house monitoring:** schedule the Actor weekly with `monitor: true` to see mentions gained or lost, rank changes and new or lost cited domains, and send `REPORT.html` to a client.
- **Prompt research:** use questions from sales calls, support tickets or Search Console; `search_queries` shows how each engine rephrased them.
- **Honest sampling:** raise `samplesPerPrompt` (2–5) when you need a mention rate with a tighter 95 % confidence interval, instead of trusting a single answer.

### Limits: read before you trust a number

- **API answers are not identical to the consumer apps.** ChatGPT, Gemini or Claude apps add personalisation, memory, location and their own system prompts; the APIs don't. This Actor measures what the official API with web search answers to a neutral request. It is a consistent, repeatable sample, not a screenshot of one user's app. Tools that read the consumer interface do it by automating those apps; we deliberately don't (terms of service).
- **Answers vary between asks.** Use `samplesPerPrompt` (2–5) and enough prompts before drawing conclusions. A rank in one answer means little; a mention rate over 50+ answers means more.
- **Your prompts drive the result.** Nobody knows exactly what users type into AI assistants. Use questions real buyers ask (sales calls, support tickets, Search Console queries) in their language. `search_queries` shows how the engines rephrase them.
- Brand matching is lexical (whole words + aliases + domain), not entity resolution. Add aliases for nicknames and product names; avoid aliases that are common words.
- Perplexity calls go to Perplexity's supported **Agent API** (`/v1/agent`) with its `web_search` tool. Old model names still work: `sonar` → `perplexity/sonar`, `sonar-pro` → effort `fast`, `sonar-reasoning-pro` → `low`, `sonar-deep-research` → `high`. You can also use an effort level or any Agent API model id (e.g. `openai/gpt-6.2-sol`). Answers are capped at 2,000 output tokens. Set `perplexityApi: "sonar"` to keep the legacy Sonar endpoint exactly as before.
- Perplexity always searches; `webSearch: false` affects the other engines. Claude web search must be enabled in your Anthropic organization.
- Default models: `gpt-6-luna`, `sonar`, `gemini-3.8-flash`, `claude-haiku-5-5`, the low-cost models with web search, checked against each provider's public model list on 26 Nov 2026. Override them in *Models (advanced)*.
- **Model fallback (on by default):** if a model name is unknown, renamed or retired, the check is retried once with the default model. The row shows `model_requested` and `model_fallback: true`, and the log warns you. A dead model is tried only once per run, not for every prompt. Set `modelFallback: false` to get a free `model_not_found` row instead.

### Privacy & keys

Keys are secret inputs: Apify stores them encrypted, the Actor sends each key only to its own provider's official endpoint and removes it from any error message. Key fragments that providers echo back in error messages (e.g. `sk-proj-****abcd`) are removed too. Keys never appear in the dataset, the log, `OUTPUT`, the report or the monitor snapshot. Prompts are sent to the providers you choose under your own API agreements with them. The Actor processes public answers about companies; don't put personal data in prompts.

### FAQ

**Do I need all four keys?** No, one is enough. Engines without a key are skipped for free.

**Why BYOK instead of an all-inclusive price?** You pay providers at cost (often a cent or less per answer on the small models), you keep control of your provider limits and data terms, and our fee stays low. Most all-inclusive trackers on the Store charge $0.035–$0.06 per check (Nov 2026).

**Can I use it from n8n / Make / Zapier / an AI agent?** Yes, through the Apify API or the Apify MCP server, like any Actor. Pass keys in the input.

**Is a higher share of voice guaranteed to bring traffic?** No. It measures how often AI answers name you for *your* prompts, nothing more.

Issues or ideas: open an issue on the Actor's *Issues* tab.

### Changelog

- **1.0.5 (26 Nov 2026)**: Perplexity moved to the supported Agent API (`/v1/agent`, `web_search` tool, country via `user_location`, answers capped at 2,000 tokens). Old Sonar model names are mapped automatically; `perplexityApi: "sonar"` keeps the legacy endpoint. Prices unchanged.
- **1.0.4 (26 Nov 2026)**: default models re-checked against OpenAI, Perplexity, Google and Anthropic model pages (all four valid). New **model fallback**: an unknown, renamed or retired model is retried once with the default model, flagged in `model_requested` / `model_fallback`, and tried only once per run (`modelFallback: false` to turn off). Perplexity now calls the documented `/v1/sonar` endpoint. A 400 "model does not exist" is now reported as `model_not_found`. README: Use cases section. Prices unchanged.

# Actor input Schema

## `brand` (type: `string`):

Brand name as people write it, e.g. "Ethias". Matched as a whole word, case-insensitive (short all-caps names like "AXA" are matched case-sensitively).

## `brandDomain` (type: `string`):

Used to detect when an answer cites your site (subdomains count, look-alike domains don't). Also counted as a mention when written in the answer.

## `brandAliases` (type: `array`):

Optional alternative spellings or product names, e.g. "Ethias Assurance".

## `competitors` (type: `array`):

One per line: "Name | domain | alias1; alias2" (domain and aliases optional), e.g. "AG Insurance | ag.be | AG". Max 25.

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

Each prompt is sent as-is to each engine. Max 200 per run. Use the words real buyers use, in their language.

## `engines` (type: `array`):

Engines to query. Only engines with an API key below are used (others are skipped, free).

## `openaiApiKey` (type: `string`):

Your own key from platform.openai.com (BYOK). Stored encrypted by Apify, never written to the dataset or log. OpenAI bills the tokens and web searches to you.

## `perplexityApiKey` (type: `string`):

Your own key from perplexity.ai/settings/api.

## `geminiApiKey` (type: `string`):

Your own key from aistudio.google.com (Gemini API).

## `anthropicApiKey` (type: `string`):

Your own key from console.anthropic.com. Web search must be enabled for your organization.

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

2-letter ISO code (BE, FR, US…). Sent as the user's approximate location where the API supports it (OpenAI, Perplexity, Claude web search) and as a short instruction for all engines.

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

Optional, e.g. "French". Adds "Answer in French." Leave empty to let the engine follow the prompt's language.

## `samplesPerPrompt` (type: `integer`):

AI answers change from one ask to the next. Ask each prompt 1–5 times per engine to get a mention rate with a 95 % confidence interval. Each sample is one billed check.

## `webSearch` (type: `boolean`):

On (recommended): engines search the web like their consumer apps do, and return cited sources. Off: answer from the model's memory only (cheaper on your key, no citations). Perplexity always searches.

## `monitor` (type: `boolean`):

Saves a small snapshot (mentions, ranks, cited domains; no answer text) in the named key-value store "ai-visibility-tracker-state" of your account, and adds change columns (gained / lost / rank up / rank down, new and lost cited domains). Schedule weekly for tracking.

## `monitorKey` (type: `string`):

Separate histories for the same brand, e.g. "be-fr-weekly". Letters, digits, - and \_.

## `maxChecks` (type: `integer`):

Hard cap on prompt × engine × sample checks (protects your LLM bill and this Actor's fee). Your Apify "Maximum cost per run" is also respected.

## `maxConcurrency` (type: `integer`):

1–5. Lower it if your provider rate-limits you.

## `requestTimeoutSecs` (type: `integer`):

One retry is made on timeouts, 429 and 5xx.

## `answerExcerptChars` (type: `integer`):

Characters of the raw answer kept in each row (200–20,000).

## `saveReport` (type: `boolean`):

Writes REPORT.html (share of voice tables) to the run's key-value store.

## `openaiModel` (type: `string`):

Default gpt-6-luna (OpenAI's most efficient model, supports the web_search tool; verified on OpenAI's model page, Nov 2026). Any Responses API model that supports web_search.

## `perplexityModel` (type: `string`):

Default sonar. Old Sonar names still work and are mapped for the Agent API: sonar → perplexity/sonar, sonar-pro → effort fast, sonar-reasoning-pro → effort low, sonar-deep-research → effort high. You can also give an effort level (fast, low, medium, high) or any Agent API model id such as openai/gpt-6.2-sol.

## `perplexityApi` (type: `string`):

Agent API (default): Perplexity's supported API, with its web search tool. Legacy Sonar: the endpoint used before version 1.0.5. Perplexity ended support for it on 27 Sep 2026 but still serves it.

## `geminiModel` (type: `string`):

Default gemini-3.8-flash (stable, Google Search grounding). Newer: gemini-4-hydrogen.

## `anthropicModel` (type: `string`):

Default claude-haiku-5-5 (fastest Claude, web search tool).

## `modelFallback` (type: `boolean`):

On (default): if a model you typed is unknown, renamed or retired (HTTP 404 / 'model not found'), the check is retried once with the default model and the row shows model_requested + model_fallback=true. Off: the check fails for free with model_not_found.

## Actor input object example

```json
{
  "brand": "Ethias",
  "brandDomain": "ethias.be",
  "competitors": [
    "AG Insurance | ag.be | AG",
    "AXA | axa.be",
    "Baloise | baloise.be"
  ],
  "prompts": [
    "What is the best car insurance in Belgium?",
    "Cheapest car insurance for young drivers in Belgium"
  ],
  "engines": [
    "openai",
    "perplexity",
    "gemini",
    "anthropic"
  ],
  "samplesPerPrompt": 1,
  "webSearch": true,
  "monitor": false,
  "maxChecks": 200,
  "maxConcurrency": 2,
  "requestTimeoutSecs": 90,
  "answerExcerptChars": 1500,
  "saveReport": true,
  "perplexityApi": "agent",
  "modelFallback": true
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

## `report` (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 = {
    "brand": "Ethias",
    "brandDomain": "ethias.be",
    "competitors": [
        "AG Insurance | ag.be | AG",
        "AXA | axa.be",
        "Baloise | baloise.be"
    ],
    "prompts": [
        "What is the best car insurance in Belgium?",
        "Cheapest car insurance for young drivers in Belgium"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("xsi/ai-visibility-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 = {
    "brand": "Ethias",
    "brandDomain": "ethias.be",
    "competitors": [
        "AG Insurance | ag.be | AG",
        "AXA | axa.be",
        "Baloise | baloise.be",
    ],
    "prompts": [
        "What is the best car insurance in Belgium?",
        "Cheapest car insurance for young drivers in Belgium",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("xsi/ai-visibility-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 '{
  "brand": "Ethias",
  "brandDomain": "ethias.be",
  "competitors": [
    "AG Insurance | ag.be | AG",
    "AXA | axa.be",
    "Baloise | baloise.be"
  ],
  "prompts": [
    "What is the best car insurance in Belgium?",
    "Cheapest car insurance for young drivers in Belgium"
  ]
}' |
apify call xsi/ai-visibility-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,xsi/ai-visibility-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/hKGsWZYBgWDGd0Ysb/builds/bgPoy5ihVjASeEFcP/openapi.json
