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

Type your brand: the Actor generates buyer prompts, suggests competitors and audits AI search visibility (ChatGPT, Perplexity, Gemini). Mentions, rank, sentiment, citations, trends, an outreach gap list and a client-ready HTML report. Works with any OpenAI-compatible API.

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

## Pricing

from $0.01 / 1,000 results

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 (GEO/AEO)

Find out whether ChatGPT, Perplexity, Gemini and other AI assistants actually recommend **your brand** — and what they say about your competitors instead. **Just type your brand name**: the Actor generates the customer questions, suggests your competitors and produces an audit with a ready-to-action outreach list.

Scores your visibility: mentions, **recommendation rate**, **ranked position**, sentiment, citations, share of voice, **answer stability** — plus weekly trends with deltas, **multi-engine and multi-client reports**, a **gap-to-outreach list** and a client-ready HTML report.

### Start with one field: zero-config mode

Only `brand` is required:

1. The Actor **generates 20 realistic buyer questions** itself (best-of lists, comparisons, alternatives, pricing — `promptCount` up to 50).
2. If `competitors` is empty, it **asks the AI to identify your top 5 direct competitors**.
3. It checks every prompt, computes the scores and, for every answer where competitors are recommended but you are not, collects the **cited pages** into an outreach list.

No prompt writing, no competitor research — a complete GEO audit from a single input. Provide `prompts`/`competitors` explicitly to take full control.

![AI visibility report: metrics, weekly trend, share of voice and outreach list](https://api.apify.com/v2/key-value-stores/6BFeeXfCRlHNXUSYw/records/readme-report.png?signature=1sCwfybb2mV8XcfmR7OgK)

### Why GEO/AEO tracking matters

Buyers no longer Google "best CRM" — they ask ChatGPT. GEO/AEO (Generative Engine Optimization), also called AI search visibility or LLM SEO, is about being visible in those answers. This AI rank tracker gives you the same data as enterprise GEO tools (Profound, Peec AI, Otterly) at the price of a few LLM API calls: set up a weekly schedule per client or product and track your visibility over time.

### How it works

1. You provide `brand` (plus optional aliases), `competitors`, and a list of `prompts` — the questions your customers actually ask. Or let the **auto-prompt generator** create realistic customer questions for you.
2. The Actor asks every prompt through one or several engines (`engines` list) — e.g. ChatGPT **and** Perplexity in the same run.
3. For each answer it extracts with an **LLM extraction pass** (regex fallback):
   - whether the brand was mentioned and whether it was **recommended** as an option,
   - its position in ranked recommendations (`rankedPosition`) and among mentioned competitors (`position`),
   - sentiment of the mention (positive / neutral / negative),
   - which competitors were mentioned,
   - cited sources (URLs) — from engine citations (Perplexity, grounded Gemini) and links inside the answer.
4. With `runsPerPrompt` > 1 the same prompt is asked several times and the Actor measures **answer stability** — where your visibility flickers.
5. The final **visibility report** (KV key `report`) aggregates: visibility score (% of answers mentioning the brand), recommendation rate, rank score, per-engine breakdown, share of voice and **delta versus the previous run**.
6. A **client-ready HTML report** (key `report.html`) is generated with a visibility trend chart — open it right in the Output tab of the run or share the link with a client. Multi-brand runs get a section per client.
7. An **outreach list** (key `outreach`) is built from the answers where competitors are recommended but you are not: every cited page is ranked by how many gap prompts cite it — a ready-made outreach target list, not just a dashboard.
8. Optional `webhookUrl`: a JSON summary (scores, deltas per brand, outreach counts) is POSTed when the run finishes — connect Slack, Make, n8n or your backend.
9. Every brand gets **share assets** (KV key `share`): a public share page with social preview (Open Graph) tags, an "Share on X" button with the score, a data-driven verdict line and a **live SVG badge** you can embed on your site.

### Outreach opportunities (gap list)

Monitoring tells you that you are invisible. The outreach list tells you **where to fix it**.

For every answer that recommends competitors but not your brand, the Actor collects the cited pages (review sites, roundups, comparison articles, forum threads) and aggregates them:

```json
{ "url": "https://example.com/best-crm-tools", "gapPrompts": 7,
  "competitors": ["AirForce", "SyncDesk"], "engines": ["sonar"], "promptsSample": ["best CRM for startups"] }
```

- **KV `outreach`** — the full list, ranked by the number of gap prompts (`gapPrompts`).
- The HTML report shows the top 10 as an **Outreach opportunities** table.
- Use it as a pitch list: get listed on these pages and those AI answers start recommending you too. The outreach count is also included in the webhook payload.

### Attention score (what makes it actionable)

The report separates three levels: mentioned → **recommended** (the AI presents you as a viable option) → **ranked #1**. A brand mentioned only as "overpriced" is visible but not recommended — comparing the two rates over weeks shows whether GEO work actually converts mentions into recommendations.

### Metrics

| Metric | Meaning |
|---|---|
| **Visibility** | % of answers that mention your brand |
| **Recommendation rate** | % of answers where the AI actually recommends your brand (not just mentions it) |
| **Rank score** | How high you rank when ranked: 100% = always the #1 recommendation |
| **Answer stability** | How consistent the AI is across repeated runs of the same prompt |
| **Share of voice** | Mentions of you vs each competitor |

### Supported engines

One universal path — any OpenAI-compatible API. Just change `baseUrl` + `model`, or provide an `engines` list to compare models in one run:

| Engine | baseUrl | Model |
|---|---|---|
| OpenAI (ChatGPT) | `https://api.openai.com/v1` | `gpt-4o-mini` |
| Perplexity Sonar | `https://api.perplexity.ai` | `sonar` |
| Gemini | `https://generativelanguage.googleapis.com/v1beta/openai` | `gemini-2.0-flash` |
| Groq | `https://api.groq.com/openai/v1` | `openai/gpt-oss-120b` |
| OpenRouter | `https://openrouter.ai/api/v1` | any from the catalog |

Plus Google SERP engines in the same `engines` list:

| Engine | Entry | Auth |
|---|---|---|
| **Google AI Overviews** | `{"provider": "serpapi", "apiKey": "..."}` | SerpAPI key (reliable, Google's own AI Overview block) |
| **Google AI Mode** (experimental) | `{"provider": "google-ai-mode"}` | Apify residential proxy (`proxyGroup`, default `RESIDENTIAL`) |

Mix them freely: `[{"name": "ChatGPT", "baseUrl": "...", "model": "...", "apiToken": "..."}, {"provider": "serpapi", "apiKey": "..."}]` — the report compares AI assistants and Google AI results side by side. Prompt generation and competitor suggestions require at least one LLM engine, so provide `prompts`/`competitors` explicitly when running SERP engines only.

Your API key goes into the `apiToken` field (stored as a secret). You pay the LLM provider directly at their rates — the Actor adds no markup on top of the event price.

### Multi-client (agency mode)

Use the `brands` list to track several clients in one run — each brand keeps its own prompts, competitors, report, trend history and delta. The HTML report contains a section per brand.

### Try it for free

Enable **`useMockEngine`** and run — it produces deterministic demo answers without any API key and is **not charged** under Pay Per Event pricing. Use it to inspect the output format and the report before spending anything.

### Cost

You are charged **$0.02 per prompt check** (the `prompt-check` event). Examples:

- 25 prompts in one run ≈ **$0.50**
- Weekly schedule on 25 prompts ≈ **$2/month**
- 3 engines × 25 prompts ≈ **$1.50** per full comparison run

A minimal one-time platform fee applies at each run start. Your own LLM API usage is paid directly to the engine provider (the LLM extraction pass is included in the per-check price — with Groq's `gpt-oss-120b` it costs well under $0.001 per answer).

### Input

Main fields (all options and defaults are in the Input schema below):

| Field | Description |
|---|---|
| `brand` | Brand or product name to track (required) |
| `brands` | Multi-client list: `{brand, brandAliases, competitors, prompts}` per client |
| `brandAliases` | Extra spellings: domain, abbreviation, alternate form |
| `competitors` | Rivals to detect — enables position, rank score and share of voice. Empty = auto-suggested |
| `prompts` | Questions your audience asks, up to 200 per run. Empty = auto-generated |
| `autoPrompts` + `promptCount` | Force regeneration of prompts / how many to generate (up to 50) |
| `autoSuggestCompetitors` | Ask the AI to suggest the top 5 competitors when the list is empty (default on) |
| `engines` | Several `{name, baseUrl, model, apiToken}` — compare models in one run |
| `baseUrl` + `model` + `apiToken` | Single-engine mode (backwards compatible) |
| `runsPerPrompt` | 1–3 repeats per prompt for answer-stability tracking |
| `webhookUrl` | POST target for run summaries |
| `alertThresholdPct` | Drop threshold in percentage points — the webhook payload gets `alert: true` when visibility falls by this much since the previous run |

### Output

- **Dataset** (`results`): one item per prompt check — mention, ranked position, recommendation, sentiment, competitors, citations, answer excerpt, extraction method.
- **KV `report`**: aggregated JSON report (single object, or `brands` array for multi-brand runs).
- **KV `report.html`**: client-ready HTML report with trend chart, metric cards, share of voice, engine tables and the outreach section.
- **KV `outreach`**: gap-to-outreach list — pages cited for competitors but never for you, ranked by gap prompts.
- **KV `share`**: public share page URL, X share intent, live badge URL + HTML snippet, and a one-line verdict for every brand.
- **KV `history`**: per-brand trend history across runs (up to 52 points, kept across runs in a named store).

### Share your score

Every run produces a shareable artifact — turn your GEO audit into a post or put a live badge on your site:

- **`share.shareUrl`** — a self-contained HTML report page with Open Graph tags: paste the link into X, LinkedIn or Slack and it unfurls with the score and verdict.
- **`share.xIntentUrl`** — a ready "Share on X" link: `LumaFlow scores 58/100 in AI search (ChatGPT, Perplexity, Gemini). Is your brand visible?`
- **`share.roast`** — a one-line data-driven verdict (e.g. *"ChatGPT and Perplexity recommend AirTrack — not LumaFlow. 2 of 6 answers mention you (33/100)."*).
- **`share.badgeUrl` + `share.badgeSnippet`** — a live SVG badge (*"LumaFlow · AI visibility 58/100"*), updated after every scheduled run. Embed it once:

```html
<a href="https://apify.com/kordyukov/ai-search-visibility-tracker" target="_blank" rel="noopener">
  <img src="https://api.apify.com/v2/.../records/badge-lumaflow.svg?signature=..." alt="LumaFlow — AI visibility 58/100" width="360" height="88" />
</a>
```

For multi-brand runs the `share` record is an object keyed by brand — each client gets their own share page and badge.

### Weekly tracking recipe

1. Run once with your prompts (or leave them empty — they are generated for you).
2. Add a schedule (e.g. every Monday 6:00).
3. Add your webhook (Slack/Make/n8n) and `alertThresholdPct` (e.g. 5) — you'll get scores and deltas after every run, `alert: true` when visibility drops past the threshold, and the HTML report builds a trend line automatically.

# Actor input Schema

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

The brand or product name to track in AI answers. Use the brands list below to track multiple brands in one run.

## `brands` (type: `array`):

Track several brands/clients in a single run. Each brand gets its own prompts, competitors, report and history. When set, the single brand field above is ignored. Format: \[{"brand": "...", "brandAliases": \[...], "competitors": \[...], "prompts": \[...]}]

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

Extra spellings by which the brand may be mentioned (e.g. domain, abbreviations). The brand name itself is always included.

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

Competitor names to detect in the same answers and to compute brand position and share of voice. Leave empty to let the AI suggest the top 5 competitors automatically.

## `autoSuggestCompetitors` (type: `boolean`):

When the competitors list is empty, ask the AI to identify the 5 most relevant direct competitors. Disable to run without competitor tracking.

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

The questions your customers would type into an AI assistant, e.g. "best CRM for small business". One run checks every prompt. Leave empty (or enable autoPrompts) to let the AI generate them for you.

## `autoPrompts` (type: `boolean`):

Prompts are generated automatically whenever the prompts list is empty. Tick this to force regeneration even when prompts are provided.

## `promptCount` (type: `integer`):

How many prompts to generate when autoPrompts is enabled (or when no prompts are provided).

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

Run the same prompts through several engines in one run and compare them in the report. Each entry is an OpenAI-compatible engine ({name, baseUrl, model, apiToken}) or a Google SERP engine: {provider: 'serpapi', apiKey} for Google AI Overviews (reliable), or {provider: 'google-ai-mode'} for Google AI Mode direct scraping (experimental, residential proxy required). Format: \[{"name": "ChatGPT", "baseUrl": "...", "model": "...", "apiToken": "..."}, {"provider": "serpapi", "apiKey": "..."}]

## `model` (type: `string`):

Model name passed to the OpenAI-compatible API.

## `baseUrl` (type: `string`):

Works with OpenAI, Perplexity (https://api.perplexity.ai), Gemini (https://generativelanguage.googleapis.com/v1beta/openai), Groq (https://api.groq.com/openai/v1) and OpenRouter (https://openrouter.ai/api/v1).

## `apiToken` (type: `string`):

API key for the engine above. Stored as a secret. Not required when the mock engine is enabled.

## `useMockEngine` (type: `boolean`):

Runs deterministic fake answers without any API key. A free demo of the Actor's logic — under Pay Per Event pricing mock runs are not charged.

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

Ask the same prompt several times to measure how stable the AI answer is (1 = off). AI assistants often answer inconsistently — this shows where your visibility flickers.

## `webhookUrl` (type: `string`):

Optional. A POST request with a JSON summary (scores, deltas per brand, outreach counts) is sent here when the run finishes — connect Slack, Make, n8n or your own endpoint.

## `alertThresholdPct` (type: `integer`):

When the visibility score drops by at least this many percentage points versus the previous run, the webhook payload includes alert: true (per brand and at the top level). Use it to trigger Slack/n8n notifications. 0 = alerts disabled.

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

How many prompts to check in parallel. Keep low for strict API rate limits.

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

Per-request timeout for a single prompt check.

## `proxyGroup` (type: `string`):

Apify Proxy group used by the google-ai-mode engine. Google blocks datacenter IPs, so residential proxies are required. Defaults to RESIDENTIAL.

## Actor input object example

```json
{
  "brand": "LumaFlow",
  "brands": [
    {
      "brand": "Client One",
      "competitors": [
        "Competitor A",
        "Competitor B"
      ],
      "prompts": [
        "best tool for small teams"
      ]
    },
    {
      "brand": "Client Two",
      "competitors": [
        "Competitor C"
      ],
      "prompts": [
        "top alternatives to Competitor C"
      ]
    }
  ],
  "brandAliases": [
    "lumaflow.com",
    "luma flow"
  ],
  "competitors": [
    "AirTrack",
    "SyncDesk"
  ],
  "autoSuggestCompetitors": true,
  "prompts": [
    "best workflow automation tool for small teams",
    "affordable alternatives to Zapier"
  ],
  "autoPrompts": false,
  "promptCount": 20,
  "engines": [
    {
      "name": "ChatGPT",
      "baseUrl": "https://api.openai.com/v1",
      "model": "gpt-4o-mini",
      "apiToken": "sk-..."
    },
    {
      "provider": "serpapi",
      "apiKey": "your-serpapi-key"
    }
  ],
  "model": "gpt-4o-mini",
  "baseUrl": "https://api.openai.com/v1",
  "useMockEngine": false,
  "runsPerPrompt": 1,
  "webhookUrl": "https://hooks.slack.com/services/...",
  "alertThresholdPct": 0,
  "maxConcurrency": 3,
  "requestTimeoutSecs": 60,
  "proxyGroup": "RESIDENTIAL"
}
```

# Actor output Schema

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

One item per checked prompt (per engine and per stability run): brand mention, ranked position, recommendation, sentiment, competitors, citations and answer excerpt.

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

Aggregated report: visibility score, recommendation rate, rank score, answer stability, breakdown per engine, share of voice, delta vs previous run. Multi-brand runs return a brands array.

## `reportHtml` (type: `string`):

Shareable HTML report with visibility trend chart, recommendation and rank metrics, share of voice, multi-engine and multi-brand sections.

## `outreach` (type: `string`):

Pages cited in AI answers that recommend competitors but not your brand вЂ” a ready-made outreach list ranked by the number of gap prompts.

## `share` (type: `string`):

Public share page URL, X share intent, live SVG badge URL and a data-driven roast verdict for every brand.

# 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 = {
    "brands": [
        {
            "brand": "Client One",
            "competitors": [
                "Competitor A",
                "Competitor B"
            ],
            "prompts": [
                "best tool for small teams"
            ]
        },
        {
            "brand": "Client Two",
            "competitors": [
                "Competitor C"
            ],
            "prompts": [
                "top alternatives to Competitor C"
            ]
        }
    ],
    "engines": [
        {
            "name": "ChatGPT",
            "baseUrl": "https://api.openai.com/v1",
            "model": "gpt-4o-mini",
            "apiToken": "sk-..."
        },
        {
            "provider": "serpapi",
            "apiKey": "your-serpapi-key"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kordyukov/ai-search-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 = {
    "brands": [
        {
            "brand": "Client One",
            "competitors": [
                "Competitor A",
                "Competitor B",
            ],
            "prompts": ["best tool for small teams"],
        },
        {
            "brand": "Client Two",
            "competitors": ["Competitor C"],
            "prompts": ["top alternatives to Competitor C"],
        },
    ],
    "engines": [
        {
            "name": "ChatGPT",
            "baseUrl": "https://api.openai.com/v1",
            "model": "gpt-4o-mini",
            "apiToken": "sk-...",
        },
        {
            "provider": "serpapi",
            "apiKey": "your-serpapi-key",
        },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("kordyukov/ai-search-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 '{
  "brands": [
    {
      "brand": "Client One",
      "competitors": [
        "Competitor A",
        "Competitor B"
      ],
      "prompts": [
        "best tool for small teams"
      ]
    },
    {
      "brand": "Client Two",
      "competitors": [
        "Competitor C"
      ],
      "prompts": [
        "top alternatives to Competitor C"
      ]
    }
  ],
  "engines": [
    {
      "name": "ChatGPT",
      "baseUrl": "https://api.openai.com/v1",
      "model": "gpt-4o-mini",
      "apiToken": "sk-..."
    },
    {
      "provider": "serpapi",
      "apiKey": "your-serpapi-key"
    }
  ]
}' |
apify call kordyukov/ai-search-visibility-tracker --silent --output-dataset

```

## MCP server setup

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