# AI Answer Visibility Tracker: ChatGPT, Perplexity, Gemini, Grok (`damodaran_dhanuauraman/ai-answer-visibility-tracker`) Actor

Check if ChatGPT (OpenAI), Perplexity, Gemini, Claude and Grok mention your brand, at what position, which competitors they name and which URLs they cite. Share-of-voice summary. Bring your own API keys.

- **URL**: https://apify.com/damodaran_dhanuauraman/ai-answer-visibility-tracker.md
- **Developed by:** [Damodaran Dhanusuraman](https://apify.com/damodaran_dhanuauraman) (community)
- **Categories:** SEO tools, AI
- **Security:** Limited permissions
- **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 Answer Visibility Tracker: ChatGPT, Perplexity, Gemini, Claude, Grok

**AI brand visibility API: check whether ChatGPT (OpenAI API), Perplexity, Gemini, Claude and Grok mention your brand and competitors for your prompts, with cited URLs. Bring your own API keys. Free mock mode to try the output.**

Check whether AI answer engines mention your brand. For each prompt your buyers might ask ("best CRM for startups", "Notion alternatives"), this Actor sends the prompt to the **OpenAI, Perplexity, Gemini, Anthropic (Claude) and xAI (Grok) APIs** with web search turned on, then returns plain JSON:

- **Is your brand mentioned?** How many times, its **position** among all brands named, and its **rank in a list** if the answer has one
- **Which competitors are named**, in order, and which of your competitors are not named
- **Which URLs and domains are cited**, and whether **your own site** is one of them
- A **share-of-voice summary** across all prompts and engines: mention rate per engine, top cited domains, and prompts where competitors appear but your brand does not

It extracts facts from the answer text and citations. It does not score sentiment or guess.

### Bring your own API keys (BYOK)

You add your own provider API keys. You pay each provider directly for its API usage, on your own account. Keys are Apify secret inputs (encrypted), sent only in request headers to that provider, and redacted from error messages and output.

| Engine id | Provider API used | Key input | Default model |
|---|---|---|---|
| `openai` | OpenAI Responses API + `web_search` tool | `openaiApiKey` | `gpt-4.1-mini` |
| `perplexity` | Perplexity Sonar chat completions | `perplexityApiKey` | `sonar` |
| `gemini` | Gemini API + Google Search grounding | `geminiApiKey` | `gemini-2.5-flash` |
| `claude` | Anthropic Messages API + web search tool | `anthropicApiKey` | `claude-haiku-4-5` |
| `grok` | xAI Responses API + `web_search` tool | `xaiApiKey` | `grok-4.7` |

Models are configurable with the `models` input, e.g. `{ "openai": "gpt-4.1", "grok": "grok-4.3" }`. Providers rename and retire models often, so if a default stops working, set a current model name from the provider's docs. Engines without a key are **skipped and not billed**.

**Mock mode** (`mockMode: true`) returns deterministic fake answers with no API calls and no charges. Use it to try the output format and set up integrations (Sheets, Slack, n8n) before using real keys.

### Please read: limits and testing status

- **API answers are not the same as the consumer apps.** What the ChatGPT, Gemini, Claude, Perplexity or Grok apps show a signed-in user can differ (different models, retrieval, location and personalisation). Treat results as a consistent, repeatable *proxy* for AI visibility, not an exact copy of what any one person sees.
- **Answers vary between runs.** Use `repeats` (2 to 5) and compare trends over time rather than single answers.
- **Testing so far:** the engine adapters follow each provider's public API docs and are covered by automated tests against hand-written sample responses, and full runs have been done in mock mode. They have **not yet been run against every live provider API**. If an engine returns an error or odd output, please report it in the **Issues** tab with the engine id and error message (never paste your key), and it will be fixed.
- Gemini citations come back as Google redirect links, so the source domain is taken from the citation title where possible.

### Quick start

1. Enter your brand, e.g. `Notion`, or `Notion | notion.so` so citations of your own site are detected.
2. Add competitors, one per line, e.g. `Coda | coda.io`.
3. Add 5 to 20 prompts your buyers might ask an AI assistant, e.g. `best wiki tool for a startup team`.
4. Paste at least one API key (OpenAI, Perplexity, Gemini, Anthropic or xAI), or turn on **Mock mode** to try it for free.
5. Run. Open the **Summary** for share of voice, or export answers to CSV, Excel or Google Sheets.

### Input example

```json
{
  "brand": "Notion | notion.so, notion.com",
  "brandAliases": ["Notion.so", "Notion AI"],
  "competitors": ["Confluence | atlassian.com", "Coda | coda.io", "ClickUp"],
  "prompts": ["best wiki tool for a startup team", "Notion alternatives for project documentation"],
  "engines": ["openai", "perplexity", "gemini"],
  "repeats": 2,
  "openaiApiKey": "<your key>", "perplexityApiKey": "<your key>", "geminiApiKey": "<your key>"
}
```

`brand` is a plain string (`"Acme"` or `"Acme | acme.com"`). Through the API, competitors can also be objects: `{ "name": "Coda", "aliases": ["Coda.io"], "domains": ["coda.io"] }`.

Other inputs: `country` (two-letter code for OpenAI web search location), `includeAnswerText` (store the raw answer, up to 20,000 characters), `includeSummaryRow`, `maxAnswers` (budget guard, default 500) and `maxConcurrency` (default 4).

### Output

One `answer` row per prompt × engine × repeat, plus one `summary` row (also saved as `SUMMARY` in the key-value store). Example answer row from **mock mode** (sample data, not a real AI answer):

```json
{
  "recordType": "answer", "prompt": "best wiki tool for a startup team", "engine": "openai", "repeat": 1, "status": "ok",
  "analysis": {
    "brandMentioned": true, "brandMentionCount": 1, "brandPosition": 2, "brandListRank": 2,
    "competitorsMentioned": [{ "name": "Coda", "position": 1, "listRank": 1, "count": 1 }, { "name": "Confluence", "position": 3, "listRank": 3, "count": 1 }],
    "competitorsNotMentioned": ["ClickUp"],
    "mentionOrder": ["Coda", "Notion", "Confluence", "Obsidian"],
    "brandCited": true, "brandCitationRanks": [2],
    "citations": [{ "rank": 1, "url": "https://coda.io/", "domain": "coda.io", "belongsTo": "Coda" }],
    "citedDomains": ["coda.io", "notion.so", "atlassian.com", "reddit.com"]
  },
  "answerText": "…"
}
```

Summary row fields: `brandMentionRate`, per-brand `mentionRate`, `shareOfVoice`, `avgPosition`, `answersCitingOwnDomain`, `byEngine` mention rates, `topCitedDomains`, `promptsWhereCompetitorsWinAndBrandMissing`.

### Pricing (pay per event)

- **$0.008 per engine answer** (`engine-answer`), charged only for successful real answers. Failed, skipped and mock answers are free.
- **$0.10 per brand report** (`brand-report`), the summary row, charged once per run when at least one real answer succeeded. Mock runs are free.
- Your provider API costs are separate and billed by each provider on your own key.

Example: 20 prompts × 3 engines × 1 repeat = 60 answers = $0.48 + $0.10 report = **$0.58 per run** on Apify, plus your provider API costs.

### Use cases

- GEO / AEO / LLM SEO agencies tracking client visibility in AI answers
- SaaS and e-commerce marketers checking which competitors AI assistants recommend
- Content teams finding which pages and domains AI engines cite for their topics
- AI agents running SEO workflows through the Apify API or MCP server

### How it compares

- **vs. SaaS AI-visibility dashboards:** those usually charge a monthly fee and run the queries for you. Here you pay per answer, use your own provider keys, and get raw JSON you can put anywhere. There is no dashboard and no stored history; you build trends by running it on a schedule.
- **vs. checking ChatGPT by hand:** it is repeatable and covers many prompts and engines in one run, but it uses the provider **APIs**, which can answer differently from the consumer apps (see limits above).
- **Testing status, honestly:** full runs so far are in mock mode, plus automated tests against sample responses. It has not yet been run against every live provider API.

### Schedule it

1. Save your brand, competitors and prompts as a **Task** in Apify Console.
2. Add an **Apify Schedule** (weekly is usually enough; use `repeats: 2` or more for steadier numbers).
3. Send the `SUMMARY` record to Google Sheets, Slack, Notion, n8n, Make or Zapier and chart `brandMentionRate` per engine over time.

### Use in n8n, Make, Clay or any HTTP tool

```
POST https://api.apify.com/v2/acts/damodaran_dhanuauraman~ai-answer-visibility-tracker/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>
Content-Type: application/json

{ "brand": "Acme | acme.com", "competitors": ["Rival | rival.com"], "prompts": ["best tool for X"], "engines": ["openai"], "openaiApiKey": "<your key>" }
```

Start with `"mockMode": true` to wire up your workflow for free, then add real keys. In n8n or Make, use the Apify "Run Actor" module (or the HTTP call above) on a schedule, filter rows where `recordType` is `summary`, and append them to a sheet.

### FAQ

**Does it scrape the ChatGPT or Gemini web apps?** No. It only calls official provider APIs with your keys.
**Is my API key safe?** Keys are Apify secret inputs (encrypted), sent only in request headers to the provider, and redacted from errors and output.
**Why do results vary?** AI answers are non-deterministic. Use `repeats` and track trends.
**Can I try it without API keys?** Yes. Mock mode returns sample answers and charges nothing.
**What does a run cost?** $0.008 per successful real answer plus $0.10 per report, plus your own provider API costs. 20 prompts × 3 engines ≈ $0.58 on Apify.
**Which engines should I start with?** Pick the one or two your buyers use most, run a few prompts, then widen.
**Something broke for one engine?** Open an issue in the Issues tab with the engine id and the error text. Do not include your key.

Keywords: AI visibility tracker, ChatGPT rank tracker, LLM SEO, GEO tool, AEO, generative engine optimization, AI search visibility, brand mentions in ChatGPT, Perplexity rank tracking, Gemini citations, Grok brand mentions, share of voice AI.

# Actor input Schema

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

Brand name as people write it, e.g. "Notion". Optionally add your website after a pipe: "Notion | notion.so, notion.com" (used to detect when AI cites your own site).

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

Extra domains you own, e.g. notion.so. Used to detect citations of your own site.

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

Spellings or product names that also count as a mention, e.g. "Notion.so", "Notion AI".

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

One competitor per line. Optionally add its website after a pipe, e.g. "Coda | coda.io". JSON objects { "name", "aliases", "domains" } also work via API.

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

Questions your buyers ask AI assistants, e.g. "best note taking app for startups".

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

Which answer engines to query. Each needs your own API key below (or mock mode). Supported: openai, perplexity, gemini, claude, grok.

## `repeats` (type: `integer`):

AI answers vary. Ask each prompt N times per engine for more stable mention rates.

## `mockMode` (type: `boolean`):

Generate deterministic fake answers to test your setup and integrations. No keys needed, nothing is billed.

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

Your own key. Used only for this run, never logged or stored in output.

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

Your own Sonar API key.

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

Your own Google AI Studio key.

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

Your own Claude API key.

## `xaiApiKey` (type: `string`):

Your own Grok API key.

## `models` (type: `object`):

Optional, e.g. { "openai": "gpt-4.1", "gemini": "gemini-2.5-pro" }. Defaults: openai gpt-4.1-mini, perplexity sonar, gemini gemini-2.5-flash, claude claude-haiku-4-5, grok grok-4.7.

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

Optional two-letter country code, e.g. US, GB, IN.

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

Store the raw answer text (up to 20,000 characters) with each row.

## `includeSummaryRow` (type: `boolean`):

Push a share-of-voice summary row at the end (also saved as SUMMARY in the key-value store).

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

Budget guard: max prompt x engine x repeat combinations.

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

Parallel API calls.

## Actor input object example

```json
{
  "brand": "Notion | notion.so, notion.com",
  "brandAliases": [
    "Notion.so"
  ],
  "competitors": [
    "Confluence | atlassian.com",
    "Coda | coda.io",
    "ClickUp | clickup.com",
    "Obsidian | obsidian.md"
  ],
  "prompts": [
    "best wiki tool for a startup team",
    "Notion alternatives for project documentation"
  ],
  "engines": [
    "openai",
    "perplexity",
    "gemini"
  ],
  "repeats": 1,
  "mockMode": false,
  "includeAnswerText": true,
  "includeSummaryRow": true,
  "maxAnswers": 500,
  "maxConcurrency": 4
}
```

# Actor output Schema

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

One row per engine answer: whether the brand is mentioned, position, competitors named and cited URLs.

# 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": "Notion | notion.so, notion.com",
    "brandAliases": [
        "Notion.so"
    ],
    "competitors": [
        "Confluence | atlassian.com",
        "Coda | coda.io",
        "ClickUp | clickup.com",
        "Obsidian | obsidian.md"
    ],
    "prompts": [
        "best wiki tool for a startup team",
        "Notion alternatives for project documentation"
    ],
    "engines": [
        "openai",
        "perplexity",
        "gemini"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("damodaran_dhanuauraman/ai-answer-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": "Notion | notion.so, notion.com",
    "brandAliases": ["Notion.so"],
    "competitors": [
        "Confluence | atlassian.com",
        "Coda | coda.io",
        "ClickUp | clickup.com",
        "Obsidian | obsidian.md",
    ],
    "prompts": [
        "best wiki tool for a startup team",
        "Notion alternatives for project documentation",
    ],
    "engines": [
        "openai",
        "perplexity",
        "gemini",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("damodaran_dhanuauraman/ai-answer-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": "Notion | notion.so, notion.com",
  "brandAliases": [
    "Notion.so"
  ],
  "competitors": [
    "Confluence | atlassian.com",
    "Coda | coda.io",
    "ClickUp | clickup.com",
    "Obsidian | obsidian.md"
  ],
  "prompts": [
    "best wiki tool for a startup team",
    "Notion alternatives for project documentation"
  ],
  "engines": [
    "openai",
    "perplexity",
    "gemini"
  ]
}' |
apify call damodaran_dhanuauraman/ai-answer-visibility-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,damodaran_dhanuauraman/ai-answer-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/9UU7oLWjiYuOs3rXV/builds/BPcYuvcRMckEwPsYd/openapi.json
