# AI Visibility Checker – ChatGPT, Perplexity & AI Overviews (`batuweb/ai-search-visibility-checker`) Actor

- **URL**: https://apify.com/batuweb/ai-search-visibility-checker.md
- **Developed by:** [Batulzii Ulziikhuu](https://apify.com/batuweb) (community)
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.00 / 1,000 ai answer analyseds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Visibility Checker – ChatGPT, Perplexity & Claude

Find out whether **AI search answers mention your brand**. Give it the questions your buyers ask ("best CRM for small agencies"), your brand, your domain and your competitors. For every **prompt × AI engine** you get: is your brand mentioned, at **which position** among the brands named, is your **website cited** as a source, which **competitors** appear instead, **sentiment**, all **citations**, and a **visibility score per engine**.

Built for **GEO (Generative Engine Optimization)**, **AEO (Answer Engine Optimization)**, **LLM SEO** and brand monitoring by SEO agencies, marketers and founders.

### Supported AI engines

| Engine | How it is checked | Key needed |
|---|---|---|
| **ChatGPT** | OpenAI Responses API with **web search** | Your OpenAI key |
| **Perplexity** | Perplexity **Sonar** API (with citations) | Your Perplexity key |
| **Claude** | Anthropic Messages API with **web search** tool | Your Anthropic key |

✅ **Official APIs only – no scraping of the ChatGPT, Perplexity or Claude websites.** Important: this measures **API answers** (the provider's model with web search), which are similar to but **not the same as** what the consumer ChatGPT, Perplexity or Claude apps show a signed-in user. You use your own key, so your provider's API terms and usage policies apply to your use of the answers. You pay the provider directly. Keys are stored encrypted (secret input) and never logged.

Google AI Overviews and Gemini are intentionally not supported: Google's terms do not permit automated access to its search results, and the Gemini API terms restrict storing and analysing results grounded with Google Search.

### Why this tool

- **Bring your own key** – you pay your AI provider directly; without any key the run returns one free info record explaining how to start (nothing is called or charged).
- **Position, not just yes/no** – rank of your first mention among all tracked brands, mention count and share of voice.
- **Citations vs. retrieved sources** – `citations` are only the sources the answer actually cites; pages the search tool retrieved but the answer did not cite are listed separately in `retrievedSources` (`brandInRetrievedSources`). Google redirect links are unwrapped to the real domain.
- **Competitor gaps** – prompts where only competitors appear.
- **Visibility score per engine** (0–100) plus an overall score, mention rate, citation rate and average position.
- **Fair billing** – you only pay for final, completed AI answers. Empty, incomplete or search-tool-failure answers, invalid keys, rate limits and errors are free. A wrong key stops calls to that provider immediately.

### Input example

```json
{
  "prompts": ["best SEO audit tools", "semrush alternatives"],
  "brandName": "Semrush",
  "brandDomains": ["semrush.com"],
  "competitors": ["Ahrefs", "Moz", "Screaming Frog"],
  "engines": ["perplexity", "claude"],
  "perplexityApiKey": "pplx-…",
  "countryCode": "us"
}
```

### Output example (one record per prompt × engine)

```json
{
  "type": "result",
  "prompt": "best SEO audit tools",
  "engine": "perplexity",
  "brandMentioned": true,
  "brandPosition": 2,
  "brandMentionCount": 1,
  "brandCited": false,
  "sentiment": "positive",
  "shareOfVoice": 0.33,
  "competitorsMentioned": [{ "name": "Screaming Frog", "mentions": 1, "position": 1 }, { "name": "Ahrefs", "mentions": 1, "position": 3 }],
  "brandsMentionedInOrder": ["Screaming Frog", "Semrush", "Ahrefs"],
  "citations": [{ "rank": 1, "url": "https://…", "title": "…", "domain": "…" }],
  "organicRank": 2,
  "answerText": "The best SEO audit tools vary…"
}
```

Leave every brand field empty and a demo (Semrush vs Ahrefs, Moz, Screaming Frog) runs. If you set your own brand, the demo domain and competitors are **not** used: add your own domains explicitly.

The **last record** is `type: "summary"` with `overallVisibilityScore` and, per engine, `coverage` (checksAttempted, answered, failed, skipped) next to `visibilityScore`, `mentionRate`, `citationRate`, `averagePosition`, `averageShareOfVoice`, `topCompetitors`, `topCitedDomains` and `promptsWhereOnlyCompetitorsAppear`. Failures appear as free `type: "error"` records. A run without any API key returns one free `type: "info"` record (plus the summary).

**Visibility score:** each answer scores 1.0 if your brand is named first, −0.15 per position after that (minimum 0.4), 0.3 if only your domain is cited, 0 if absent; the engine score is the average × 100.

### Pricing

Pay per event: **$0.008 per analysed AI answer** (cheaper on higher Apify plans), plus a tiny start fee. **This is the Actor fee only.** Your total cost = Actor fee + your AI provider's API costs Free: errors, incomplete/empty answers, summary.

- With your own keys, the AI provider bills you directly at its own prices (search/tool calls are often billed on top of tokens).

### Tips

- Answers vary between runs: **schedule a weekly run** and track the trend rather than a single answer.
- Use real buyer questions, not your brand name – "best X for Y", "X alternatives", "X vs Y".
- Add aliases (product names, old names) so every mention counts.

### Limitations

- API answers differ from the consumer ChatGPT / Perplexity / Claude apps (personalisation, model versions, UI features).
- Claude's long searches may pause a turn; the Actor continues it up to 3 times, then records it as incomplete (free).
- Sentiment is a simple lexicon around your brand mention, not a full NLP model.

### Related tools by batuweb

- [SEO Audit Toolkit](https://apify.com/batuweb/seo-audit-toolkit) – technical SEO crawler.
- [Google Trends Scraper](https://apify.com/batuweb/google-trends-scraper) – interest over time, regions, related queries.

# Actor input Schema

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

One question per line, e.g. "best CRM for small agencies". Extra whitespace is collapsed. Each answered prompt × engine is one charged result.

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

Brand to look for in AI answers. If you leave ALL brand fields empty, a demo (Semrush vs Ahrefs/Moz/Screaming Frog) runs.

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

Other spellings or product names that count as a mention. Overlapping names are counted once.

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

Your domains, e.g. example.com. Citations of these count as your brand being cited. Not derived automatically.

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

Competitors to detect in the answers (up to 30).

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

Each engine calls the official API with YOUR key (the provider bills you directly). Leave empty to use every engine you added a key for. Without any key the run only returns a free info record. API answers are not identical to the consumer ChatGPT/Perplexity/Claude apps.

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

Needed for the ChatGPT engine. Uses the Responses API with web search.

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

Needed for the Perplexity engine (Sonar API).

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

Needed for the Claude engine (web search tool must be enabled for your org).

## `countryCode` (type: `string`):

2-letter country code for the AI web search location, e.g. us, de, gb.

## `languageCode` (type: `string`):

Answer language hint for the AI engines, e.g. en, de.

## `chatgptModel` (type: `string`):

Default gpt-4.1-mini.

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

Default sonar.

## `claudeModel` (type: `string`):

Default claude-haiku-4-5.

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

Answer text is truncated to this many characters in the output (analysis uses the full answer).

## Actor input object example

```json
{
  "prompts": [
    "best SEO audit tools",
    "semrush alternatives"
  ],
  "engines": [
    "perplexity"
  ],
  "countryCode": "us",
  "languageCode": "en",
  "chatgptModel": "gpt-4.1-mini",
  "perplexityModel": "sonar",
  "claudeModel": "claude-haiku-4-5",
  "maxAnswerChars": 8000
}
```

# Actor output Schema

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

Brand mention, position, citations and competitors per prompt and engine.

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

Visibility score, mention rate, citation rate and top competitors per engine.

## `fullData` (type: `string`):

Complete records including answer text and all citations.

# 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 = {
    "prompts": [
        "best SEO audit tools",
        "semrush alternatives"
    ],
    "engines": [
        "perplexity"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("batuweb/ai-search-visibility-checker").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 = {
    "prompts": [
        "best SEO audit tools",
        "semrush alternatives",
    ],
    "engines": ["perplexity"],
}

# Run the Actor and wait for it to finish
run = client.actor("batuweb/ai-search-visibility-checker").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 '{
  "prompts": [
    "best SEO audit tools",
    "semrush alternatives"
  ],
  "engines": [
    "perplexity"
  ]
}' |
apify call batuweb/ai-search-visibility-checker --silent --output-dataset

```

## MCP server setup

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

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/JIgxKeujX7sG4styB/builds/6n76ocC25tPSZHz3Z/openapi.json
