# AI Brand Visibility Tracker: ChatGPT, Claude & Perplexity API (`devdarfy/ai-brand-visibility-tracker`) Actor

Track how often ChatGPT, Claude and Perplexity mention your brand vs competitors: rank in the answer, cited URLs, sentiment. Bring your own API keys. $8 per 1,000 answers.

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

## Pricing

from $8.00 / 1,000 ai answers

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

### What does AI Brand Visibility Tracker do?

**AI Brand Visibility Tracker** asks ChatGPT (OpenAI), Claude (Anthropic) and Perplexity your customers' questions through their official APIs and tells you, for every answer, **whether your brand is mentioned, in which position, which competitors appear, which URLs are cited and whether the tone is positive or negative**. You bring your own API keys, so the AI usage is billed by each provider to your own account at their normal price, with no markup.

- **Input:** brand name and domain, competitors, a list of prompts, one or more API keys.
- **Output:** one dataset row per AI answer, plus a free summary with mention rate, average position, citation rate and share of voice per provider.
- **Price:** **$8 per 1,000 answers** ($0.008 per answer row). The summary is free.

| You want to know | Field |
|---|---|
| Does ChatGPT / Claude / Perplexity name my brand? | `brandMentioned` |
| Am I named first, second, fifth? | `brandPosition`, `brandListRank` |
| Which competitors are named, and before me? | `competitorMentions`, `mentionedInOrder` |
| Is my website cited as a source? | `brandCited`, `brandCitationRank`, `citations` |
| What does the answer say about me? | `brandSentiment`, `answer` |
| How do providers compare? | `SUMMARY` record in the key-value store |

### Why track brand visibility in AI answers?

More people ask an AI assistant "what is the best tool for X?" instead of searching. If the answer lists three competitors and not you, that is lost demand you cannot see in Google Search Console. This Actor turns those answers into numbers you can track over time (generative engine optimization, GEO / AEO):

- **Mention rate** per provider: in how many answers your brand appears.
- **Position**: where you appear compared with the competitors you track.
- **Citations**: which pages the AI used as sources, and whether one of them is yours.
- **Share of voice**: your mentions as a share of all tracked brand mentions.
- **Sentiment**: a simple rule-based tone of the sentences that name you.

Run it on a schedule (weekly is common) with the same prompts to see the trend.

### How to use it

1. Enter your **brand name** and **website domain** (for example `example.com`).
2. Add **competitors**, one per line. Aliases and domains go after a `|`: `Bright Data | Luminati | brightdata.com`.
3. Add **prompts**: questions a buyer would ask, such as "What are the best CRM tools for small teams?". Write `{brand}` to insert your brand name, for example "Is {brand} worth it?".
4. Paste at least one **API key** (OpenAI, Anthropic, Perplexity). Keys are secret input fields.
5. Click **Start**. Each prompt is sent to each provider that has a key.

Without any key the Actor does not call a model: it finishes successfully and writes one row with `errorCode: "NO_API_KEY"` that explains what to add. That row is what you see if you start the Actor with the example input unchanged.

### Which models are used?

| Provider | API | Default model | Web search |
|---|---|---|---|
| OpenAI | Responses API | `gpt-6-luna` | `web_search` tool (on by default) |
| Anthropic | Messages API | `claude-haiku-5-5` | `web_search` server tool (on by default) |
| Perplexity | Sonar API | `sonar` | always on |

You can change every model id in the input. With **web search on**, ChatGPT and Claude answer the way their search products do and return cited sources. With it off, they answer from training data only, which is cheaper and shows what the model "remembers" about your brand.

### Pricing

**$0.008 per answer row ($8 per 1,000 answers).** One answer = one prompt asked once to one provider.

| Run | Answers | Actor cost |
|---|---|---|
| 10 prompts x 1 provider | 10 | $0.08 |
| 25 prompts x 3 providers | 75 | $0.60 |
| 100 prompts x 3 providers | 300 | $2.40 |
| 100 prompts x 3 providers x 3 samples | 900 | $7.20 |

The AI providers bill their own usage to your API account. In our own test run, Claude Haiku 5.5 with one web search cost about $0.01 per answer on the Anthropic bill (most of it is Anthropic's web search fee), and about $0.0001 per answer with web search off. Check each provider's price page for current rates.

Set a **maximum charge** on the run to cap the Actor cost: when the limit is reached the Actor stops asking new prompts, so it also stops spending on your API keys.

### Output example

One row per answer, from a real test run (shortened):

```json
{
  "provider": "anthropic",
  "model": "claude-haiku-5-5",
  "prompt": "What is a good alternative to Bright Data for web scraping?",
  "brand": "Apify",
  "brandMentioned": true,
  "brandPosition": 4,
  "brandListRank": 3,
  "brandMentionCount": 2,
  "brandCited": false,
  "brandSentiment": "neutral",
  "mentionedInOrder": ["Bright Data", "Oxylabs", "Zyte", "Apify", "ScrapingBee"],
  "competitorMentions": [
    { "name": "Bright Data", "mentioned": true, "position": 1, "listRank": 4, "mentionCount": 2, "firstIndex": 31, "cited": false, "citationRank": null }
  ],
  "citations": [{ "url": "https://www.scraperapi.com/blog/bright-data-alternatives/", "title": "9 Best Bright Data alternatives in 2026: Where each one wins", "domain": "scraperapi.com" }],
  "citationCount": 6,
  "answer": "...",
  "webSearches": 1,
  "inputTokens": 15267,
  "outputTokens": 1039,
  "attempts": 1,
  "error": null,
  "createdAt": "2026-11-21T18:05:38.422Z"
}
```

The `SUMMARY` record (key-value store, free) has, per provider and overall: `answers`, `errors`, `brand.mentionRate`, `brand.avgPosition`, `brand.firstPlaceRate`, `brand.citedRate`, `brand.shareOfVoice`, `brand.sentiment`, the same numbers for every competitor, a `ranking` and the `topCitedDomains`.

#### Field notes

- `brandPosition`: order of first appearance among all names you track (your brand + competitors). 1 = named first.
- `brandListRank`: number of the first top-level list item (numbered or bulleted) that names your brand; `null` if the answer has no list or the brand is not in it.
- `citations`: sources the provider returned as citations, plus links written into the answer text. `sources` lists every search result the provider returned, cited or not.
- `brandSentiment`: `positive`, `neutral`, `mixed` or `negative`, from English word lists applied to the sentences that name the brand. It is a quick signal, not a human judgement; read `answer` for the full context.
- Matching is whole-word and case-insensitive. Short all-caps names such as "SAP" are matched case-sensitively.

### Errors and reliability

- Each request has a timeout and is retried after timeouts, network errors, rate limits (429) and provider overloads (5xx), with exponential back-off that follows `Retry-After`.
- A failed request never removes the row: it is written with `error`, `errorCode` and `httpStatus`, so you can see which prompt failed. Other providers keep running.
- A rejected key (401/403), missing quota or unknown model is not retried. That provider writes **one** error row and its remaining prompts are skipped, so a typo in a key does not fill your dataset with paid error rows.
- Keys are never written to the log, the dataset or the key-value store. Error messages are cleaned of anything that looks like a key.

### FAQ

**Do you store or see my API keys?**
No. They are Apify secret input fields: encrypted at rest and decrypted only inside your run. The Actor sends them only to the provider they belong to.

**Is this the same as what users see in the ChatGPT app?**
No. The Actor uses the official APIs. Answers from the API with web search are close to, but not identical with, the consumer apps, which add personalisation, memory and their own system prompts. API access is stable and allowed by the providers' terms, while scraping the consumer apps breaks often.

**Why do answers change between runs?**
Language models are not deterministic. Use **Answers per prompt** (2–5) and compare rates over several runs rather than single answers.

**Can I track several brands?**
Run once per brand, or put the other brands in **Competitors**: every row already reports each competitor separately.

**Which languages work?**
Prompts and answers can be in any language. Brand matching works for any script. Sentiment uses English word lists, so on other languages it will mostly say `neutral`.

**Is it legal?**
The Actor calls official APIs with your own keys, inside your own Apify run. You are responsible for following each provider's terms for your use of the output.

### Other Actors by devdarfy

| Actor | What it does |
|---|---|
| [Website Screenshot API](https://apify.com/devdarfy/render-api) | Full-page screenshots and URL to PDF |
| [Bulk DNS Lookup & DMARC, SPF, DKIM Checker](https://apify.com/devdarfy/dns-email-security) | DNS and email security checks for a list of domains |
| [RSS Feed Reader & Parser](https://apify.com/devdarfy/rss-feed-reader) | RSS, Atom and JSON Feed to clean JSON |

# Actor input Schema

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

The brand you want to find in AI answers, written the way people say it (e.g. Notion, HubSpot). Matching is case-insensitive and whole-word.

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

Your domains, e.g. example.com. An answer that cites a URL on one of these domains (subdomains included) counts as a citation of your brand; the domain written in the text also counts as a mention.

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

Other spellings or product names that should count as a mention of your brand (e.g. "HubSpot CRM", "Hub Spot").

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

One competitor per line. Add aliases and domains after a | sign: "Bright Data | Luminati | brightdata.com". Each answer row says whether, where and how often every competitor was mentioned or cited.

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

Questions your customers might ask an AI assistant, one per line. Write {brand} to insert the brand name (e.g. "Is {brand} worth it?"). Every prompt is sent to every provider that has an API key; each answer is one dataset row.

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

AI answers vary from one request to the next. Ask each prompt this many times per provider to measure a more stable visibility rate. Each answer is billed as one row.

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

From platform.openai.com > API keys. Used for the Responses API with the web search tool.

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

From platform.claude.com > API keys. Used for the Messages API with the web search tool.

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

From perplexity.ai > API settings. Sonar always searches the web and returns its sources.

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

Any OpenAI model that supports the Responses API and the web_search tool. Default: gpt-6-luna (OpenAI's lowest-priced model when this Actor was built).

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

Any Claude model id, e.g. claude-haiku-5-5 (lowest price), claude-sonnet-5-5 or claude-opus-5-5.

## `anthropicEffort` (type: `string`):

How much the Claude model thinks before answering. Low keeps token cost down and is enough for this kind of question. Ignored on older models that do not support it.

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

Sonar model id, e.g. sonar or sonar-pro.

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

On: OpenAI and Claude answer with live web search and cite sources, like ChatGPT search does for users. Off: they answer from their training data only (cheaper, no citations). Perplexity always searches.

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

Upper limit of searches Claude may run for one answer. Anthropic bills web searches separately to your account.

## `maxOutputTokens` (type: `integer`):

Upper limit on the length of each answer, including model reasoning where the provider counts it. Longer answers mention more brands but cost more.

## `timeoutSecs` (type: `integer`):

A request that takes longer is cancelled and retried.

## `maxRetries` (type: `integer`):

Retries after a timeout, network error, rate limit (429) or provider overload (5xx), with exponential back-off and Retry-After. A rejected key, missing quota or unknown model is not retried: that provider stops after one error row.

## `concurrency` (type: `integer`):

Lower this if your API account has low rate limits.

## Actor input object example

```json
{
  "brand": "Apify",
  "brandDomains": [
    "apify.com"
  ],
  "brandAliases": [],
  "competitors": [
    "Bright Data | brightdata.com",
    "Zyte | zyte.com",
    "ScrapingBee | scrapingbee.com",
    "Oxylabs | oxylabs.io"
  ],
  "prompts": [
    "What are the best web scraping platforms?",
    "Which tool can I use to scrape a website without writing code?",
    "What is a good alternative to Bright Data for web scraping?"
  ],
  "samplesPerPrompt": 1,
  "openaiModel": "gpt-6-luna",
  "anthropicModel": "claude-haiku-5-5",
  "anthropicEffort": "low",
  "perplexityModel": "sonar",
  "webSearch": true,
  "maxSearchesPerAnswer": 2,
  "maxOutputTokens": 1200,
  "timeoutSecs": 120,
  "maxRetries": 3,
  "concurrency": 3
}
```

# Actor output Schema

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

One row per AI answer: provider, model, prompt, answer text, brand mentioned, position, competitor mentions, cited URLs, sentiment, error

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

Brand mention rate, average position, citation rate, share of voice and competitor ranking per provider and overall (not billed)

# 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": "Apify",
    "brandDomains": [
        "apify.com"
    ],
    "competitors": [
        "Bright Data | brightdata.com",
        "Zyte | zyte.com",
        "ScrapingBee | scrapingbee.com",
        "Oxylabs | oxylabs.io"
    ],
    "prompts": [
        "What are the best web scraping platforms?",
        "Which tool can I use to scrape a website without writing code?",
        "What is a good alternative to Bright Data for web scraping?"
    ],
    "samplesPerPrompt": 1,
    "openaiModel": "gpt-6-luna",
    "anthropicModel": "claude-haiku-5-5",
    "anthropicEffort": "low",
    "perplexityModel": "sonar",
    "webSearch": true,
    "maxSearchesPerAnswer": 2,
    "maxOutputTokens": 1200,
    "timeoutSecs": 120,
    "maxRetries": 3,
    "concurrency": 3
};

// Run the Actor and wait for it to finish
const run = await client.actor("devdarfy/ai-brand-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": "Apify",
    "brandDomains": ["apify.com"],
    "competitors": [
        "Bright Data | brightdata.com",
        "Zyte | zyte.com",
        "ScrapingBee | scrapingbee.com",
        "Oxylabs | oxylabs.io",
    ],
    "prompts": [
        "What are the best web scraping platforms?",
        "Which tool can I use to scrape a website without writing code?",
        "What is a good alternative to Bright Data for web scraping?",
    ],
    "samplesPerPrompt": 1,
    "openaiModel": "gpt-6-luna",
    "anthropicModel": "claude-haiku-5-5",
    "anthropicEffort": "low",
    "perplexityModel": "sonar",
    "webSearch": True,
    "maxSearchesPerAnswer": 2,
    "maxOutputTokens": 1200,
    "timeoutSecs": 120,
    "maxRetries": 3,
    "concurrency": 3,
}

# Run the Actor and wait for it to finish
run = client.actor("devdarfy/ai-brand-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": "Apify",
  "brandDomains": [
    "apify.com"
  ],
  "competitors": [
    "Bright Data | brightdata.com",
    "Zyte | zyte.com",
    "ScrapingBee | scrapingbee.com",
    "Oxylabs | oxylabs.io"
  ],
  "prompts": [
    "What are the best web scraping platforms?",
    "Which tool can I use to scrape a website without writing code?",
    "What is a good alternative to Bright Data for web scraping?"
  ],
  "samplesPerPrompt": 1,
  "openaiModel": "gpt-6-luna",
  "anthropicModel": "claude-haiku-5-5",
  "anthropicEffort": "low",
  "perplexityModel": "sonar",
  "webSearch": true,
  "maxSearchesPerAnswer": 2,
  "maxOutputTokens": 1200,
  "timeoutSecs": 120,
  "maxRetries": 3,
  "concurrency": 3
}' |
apify call devdarfy/ai-brand-visibility-tracker --silent --output-dataset

```

## MCP server setup

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