# AI Search Visibility Tracker: ChatGPT & Perplexity (GEO) (`chapimenge/ai-search-visibility`) Actor

ChatGPT brand monitoring and Perplexity rank tracker: see how often AI search mentions, ranks and cites your brand vs competitors for buyer prompts. LLM share of voice, cited domains, run-over-run deltas. Official APIs, Arabic-ready.

- **URL**: https://apify.com/chapimenge/ai-search-visibility.md
- **Developed by:** [Temkin Mengistu](https://apify.com/chapimenge) (community)
- **Categories:** AI, SEO tools, Marketing
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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: ChatGPT & Perplexity Brand Share of Voice (GEO)

**Find out whether AI assistants recommend your brand or your competitors.** Enter your brand, your competitors and the questions your buyers ask. The Actor asks **ChatGPT** (included) and optionally **Perplexity** (with your own Perplexity API key, for now) each question, with live web search turned on, and reports for every answer:

- whether your brand was mentioned
- its rank among the tracked brands
- which competitors were mentioned, and in what order
- which websites the AI cited
- whether your own domain was cited

It then calculates **LLM share of voice** per engine and overall, and can compare the results with your previous run.

Built for **generative engine optimization (GEO / AEO)**: SEO teams, agencies and brand managers who need **ChatGPT brand monitoring**, a **Perplexity rank tracker** and **LLM share of voice** reporting, tracking **AI search visibility** the way they track Google rankings. It uses the providers' **official APIs**, not browser scraping, and supports **Arabic** and other non-English prompts.

### What you get

| Output | Where |
|---|---|
| One row per prompt × engine: `brandMentioned`, `brandRank`, `competitorsMentioned`, `citations`, `citedDomains`, `brandCited`, answer text | Dataset (Overview and "Answers & citations" views) |
| Share of voice, mention rate, average rank, own-domain citation rate, top cited domains (per engine and overall), changes vs the previous run | Last dataset row (`type: "summary"`) and the key-value record `SUMMARY` |
| Client-ready HTML report (light/dark, RTL-friendly) | Key-value record `REPORT` |

### How it works

| Engine | How it is queried |
|---|---|
| ChatGPT | OpenAI Responses API with the built-in `web_search` tool (default model `gpt-5-mini`) |
| Perplexity | Perplexity Agent API, `perplexity/sonar` with web search — **currently requires your own Perplexity API key** |

Mention detection:

- **Ignores case and accents.** "Nestle" matches "Nestlé".
- **Respects word boundaries.** "Apple" does not match "Pineapple".
- **Counts aliases and domains.** "hubspot.com" counts as a HubSpot mention.
- **Is Arabic-aware.** It ignores harakat and tatweel, unifies أ/إ/آ/ا, ة/ه and ى/ي, and handles attached prefixes such as و، ب، ل، ال. For example "وبنون" matches "نون", but "كانون" does not.

**Rank** is the order in which tracked brands are first mentioned in the answer (1 = mentioned first). **Share of voice** is your brand's mentions divided by the mentions of all tracked brands.

### Input example

```json
{
  "brand": "HubSpot",
  "brandAliases": ["HubSpot CRM"],
  "brandDomain": "hubspot.com",
  "competitors": [
    "Salesforce | salesforce.com",
    "Zoho | zoho.com | Zoho CRM",
    "Pipedrive | pipedrive.com"
  ],
  "prompts": [
    "What is the best CRM for a small business?",
    "Which CRM is easiest to set up for a startup?",
    "ما هو أفضل نظام CRM للشركات الصغيرة في الإمارات؟"
  ],
  "engines": ["chatgpt"],
  "country": "AE",
  "runsPerPrompt": 1
}
```

Optional inputs:

- **`previousDatasetId`**: adds change fields versus an earlier run.
- **`language`**: asks the engines to answer in a given language.
- **`openaiApiKey` / `perplexityApiKey`**: bring your own keys (cheaper, see pricing).
- **`maxAnswerChars` / `includeAnswer`**: control how much answer text is stored.

### Output example (one check)

```json
{
  "type": "check",
  "engine": "chatgpt",
  "model": "gpt-5-mini-2025-08-07",
  "prompt": "What is the best CRM for a small business?",
  "status": "ok",
  "brandMentioned": true,
  "brandRank": 1,
  "competitorsMentioned": [
    { "name": "Zoho", "rank": 2, "mentionCount": 1 },
    { "name": "Pipedrive", "rank": 3, "mentionCount": 1 },
    { "name": "Salesforce", "rank": 4, "mentionCount": 1 }
  ],
  "brandCited": true,
  "citations": [
    { "url": "https://www.forbes.com/advisor/business/software/best-crm-small-business/", "domain": "forbes.com", "title": "Best CRM For Small Business 2026 – Forbes Advisor" },
    { "url": "https://www.hubspot.com/products/crm", "domain": "hubspot.com", "title": "Free CRM Software | HubSpot" }
  ],
  "citedDomains": ["forbes.com", "hubspot.com"],
  "answer": "Top picks for small businesses in 2026: 1. HubSpot CRM …",
  "previousBrandMentioned": false,
  "chargedEvent": "check",
  "timestamp": "2026-09-27T10:00:00.000Z"
}
```

Summary row (shortened):

```json
{
  "type": "summary",
  "brand": "HubSpot",
  "overall": {
    "checks": 100,
    "brandMentionRate": 0.62,
    "brandShareOfVoice": 0.31,
    "brandAvgRank": 1.8,
    "brandCitedRate": 0.24,
    "entities": [{ "name": "HubSpot", "mentionRate": 0.62, "shareOfVoice": 0.31, "avgRank": 1.8 }, "…"],
    "topCitedDomains": [{ "domain": "g2.com", "checks": 41, "rate": 0.41 }, "…"]
  },
  "byEngine": { "chatgpt": { "…": "…" }, "perplexity": { "…": "…" } },
  "delta": { "overall": { "brandMentionRate": 0.08, "brandShareOfVoice": 0.03 } },
  "totals": { "plannedChecks": 100, "okChecks": 100, "failedChecks": 0, "skippedForBudget": 0 }
}
```

The numbers above are illustrative. They are not real measurements.

### Pricing (pay per event)

| Event | Price | When |
|---|---|---|
| AI answer check | **$0.09** | One prompt answered by ChatGPT using the Actor's API key |
| AI answer check, your own key | **$0.02** | One prompt answered by one engine using your API key. You pay the AI provider directly. |

- **Failed checks are not charged.**
- There is no report fee: the summary and HTML report are included.
- The Actor respects your **Maximum cost per run** setting. It stops starting new checks when the next one would exceed the limit, then finishes normally with a summary of what was checked.

Example: 50 prompts × ChatGPT = 50 checks = **$4.50**. Adding Perplexity with your own key: +50 checks × $0.02 = **$1.00**, plus what Perplexity bills you.

### Scheduling weekly tracking

1. Run the Actor once and note the run's **dataset ID**.
2. Create a **Schedule** (for example weekly) with the same input, and put the previous dataset ID in `previousDatasetId`.
3. Each run's summary and rows then show changes (`delta`, `previousBrandMentioned`, `previousBrandRank`). Use the Apify API or an integration to update `previousDatasetId` automatically.

### FAQ

**Are these the same answers I see in the ChatGPT / Perplexity apps?**
Not exactly. The Actor uses the official developer APIs with web search. Consumer apps can use different models, personalization, memory, location and system prompts. Treat the results as a consistent, repeatable sample of what the engines say, not a screenshot of one person's app.

**Why do results change between runs?**
AI answers are non-deterministic, and search results change daily. Use `runsPerPrompt` (2–3) and track trends over several weeks rather than single answers.

**Does it cover Google Gemini or AI Overviews?**
Not yet. Google's API terms restrict how search-grounded Gemini answers may be analyzed or resold, and there is no official API for AI Overviews, so this Actor covers ChatGPT and Perplexity only.

**Does it work in Arabic?**
Yes. Prompts can be in any language. Brand matching normalizes Arabic spelling variants and attached prefixes, and the HTML report renders right-to-left text correctly. Add the Arabic spelling of your brand as an alias.

**How is a "mention" different from a "citation"?**
A mention is your brand name, an alias or your domain appearing in the answer text. A citation is a source URL the engine attached to the answer. `brandCited` is true when one of the cited URLs is on your domain or a subdomain of it.

**Can a common word as a brand name cause false positives?**
Yes. A brand called "Notion" or "Apple" will also match the ordinary word, because matching is text-based. Use specific aliases where possible.

**Is my API key safe?**
Key inputs are Apify secret inputs, stored encrypted. They are never written to the dataset, logs or report.

### Limitations

- API answers can differ from consumer app answers, and results vary from run to run.
- Mention detection is text matching, not semantic understanding: it cannot tell "Apple" the company from "apple" the fruit, and it does not score sentiment.
- Rank is based on the order of mention, not on an explicit "top 10" list.
- Google Gemini, AI Overviews and AI Mode are not covered (see FAQ).
- Each run is limited to 200 prompts and 50 competitors.

### Support

Open an issue on the Actor's **Issues** tab with the run ID. Please do not paste API keys.

# Actor input Schema

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

The brand name to track, exactly as people write it (e.g. "HubSpot"). Matching ignores case and accents and understands Arabic spelling variants.

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

Other names that count as a mention of your brand: product names, abbreviations, Arabic spelling (e.g. "HubSpot CRM", "هب سبوت"). Terms shorter than 2 characters are ignored.

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

Your domain, e.g. "hubspot.com". Used to detect when AI answers cite your site (subdomains count) and when the domain is written in the answer.

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

One competitor per line in the format <code>Name | domain.com | alias 1, alias 2</code>. Domain and aliases are optional. Used for rank and share-of-voice. Up to 50.

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

1–200 questions your customers might ask an AI assistant, e.g. "What is the best CRM for a small business?". Any language works, including Arabic. Each prompt is sent to each selected engine.

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

Which AI search engines to ask. ChatGPT = OpenAI Responses API with web search (included). Perplexity = Perplexity Agent API (Sonar) with web search — currently requires your own Perplexity API key (field below).

## `runsPerPrompt` (type: `integer`):

AI answers vary from run to run. Asking each prompt 2–3 times gives steadier averages (each run is charged as a separate check).

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

ISO language code such as "ar" or "en". If set, engines are asked to answer in that language. Leave empty to let the engine answer naturally (usually in the prompt's language).

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

2-letter country code such as "AE", "SA", "US". Passed as the user location to ChatGPT web search and as a hint to the other engines.

## `previousDatasetId` (type: `string`):

Dataset ID of an earlier run of this Actor. The summary and each result then include changes versus that run (mention rate, share of voice, rank).

## `includeAnswer` (type: `boolean`):

Store the AI answer text in each result.

## `maxAnswerChars` (type: `integer`):

Truncate stored answers to this many characters (0 = no limit). Mention detection always uses the full answer.

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

Use your own OpenAI key for ChatGPT checks. You then pay OpenAI directly and this Actor charges the lower "check-byok" price.

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

Use your own Perplexity API key for Perplexity checks.

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

Advanced. Default: gpt-5-mini.

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

Advanced. Default: perplexity/sonar.

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

How many AI requests run at the same time. Lower it if your own API keys hit rate limits.

## Actor input object example

```json
{
  "brand": "HubSpot",
  "brandAliases": [
    "HubSpot CRM"
  ],
  "brandDomain": "hubspot.com",
  "competitors": [
    "Salesforce | salesforce.com",
    "Zoho | zoho.com | Zoho CRM",
    "Pipedrive | pipedrive.com"
  ],
  "prompts": [
    "What is the best CRM for a small business?",
    "Which CRM is easiest to set up for a startup?",
    "ما هو أفضل نظام CRM للشركات الصغيرة في الإمارات؟"
  ],
  "engines": [
    "chatgpt"
  ],
  "runsPerPrompt": 1,
  "includeAnswer": true,
  "maxAnswerChars": 4000,
  "maxConcurrency": 6
}
```

# Actor output Schema

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

Every AI answer check: engine, prompt, whether the brand was mentioned, its rank, competitors mentioned, citations and cited domains. The last item has type "summary".

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

Brand and competitor mention rate, share of voice, average rank and top cited domains, overall and per engine.

## `report` (type: `string`):

Client-ready HTML report of the run.

# 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": "HubSpot",
    "brandAliases": [
        "HubSpot CRM"
    ],
    "brandDomain": "hubspot.com",
    "competitors": [
        "Salesforce | salesforce.com",
        "Zoho | zoho.com | Zoho CRM",
        "Pipedrive | pipedrive.com"
    ],
    "prompts": [
        "What is the best CRM for a small business?",
        "Which CRM is easiest to set up for a startup?",
        "ما هو أفضل نظام CRM للشركات الصغيرة في الإمارات؟"
    ],
    "engines": [
        "chatgpt"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("chapimenge/ai-search-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 = {
    "brand": "HubSpot",
    "brandAliases": ["HubSpot CRM"],
    "brandDomain": "hubspot.com",
    "competitors": [
        "Salesforce | salesforce.com",
        "Zoho | zoho.com | Zoho CRM",
        "Pipedrive | pipedrive.com",
    ],
    "prompts": [
        "What is the best CRM for a small business?",
        "Which CRM is easiest to set up for a startup?",
        "ما هو أفضل نظام CRM للشركات الصغيرة في الإمارات؟",
    ],
    "engines": ["chatgpt"],
}

# Run the Actor and wait for it to finish
run = client.actor("chapimenge/ai-search-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 '{
  "brand": "HubSpot",
  "brandAliases": [
    "HubSpot CRM"
  ],
  "brandDomain": "hubspot.com",
  "competitors": [
    "Salesforce | salesforce.com",
    "Zoho | zoho.com | Zoho CRM",
    "Pipedrive | pipedrive.com"
  ],
  "prompts": [
    "What is the best CRM for a small business?",
    "Which CRM is easiest to set up for a startup?",
    "ما هو أفضل نظام CRM للشركات الصغيرة في الإمارات؟"
  ],
  "engines": [
    "chatgpt"
  ]
}' |
apify call chapimenge/ai-search-visibility --silent --output-dataset

```

## MCP server setup

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