# AI Visibility Tracker - ChatGPT, Claude, Gemini & Perplexity (`sonic_scraper/ai-visibility-tracker`) Actor

Track how AI assistants talk about your brand: ask ChatGPT, Claude, Gemini and Perplexity (live web search, your own API keys) the questions buyers ask, and get mention rate, rank, cited sources and share of voice against competitors, with changes since the last run.

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

## Pricing

from $3.50 / 1,000 answer analyseds

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 Visibility Tracker - ChatGPT, Claude, Gemini & Perplexity

**See how AI assistants talk about your brand. Ask ChatGPT, Claude, Gemini and Perplexity the questions your buyers ask, with live web search turned on, and get, for every answer: whether your brand was mentioned, at what rank, whether your website was cited as a source, and which competitors appeared instead. Summaries give your mention rate, citation rate, share of voice and a competitor leaderboard per engine, with changes since the last run. Uses your own AI API keys, so you pay the AI providers directly and this Actor only charges $5 per 1,000 answers analysed.**

Built for SEO and GEO (generative engine optimization) agencies, brand and content teams, and founders who want to know whether AI search recommends them.

### What you get

**One row per answer:**

| Field | Example |
|---|---|
| `engine`, `model`, `prompt`, `sample` | `claude`, `claude-opus-5-5`, `Which note-taking app is best for teams?`, `1` |
| `brandMentioned`, `brandMentionCount`, `brandRank` | `true`, `3`, `2` (second brand named in the answer) |
| `brandCited`, `brandCitedUrls` | `true`, `["https://www.notion.com/product"]` |
| `brandSnippet` | The sentence where your brand first appears |
| `mentionedBrands` | All tracked brands in order of first mention |
| `competitorsFound` | Per competitor: mentioned, mention count, rank, cited, cited URLs, snippet |
| `citations`, `citedDomains` | Every source the answer cited (URL, title, domain) |
| `searchQueries`, `webSearches` | What the AI searched for |
| `answer`, `answerLength` | The full answer text |
| `inputTokens`, `outputTokens`, `durationMs` | Usage on your API key |

**One summary row per engine and one overall (`rowType: "summary"`):**

| Field | Meaning |
|---|---|
| `mentionRate` | Share of answers that mention your brand |
| `citationRate` | Share of answers that cite your website |
| `shareOfVoice` | Your mentions as a share of all tracked brands' mentions |
| `avgRank` | Your average position among the brands named, when mentioned |
| `leaderboard` | The same metrics for every competitor, sorted |
| `topCitedDomains` | The sites AI cites most for these questions: your outreach and content targets |
| `promptsWithoutYou` | Questions where you never appeared |
| `changeSincePreviousRun` | Change in each metric since the previous run with the same `stateKey` |

### Quick start

```json
{
  "brandName": "Notion",
  "brandDomains": ["notion.com", "notion.so"],
  "competitors": ["Confluence | atlassian.com", "Coda | coda.io", "ClickUp | clickup.com"],
  "prompts": [
    "What is the best knowledge base tool for a startup?",
    "Which note-taking app is best for teams?"
  ],
  "anthropicApiKey": "sk-ant-...",
  "openaiApiKey": "sk-...",
  "samplesPerPrompt": 3
}
```

Add `keywords` instead of writing questions: each keyword becomes three neutral questions ("What are the best {keyword}?", "Which {keyword} would you recommend, and why?", "Compare the top {keyword} options for a small business.").

**Weekly tracking:** set `stateKey` (for example `notion-weekly`), save the input as a task and add a weekly schedule. Every run's summary then shows how your mention rate, citation rate, share of voice and rank changed.

### Engines and API keys

| Engine | Key field | How it answers | Default model |
|---|---|---|---|
| Claude | `anthropicApiKey` | Messages API with the web search tool | `claude-opus-5-5` (or Sonnet 5.5 / Haiku 5.5) |
| ChatGPT | `openaiApiKey` | Responses API with the `web_search` tool | `gpt-6.2-astra` (any web-search model) |
| Gemini | `geminiApiKey` | Grounding with Google Search | `gemini-4-hydrogen` |
| Perplexity | `perplexityApiKey` | Sonar (always searches the web) | `sonar` |

Give one key or all four; every engine with a key is used. Keys are secret inputs: they are encrypted by Apify, sent only to the provider they belong to, and never written to the output or the log.

**Your AI cost** is billed by each provider on your own account and depends on the model: a cheap model with one or two searches costs about a cent per answer, a frontier model with several searches can cost ten cents or more. `maxSearchesPerAnswer` caps Claude's searches, and `inputTokens` / `outputTokens` / `webSearches` on every row show what you used.

**API answers versus the chat apps.** These are the answers the providers' APIs give with web search on. They come from the same models and search as the consumer apps, but the apps add their own system prompts, memory and personalisation, so individual answers can differ from what one person sees in ChatGPT or Claude. Asking each question several times (`samplesPerPrompt`) and tracking the rate over time is more reliable than any single answer.

### How brands are detected

Your brand name and aliases are matched as whole words, case-insensitively, so "Notion" counts but "notional" does not, and names with punctuation like "Monday.com" or "AT\&T" work. Rank is the order in which tracked brands are first named in the answer. A brand is "cited" when one of the answer's sources is on its domains (subdomains included).

### Use with AI agents / MCP

Connect the Apify MCP server at `https://mcp.apify.com?tools=sonic_scraper/ai-visibility-tracker` in Claude Desktop, Cursor or any MCP client. Example prompt: *"Check whether ChatGPT and Claude recommend our product for 'best CRM for a small agency' and list which sites they cite."* Without inputs the Actor returns one row explaining what to add, free.

### Pricing

**$5 per 1,000 answers analysed** ($0.005 each) on the free plan, with lower rates on paid Apify plans (see the Pricing tab). Failed answers, rejected keys and skipped engines are not charged. The AI providers bill you separately for tokens and searches on your own keys.

Example: 20 questions x 4 engines x 3 samples = 240 answers = $1.20 per run on Apify, plus your AI usage.

### Limits

- **You need at least one AI API key.** This Actor does not resell AI access.
- **Answers vary between runs.** Use 3-5 samples per question for decisions.
- **Mentions are text matches.** A brand named in a negative context still counts as a mention; read `brandSnippet` for context.
- **Localization** (`country`, `city`) applies to Claude and ChatGPT searches.
- **Rate limits are your key's.** Lower `maxConcurrency` if your provider account is new or on a low tier.

### FAQ

#### How do I check if ChatGPT recommends my brand?

Add your brand, a few buyer questions and your OpenAI key, then run. Each answer row says whether your brand was mentioned, at what position, and whether your site was cited.

#### What is share of voice in AI search?

Your brand's mentions as a share of all mentions of the brands you track, across all answers. If ChatGPT mentions you in 4 answers and competitors in 12, your share of voice is 25%.

#### Which sites should I get mentioned on?

Look at `topCitedDomains` in the summary: the review sites, blogs and directories the AI cites most for your questions are where a mention helps most.

#### Can I track changes every week?

Yes. Set `stateKey`, save the input as a task and schedule it. Each summary includes `changeSincePreviousRun`.

### Related actors

- [Google AI Overview Tracker](https://apify.com/sonic_scraper/google-ai-overview-tracker): brand citations in Google AI Overviews.
- [Google Autocomplete Scraper](https://apify.com/sonic_scraper/google-autocomplete-scraper): the questions people actually type, to use as prompts.
- [Technical SEO Audit Crawler](https://apify.com/sonic_scraper/technical-seo-audit-crawler): check the pages you want AI to cite.

Questions or a brand that is detected wrongly? Open an issue on the Issues tab with your run ID.

# Actor input Schema

## `brandName` (type: `string`):

The brand to track, as people write it, e.g. 'Notion'.

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

Product names or spellings that also count as a mention, e.g. 'Notion AI'.

## `brandDomains` (type: `array`):

Domains that count as your brand being cited as a source, e.g. notion.com. Subdomains are included.

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

One per line, optionally with domains after '|': 'Confluence | atlassian.com'. Aliases in brackets: 'ClickUp (Click Up) | clickup.com'.

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

The questions your buyers ask AI assistants, e.g. 'What is the best wiki tool for a startup?'.

## `keywords` (type: `array`):

Each topic becomes 3 neutral questions: 'What are the best {topic}?', 'Which {topic} would you recommend, and why?' and 'Compare the top {topic} options for a small business.'

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

Your key from console.anthropic.com. Claude answers with live web search; you pay Anthropic for tokens and searches.

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

Your key from platform.openai.com. Uses the Responses API with the web_search tool.

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

Your key from Google AI Studio. Uses Grounding with Google Search.

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

Your key from the Perplexity API console. Uses Sonar, which always searches the web.

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

Limit the run to these engines. By default every engine you gave a key for is used.

## `claudeModel` (type: `string`):

Opus 5.5 gives the most representative answers; Sonnet 5.5 and Haiku 5.5 cost you less per answer.

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

Any OpenAI model that supports the web_search tool.

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

Any Gemini model that supports Grounding with Google Search.

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

A Sonar model, e.g. 'sonar'.

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

Ask each question this many times per engine. AI answers vary; 3 samples give a more reliable mention rate.

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

Two-letter country code for localized search (Claude and ChatGPT), e.g. US, GB, DE.

## `city` (type: `string`):

Optional city for localized search, used with country.

## `maxSearchesPerAnswer` (type: `integer`):

Caps Claude's web searches per answer, and so your search cost.

## `stateKey` (type: `string`):

Give a scheduled task a name to get changes since its previous run (mention rate, citation rate, share of voice, rank).

## `includeAnswerText` (type: `boolean`):

Save each full AI answer in the row.

## `maxAnswers` (type: `integer`):

Upper limit on answers per run (questions x engines x samples).

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

Lower it if your API key has tight rate limits.

## Actor input object example

```json
{
  "brandName": "Notion",
  "brandDomains": [
    "notion.com",
    "notion.so"
  ],
  "competitors": [
    "Confluence | atlassian.com",
    "Coda | coda.io",
    "ClickUp | clickup.com",
    "Obsidian | obsidian.md"
  ],
  "prompts": [
    "What is the best knowledge base tool for a startup?",
    "Which note-taking app is best for teams?"
  ],
  "claudeModel": "claude-opus-5-5",
  "openaiModel": "gpt-6.2-astra",
  "geminiModel": "gemini-4-hydrogen",
  "perplexityModel": "sonar",
  "samplesPerPrompt": 1,
  "maxSearchesPerAnswer": 3,
  "includeAnswerText": true,
  "maxAnswers": 200,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

One row per AI answer, plus summary rows per engine and overall.

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

Mention and citation rates per engine.

# 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 = {
    "brandName": "Notion",
    "brandDomains": [
        "notion.com",
        "notion.so"
    ],
    "competitors": [
        "Confluence | atlassian.com",
        "Coda | coda.io",
        "ClickUp | clickup.com",
        "Obsidian | obsidian.md"
    ],
    "prompts": [
        "What is the best knowledge base tool for a startup?",
        "Which note-taking app is best for teams?"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sonic_scraper/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 = {
    "brandName": "Notion",
    "brandDomains": [
        "notion.com",
        "notion.so",
    ],
    "competitors": [
        "Confluence | atlassian.com",
        "Coda | coda.io",
        "ClickUp | clickup.com",
        "Obsidian | obsidian.md",
    ],
    "prompts": [
        "What is the best knowledge base tool for a startup?",
        "Which note-taking app is best for teams?",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("sonic_scraper/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 '{
  "brandName": "Notion",
  "brandDomains": [
    "notion.com",
    "notion.so"
  ],
  "competitors": [
    "Confluence | atlassian.com",
    "Coda | coda.io",
    "ClickUp | clickup.com",
    "Obsidian | obsidian.md"
  ],
  "prompts": [
    "What is the best knowledge base tool for a startup?",
    "Which note-taking app is best for teams?"
  ]
}' |
apify call sonic_scraper/ai-visibility-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sonic_scraper/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/AlqINWgyaAJv9ptmY/builds/1hNkC7v2pKk7qByuq/openapi.json
