# AI Search Visibility Tracker for ChatGPT, Claude & Perplexity (`forgeloop/ai-brand-visibility`) Actor

Track your brand in AI answers: how often ChatGPT, Claude and Perplexity mention you and your competitors, in which rank, and whether your site is cited. GEO and AEO share of voice for marketing teams. Official APIs with your own keys, pay per answer.

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

## Pricing

from $10.00 / 1,000 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

## AI Search Visibility Tracker for ChatGPT, Claude & Perplexity

Find out whether AI assistants recommend your brand. You enter the questions your customers ask, for example "best CRM for small businesses". The Actor asks them through the official OpenAI, Anthropic (Claude) and Perplexity APIs with web search turned on. For every answer it records whether your brand and your competitors are named, who is named first, and whether your website is among the cited sources.

You bring your own API keys and pay OpenAI, Anthropic or Perplexity directly for the answers. This Actor adds a small fee per answer.

This Actor is not affiliated with, endorsed or sponsored by OpenAI, Anthropic or Perplexity. ChatGPT is a trademark of OpenAI. Claude is a trademark of Anthropic. Perplexity is a trademark of Perplexity AI.

### What it does

- **Asks real search-backed questions.** OpenAI through the Responses API with the `web_search` tool, Perplexity through its Agent API with the Sonar model and web search, Claude through the Anthropic Messages API with the web search tool. No scraping of chatgpt.com, claude.ai or perplexity.ai.
- **Finds brand mentions reliably.** Case-insensitive, whole words only, with aliases. "Notion" does not match "Notional", "Box" does not match "Dropbox", and "HubSpot CRM" plus "HubSpot" in the same spot count once. Links and URLs in the answer are ignored, so a citation like `(hubspot.com)` is not a mention.
- **Ranks brands within each answer.** The brand named first gets rank 1, the next one rank 2.
- **Checks citations.** Did the answer cite a page on your domain or a subdomain? Which domains were cited instead?
- **Repeats prompts.** AI answers change from one request to the next. Ask each prompt up to 5 times for stable rates.
- **Summarizes per brand.** Mention rate, citation rate and average rank, overall and per provider.
- **Handles errors cleanly.** Rate limits and server errors are retried with backoff. A rejected key, an empty account or a wrong model name stops that provider at once, so you do not get hundreds of failing calls.

### Use cases

- **Marketing and SEO teams:** measure your share of AI answers (often called GEO or AEO) and track it month by month with a schedule.
- **Agencies:** benchmark a client against competitors for a fixed set of buyer questions.
- **Content teams:** see which domains the assistants cite for your topics and where your own pages are missing.
- **Product marketing:** check how a launch, a rename or a new comparison page changes what assistants say.

### Input

| Field | Description | Default |
|---|---|---|
| Brand name | Your brand as people write it | |
| Brand aliases | Other names that count as your brand, for example product names | empty |
| Brand domain | Your website, for example `hubspot.com`. Citations of subdomains count too | empty |
| Competitors | JSON list: `[{"name": "Pipedrive", "aliases": ["Pipedrive CRM"], "domain": "pipedrive.com"}]`. Plain names work too | empty |
| Prompts | Buyer questions, one per line, up to 500 | |
| OpenAI API key | Your own key, stored encrypted | |
| Perplexity API key | Your own key, stored encrypted | |
| Anthropic API key | Your own key for Claude, stored encrypted | |
| Providers | OpenAI, Perplexity, Claude, or any mix. A provider without a key is skipped | all three |
| OpenAI model | Any Responses API model with web search | `gpt-6.1-terra` |
| Perplexity model | A model like `perplexity/sonar`, or an effort level like `fast` or `low` | `perplexity/sonar` |
| Claude model | Any Claude model with the web search tool, for example `claude-sonnet-5-5` or `claude-haiku-5-5` | `claude-opus-5-5` |
| Repetitions per prompt | 1 to 5 | 1 |
| Country | Two-letter code, sent as the approximate user location of the web search | empty |
| Answer language | Two-letter code. The assistants are asked to answer in this language | empty |
| Always search the web | Forces OpenAI to search before answering, and tells Claude to search first | on |
| Case-sensitive matching | For brand names that are also common words, like Monday | off |
| Timeout per request | Seconds, 20 to 600 | 120 |
| Parallel requests | 1 to 10 | 3 |

You need at least one key. Write prompts without your brand name, the way a buyer would ask.

**Tip: add short names as aliases.** Answers often use a short form. In a test, Claude wrote only "Teams" in a Slack vs Microsoft Teams answer, so "Microsoft Teams" alone was not found. Give competitors with aliases, for example `{"name": "Microsoft Teams", "aliases": ["Teams", "MS Teams"], "domain": "microsoft.com"}`. Avoid aliases that are common words in your prompts.

### Output

One dataset item per prompt, provider and repetition:

```json
{
  "type": "answer",
  "prompt": "best CRM for small businesses",
  "provider": "perplexity",
  "model": "perplexity/sonar",
  "repetition": 1,
  "country": "US",
  "language": "en",
  "answerText": "Zoho CRM and Salesforce Starter are the most common recommendations for small businesses[1][2]. ... Many owners also mention HubSpot for its free plan[3].",
  "ownBrand": "HubSpot",
  "ownBrandMentioned": true,
  "ownBrandRank": 3,
  "ownBrandCited": false,
  "brands": [
    { "name": "HubSpot", "isOwnBrand": true, "mentioned": true, "mentionCount": 1, "firstMentionIndex": 211, "rank": 3, "cited": false, "citedUrls": [] },
    { "name": "Salesforce", "isOwnBrand": false, "mentioned": true, "mentionCount": 2, "firstMentionIndex": 13, "rank": 2, "cited": true, "citedUrls": ["https://www.salesforce.com/small-business/"] }
  ],
  "citedUrls": ["https://www.zoho.com/crm/small-business.html", "https://www.salesforce.com/small-business/"],
  "citedDomains": ["zoho.com", "salesforce.com"],
  "sourceUrls": ["https://www.zoho.com/crm/small-business.html", "https://www.salesforce.com/small-business/", "https://blog.hubspot.com/sales/choosing-a-crm"],
  "searchQueries": ["best CRM for small business"],
  "usage": { "inputTokens": 1520, "outputTokens": 61 },
  "timestamp": "2026-11-11T16:20:05.120Z",
  "error": null
}
```

- `firstMentionIndex` is the character position of the first mention in `answerText`. `rank` is the order among your tracked brands only, `null` when not mentioned.
- `citedUrls` are the sources the answer refers to: `url_citation` annotations for OpenAI, the search results referenced by `[n]` markers for Perplexity, the `web_search_result_location` citations for Claude. `sourceUrls` also lists sources the assistant looked at but did not cite.
- `usage` shows the tokens on your provider bill. Web search fees come on top, see your provider's price list.

At the end of the run you get one summary item per brand, with `"type": "summary"`:

```json
{
  "type": "summary",
  "brand": "HubSpot",
  "isOwnBrand": true,
  "domain": "hubspot.com",
  "answers": 8,
  "mentioned": 8,
  "mentionRate": 1,
  "cited": 4,
  "citationRate": 0.5,
  "averageRank": 2,
  "byProvider": {
    "openai": { "answers": 4, "mentioned": 4, "mentionRate": 1, "cited": 4, "citationRate": 1, "averageRank": 1 },
    "perplexity": { "answers": 4, "mentioned": 4, "mentionRate": 1, "cited": 0, "citationRate": 0, "averageRank": 3 }
  },
  "error": null
}
```

The same summary is saved as `SUMMARY` in the key-value store and written to the run log. Rates are shares of successful answers, from 0 to 1.

A failed request returns an item with `answerText: null` and an `error`, for example `OpenAI rejected the API key (HTTP 401)`. When a key is rejected or an account has no credit, the remaining requests for that provider are skipped and listed with an error, without calling the provider again.

Export as JSON, CSV or Excel, or read it through the Apify API.

### Pricing

Pay per answer: one charge (0.01 USD) for each successful answer from OpenAI, Claude or Perplexity. Errors, empty answers, skipped requests and the summary items are not charged. Set the maximum charge per run in Apify. The Actor stops before a request when the next answer would go over it, so your provider credit is not spent on answers you cannot get.

Each run also has a start fee of 0.00005 USD per GB of memory, which Apify shows as Actor Start.

**Your provider costs come on top and are billed by OpenAI, Anthropic or Perplexity directly.** They depend on the model, the answer length and the web search fees. A run with 20 prompts, 3 repetitions and all three providers makes 180 requests. Claude web search costs 10 USD per 1,000 searches on top of tokens at the time of writing, and one answer can use up to 5 searches. Check the current prices on the OpenAI, Anthropic and Perplexity pricing pages before large runs.

### Limits

- If you show Claude's answers to your own users, show the cited sources with them. Anthropic requires this for web search results.
- Results come from the APIs, not the consumer apps. ChatGPT, the Claude apps and the Perplexity app can use other models, personalization and settings, so their answers can differ.
- Answers vary between requests, days and countries. Use repetitions and compare trends rather than single answers.
- Mention matching is text based. A brand name that is also a common word can give false hits; use case-sensitive matching or more specific aliases. Paraphrases ("the big Californian CRM vendor") are not recognized.
- Rank only covers the brands you track, not every brand in the answer.
- Your API key needs access to the chosen model and to web search. Rate limits of your account apply; lower "Parallel requests" if you see many retries.
- Up to 500 prompts and 30 brands per run.

### Data source, permitted use and legal

- **Data source:** answers generated by the official OpenAI Responses API, Anthropic Messages API and Perplexity Agent API, called with your own API keys. The Actor does not visit chatgpt.com, claude.ai or perplexity.ai and does not crawl the cited pages.
- **Your keys and your provider account:** You need your own accounts with OpenAI, Anthropic or Perplexity and you must follow their terms and usage policies. The providers bill you directly. Your keys are kept in Apify's encrypted secret input, sent only to the provider they belong to, and never logged or stored in the results.
- **AI output:** Answers are generated by AI models and can be wrong, incomplete or outdated. They show what an assistant said at the time of the run, not facts about any brand. We do not guarantee that results are complete, current or correct.
- **For business use:** This Actor is offered to businesses only, not to consumers.
- **Permitted use:** Use it to measure the visibility of brands in AI answers. Do not use the results to make false or misleading claims about other companies.
- **Your responsibility:** You choose the prompts and brands and decide what happens with the results. Do not put personal data into prompts. If results contain personal data, you are the controller and need your own legal basis.
- **No affiliation:** Not affiliated with, endorsed or sponsored by OpenAI, Anthropic or Perplexity. Brand names are used only to describe compatibility.
- **Provider:** forgeloop, Markus Heiss, Austria. [Imprint](https://devhem.github.io/forgeloop-legal/imprint.html), [Privacy Notice](https://devhem.github.io/forgeloop-legal/privacy.html), [Terms of Use](https://devhem.github.io/forgeloop-legal/terms.html).

### Questions and issues

Open an issue on the Actor page.

# Actor input Schema

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

The brand you want to track, as people write it, for example HubSpot. Matching ignores upper and lower case and never counts hits inside longer words.

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

Other names that count as a mention of your brand: product names, old names, common spellings. Example: HubSpot CRM, Hubspot Sales Hub.

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

Your website domain, for example hubspot.com. A cited source on this domain or any subdomain (blog.hubspot.com) counts as a citation of your brand. Leave empty to measure mentions only.

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

Optional. Brands to compare with, as a JSON list. Each entry has a name, optional aliases and an optional domain: \[{"name": "Pipedrive", "aliases": \["Pipedrive CRM"], "domain": "pipedrive.com"}]. A plain name like "Zoho CRM" also works. Up to 29 competitors. Plain strings also work: \["Pipedrive", "Zoho CRM"]. Add short forms as aliases, because answers often use them ("Teams" for "Microsoft Teams").

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

Questions a customer might ask an AI assistant, one per line. Write them like a buyer, without your brand name, for example "best CRM for small businesses". Up to 500 prompts. Format: a list of strings.

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

Your own OpenAI API key. Needed for the OpenAI answers. OpenAI bills you directly for every answer, including the web search tool fee. The key is stored encrypted, sent only to api.openai.com, and never logged or written to the output.

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

Your own Perplexity API key. Needed for the Perplexity answers. Perplexity bills you directly for every answer, including search fees. The key is stored encrypted, sent only to api.perplexity.ai, and never logged or written to the output.

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

Your own Anthropic API key from console.anthropic.com. Needed for the Claude answers. Anthropic bills you directly for every answer, including the web search fee (10 USD per 1,000 searches at the time of writing). The key is stored encrypted, sent only to api.anthropic.com, and never logged or written to the output.

## `providers` (type: `array`):

Which AI assistants to ask. A selected provider without an API key is skipped with a warning. Each provider needs its key field: openaiApiKey, anthropicApiKey or perplexityApiKey. Answers per run = prompts x repetitions x providers with a key.

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

Model for the OpenAI Responses API with the web_search tool. The default gpt-6.1-terra balances quality and cost. gpt-6-luna is cheaper, gpt-6.1-sol and gpt-6-astra are stronger and cost more on your OpenAI bill.

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

Model for the Perplexity Agent API with web search. The default perplexity/sonar is Perplexity's own search model. You can also give an effort level (fast, low, medium, high) or another model in provider/model form. Old Sonar names like sonar-pro are mapped to their current equivalent.

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

Model for the Anthropic Messages API with the web search tool. The default claude-opus-5-5 is the current Opus model. claude-sonnet-5-5 and claude-haiku-5-5 are cheaper on your Anthropic bill.

## `repetitions` (type: `integer`):

How often each prompt is asked per provider. AI answers vary from run to run, so 3 to 5 repetitions give more stable rates. Every repetition is one answer: one charge here and one request on your provider bill.

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

Optional two-letter country code like US, DE or GB. Passed to the web search as the approximate user location, so results lean toward that market.

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

Optional two-letter language code like en, de or fr. The assistants are asked to answer in this language. Write the prompts in the same language for realistic results.

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

On: OpenAI must run a web search before answering, and Claude is told to search first, so answers come with sources. Off: the model decides, like in a chat app, and some answers come from model knowledge without citations. Perplexity models search by design.

## `caseSensitive` (type: `boolean`):

Turn on when a brand name is also a common word, for example Monday or Notion, so only the exact spelling counts. Off matches any case.

## `timeoutSeconds` (type: `integer`):

Give up on one request after this many seconds. Search answers usually take 5 to 60 seconds. Timeouts, rate limits and server errors are retried up to 3 times with backoff.

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

How many requests run at the same time across providers. Lower it when your API account has low rate limits.

## Actor input object example

```json
{
  "brandName": "HubSpot",
  "brandAliases": [
    "HubSpot CRM"
  ],
  "brandDomain": "hubspot.com",
  "competitors": [
    {
      "name": "Salesforce",
      "aliases": [
        "Salesforce Starter"
      ],
      "domain": "salesforce.com"
    },
    {
      "name": "Pipedrive",
      "domain": "pipedrive.com"
    },
    {
      "name": "Zoho CRM",
      "aliases": [
        "Zoho"
      ],
      "domain": "zoho.com"
    }
  ],
  "prompts": [
    "What is the best CRM for a small business?",
    "Which CRM is easiest to set up for a 5 person sales team?"
  ],
  "providers": [
    "openai",
    "perplexity",
    "anthropic"
  ],
  "openaiModel": "gpt-6.1-terra",
  "perplexityModel": "perplexity/sonar",
  "anthropicModel": "claude-opus-5-5",
  "repetitions": 1,
  "forceWebSearch": true,
  "caseSensitive": false,
  "timeoutSeconds": 120,
  "maxConcurrency": 3
}
```

# Actor output Schema

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

No description

## `summary` (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 = {
    "brandName": "HubSpot",
    "brandAliases": [
        "HubSpot CRM"
    ],
    "brandDomain": "hubspot.com",
    "competitors": [
        {
            "name": "Salesforce",
            "aliases": [
                "Salesforce Starter"
            ],
            "domain": "salesforce.com"
        },
        {
            "name": "Pipedrive",
            "domain": "pipedrive.com"
        },
        {
            "name": "Zoho CRM",
            "aliases": [
                "Zoho"
            ],
            "domain": "zoho.com"
        }
    ],
    "prompts": [
        "What is the best CRM for a small business?",
        "Which CRM is easiest to set up for a 5 person sales team?"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("forgeloop/ai-brand-visibility").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": "HubSpot",
    "brandAliases": ["HubSpot CRM"],
    "brandDomain": "hubspot.com",
    "competitors": [
        {
            "name": "Salesforce",
            "aliases": ["Salesforce Starter"],
            "domain": "salesforce.com",
        },
        {
            "name": "Pipedrive",
            "domain": "pipedrive.com",
        },
        {
            "name": "Zoho CRM",
            "aliases": ["Zoho"],
            "domain": "zoho.com",
        },
    ],
    "prompts": [
        "What is the best CRM for a small business?",
        "Which CRM is easiest to set up for a 5 person sales team?",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("forgeloop/ai-brand-visibility").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": "HubSpot",
  "brandAliases": [
    "HubSpot CRM"
  ],
  "brandDomain": "hubspot.com",
  "competitors": [
    {
      "name": "Salesforce",
      "aliases": [
        "Salesforce Starter"
      ],
      "domain": "salesforce.com"
    },
    {
      "name": "Pipedrive",
      "domain": "pipedrive.com"
    },
    {
      "name": "Zoho CRM",
      "aliases": [
        "Zoho"
      ],
      "domain": "zoho.com"
    }
  ],
  "prompts": [
    "What is the best CRM for a small business?",
    "Which CRM is easiest to set up for a 5 person sales team?"
  ]
}' |
apify call forgeloop/ai-brand-visibility --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,forgeloop/ai-brand-visibility"
        }
    }
}
```

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/E19eKFH0lstJMERru/builds/uExnpGXNLRQNdFiE0/openapi.json
