# AI Search Visibility Tracker: ChatGPT Claude Gemini Perplexity (`lone_fascia/ai-search-visibility`) Actor

AI search visibility tracker for GEO/AEO: see how often ChatGPT, Claude, Gemini and Perplexity mention and rank your brand vs competitors. Mention rate, share of voice, cited sources. Official APIs with web search, N samples per engine. Pay per answer from $0.015.

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

## Pricing

from $30.00 / 1,000 chatgpt 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: ChatGPT, Claude, Gemini, Perplexity

**See which AI recommends your brand most.** This Actor asks ChatGPT, Claude, Gemini and Perplexity the questions your buyers ask and reports, per engine, how often your brand is mentioned, where it ranks among the brands in the answer, your share of voice against competitors, and which websites each AI cites.

> **What the numbers are, and are not.** All results are **mention rates measured via the official model APIs with each provider's native web search** (accessed through OpenRouter). They are **not equivalent to rankings in the consumer web/app versions** of ChatGPT, Claude, Gemini or Perplexity (chatgpt.com, claude.ai, gemini.google.com, perplexity.ai), which can use different models, personalization, location and system prompts. Every dataset row and the summary report carry this disclaimer. This Actor is not affiliated with OpenAI, Anthropic, Google or Perplexity.

### Sample report (real run)

**A sample brand is pre-filled, just press Run:** Notion vs Confluence and Coda, 2 questions × 4 engines × 1 sample = 8 answers (at the prices below that is 8 answers + summary report = $0.30). Below is the unedited result of our own run with the same input plus a third question, "What are the best wiki tools for startups?" (3 questions × 4 engines = 12 answers, run on 2026-10-24, 12/12 answers succeeded):

> **Headline (`whichAiRecommendsYouMost`):** "Gemini recommends Notion most (mentioned in 100% of answers, #1 in 100%, average position 1). Least: Perplexity (mentioned in 100% of answers, #1 in 33%, average position 2)."

| Engine | Notion mention rate | #1 rate | Avg position | Brands per answer |
|---|---|---|---|---|
| Gemini | 100% | 100% | 1.0 | 10.3 |
| ChatGPT | 100% | 67% | 1.3 | 12.3 |
| Claude | 100% | 67% | 1.7 | 11.0 |
| Perplexity | 100% | 33% | 2.0 | 14.0 |

| Share of voice (all engines) | Mentioned in | Share of voice | #1 count |
|---|---|---|---|
| Notion | 12/12 | 52% | 8 |
| Confluence | 9/12 | 39% | 2 |
| Coda | 2/12 | 9% | 0 |

Untracked brands found automatically: Slite, Nuclino and Tettra (8/12 answers each), Slab, Guru, BookStack and Wiki.js (7/12 each). Most cited domains: guideflow.com and slite.com (6 answers each), nuclino.com and docsio.co (4 each).

One sample per engine is a quick first look; for real tracking use 3+ samples (the API default is 3). Measured via official APIs with web search, not the consumer apps (see the note above).

### Who is this for: GEO, AEO and AI SEO

Generative Engine Optimization (GEO) and Answer Engine Optimization (AEO) are about getting your brand recommended by AI assistants, not just ranked on Google. This Actor is an LLM brand monitor and AI rank tracker for SEO agencies, marketers and indie makers: ask the questions your buyers ask, and measure how often each AI engine mentions you, where it ranks you, and which competitors and sources it cites.

### Why use it

- **One clear answer to "which AI recommends us most?"** The summary report ranks the engines by your mention rate, #1 rate and average position, with a one-line headline.
- **Engines disagree, a lot.** In our test runs across four industries (CRM, project management, VPN, AI writing; 84 answers, same neutral prompt on all four engines), answers named on average **12.5 brands on Perplexity, 9.9 on Claude, 8.2 on ChatGPT and 7.0 on Gemini**. Being "mentioned by AI" means something different on each engine, so you need per-engine numbers.
- **Answers vary run to run.** Each question is asked **N times per engine (default 3)**, so you get a mention *rate* and a consistency score instead of a single lucky or unlucky answer.
- **Comparable prompts.** The same neutral line, *"Then give a complete answer that lists the main options."*, is added for every engine by default, so no engine is nudged into longer or shorter lists than the others. The exact prompt sent is saved on every row.
- **Finds competitors you didn't list.** Brands in the answer that you are not tracking (for example ones in bold, in headings, at the start of a list item or in table cells) are detected too, so you see who actually takes the #1 spot.
- **Citations, cleaned.** Cited URLs are grouped by registrable domain (e.g. `password-manager.cybernews.com` → `cybernews.com`). Gemini's redirect links are resolved to the real source URL.
- **Pay per answer, per engine.** No subscription, no API keys. Failed answers are retried once and never charged.

### Who it's for

- SEO / GEO / AEO agencies reporting AI search visibility to clients
- Brand, content and product-marketing teams tracking competitors in AI answers
- Founders checking whether AI assistants recommend them in their category
- Analysts and AI agents that need raw, exportable answers and citations rather than a black-box score

### How it works

1. You enter your brand, competitors (optional), and the questions buyers ask (e.g. "best password manager for families").
2. For every question × engine × sample, the Actor calls the engine's official API with its native web search turned on, limited to one web search per answer.
3. Each answer is parsed. The Actor records whether your brand is mentioned (case-insensitive, whole-word, aliases supported), the position of every brand in order of first appearance, and the cited URLs and domains.
4. A summary report aggregates the per-engine comparison, mention rate, average position, #1 rate, share of voice, cross-engine agreement, untracked brands and top cited domains.

### Tested across industries

Before release we ran the Actor on password managers, CRM, project management, VPN and AI writing, including a lesser-known brand and questions written in Chinese. In the multi-industry round, **84 of 84 answers succeeded** (4 engines × 21 questions, no failed or skipped answers), and a **48-answer batch (12 questions × 4 engines) finished in 78 seconds**. These are observations from our own test runs, not a guarantee: run time and results depend on the engines, the questions and the day.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `brand` | string | – (required) | Your brand name, matched case-insensitively as a whole word (e.g. "Kit" does not match "ConvertKit"). |
| `questions` | array of strings, max 50 | – (required) | Questions asked to each engine. Write them the way a buyer would; don't include your brand name. |
| `competitors` | array of strings, max 25 | `[]` | Competitor brands to track exactly. List any brand written in non-Latin script (e.g. Chinese) here, because those are not auto-detected. |
| `engines` | array | all four | Any of `chatgpt`, `claude`, `gemini`, `perplexity`. |
| `samplesPerEngine` | integer 1–10 | `3` | How many times each question is asked per engine. |
| `aliases` | object | `{}` | Alternate names; keys must match `brand` or a competitor exactly, e.g. `{"1Password": ["1 Password"]}`. |
| `brandDomains` | array of strings | `[]` | Your domains, to count answers that cite your own site (subdomains included). |
| `completeAnswerHint` | `all` / `chatgpt` / `none` | `all` | Adds the same neutral "list the main options" line to the prompt. Keep `all` for cross-engine comparability. |

**Number of answers = questions × engines × samplesPerEngine** (max 2,000 answers per run). One web search per answer is always on.

**Controlling your spend:** set **Maximum cost per run** in the run options. The Actor never starts an answer whose charge would exceed it, and it keeps room for the summary report. Answers that were not started are counted in `answersNotRunChargeLimit`. Answers run sample-first, so even a capped run covers every question × engine with at least one sample before any second sample starts.

Example input:

```
{
  "brand": "Bitwarden",
  "competitors": ["1Password", "Dashlane", "LastPass", "Proton Pass"],
  "aliases": {"Proton Pass": ["ProtonPass"], "1Password": ["1 Password"]},
  "brandDomains": ["bitwarden.com"],
  "questions": ["best password manager"],
  "engines": ["chatgpt", "claude", "gemini", "perplexity"],
  "samplesPerEngine": 3,
  "completeAnswerHint": "all"
}
```

### Output

#### Dataset: one row per answer (question × engine × sample)

Views: **Overview**, **Brand mentions**, **Answers and citations**. Key fields (full list in the dataset schema):

| Field | Meaning |
|---|---|
| `question`, `engine`, `engineName`, `sample`, `model` | What was asked, to which engine/model, which repetition |
| `prompt` | The exact user message sent |
| `answer` | Full answer text |
| `brandMentioned` | Your brand appears in the answer |
| `brandRank` | Your position among **all** brands in the answer (tracked + detected), by first appearance |
| `brandRankTrackedOnly` | Your position among your brand + listed competitors only |
| `brandContext` | The passage around your first mention |
| `top1`, `top1IsTracked`, `top1TrackedOnly` | Which brand appears first, and whether it's one you track |
| `brandsMentioned`, `rankedBrandsAll` | All brands in order of appearance |
| `mentions` | Tracked brands found: position, occurrences, context |
| `untrackedBrands` | Other brands detected in the answer (heuristic) |
| `citations`, `citedDomains` | Cited URLs (with host and registrable domain) and the deduplicated domains |
| `webSearchRequests` | How many web searches the engine ran |
| `success`, `error`, `chargedEvent`, `latencySec`, `checkedAt`, `disclaimer` | Run metadata |

Example row (real values from a test run, trimmed: lists shortened, answer omitted):

```
{
  "question": "best password manager",
  "engine": "perplexity",
  "engineName": "Perplexity",
  "sample": 1,
  "model": "perplexity/sonar",
  "prompt": "best password manager\nThen give a complete answer that lists the main options.",
  "brand": "Bitwarden",
  "brandMentioned": true,
  "brandRank": 3,
  "brandRankTrackedOnly": 2,
  "top1": "1Password",
  "top1IsTracked": true,
  "top1TrackedOnly": "1Password",
  "rankedBrandsAll": [
    {"name": "1Password", "tracked": true, "rank": 1},
    {"name": "NordPass", "tracked": false, "rank": 2},
    {"name": "Bitwarden", "tracked": true, "rank": 3}
  ],
  "citations": [
    {"url": "https://www.cnbc.com/select/best-password-managers/", "title": "Best Password Managers of 2026 - CNBC", "host": "cnbc.com", "domain": "cnbc.com"}
  ],
  "citedDomains": ["cnbc.com", "nytimes.com", "cnet.com", "wired.com", "pcmag.com", "..."],
  "success": true,
  "chargedEvent": "perplexity-answer",
  "checkedAt": "2026-10-22T15:31:49+00:00",
  "disclaimer": "Mention rates are measured via the official model APIs with web search enabled (called through OpenRouter). They are NOT equivalent to rankings in the consumer web/app versions of ChatGPT, Claude, Gemini or Perplexity, which can use different models, personalization, location and search settings."
}
```

#### Summary report: key-value store record `OUTPUT`

The same report is also appended as the **last dataset row** with `"type": "summary"` (answer rows have `"type": "answer"`), so API users who only read the dataset get it too; it is not charged again.

- `whichAiRecommendsYouMost`: a one-line headline. Real example from a 1-question test run: *"ChatGPT recommends Bitwarden most (mentioned in 100% of answers, #1 in 100%, average position 1). Least: Claude (mentioned in 100% of answers, #1 in 0%, average position 3.3)."*
- `engineComparison`: one entry per engine, ranked: `brandMentionRate`, `brandTop1Rate`, `avgBrandRankWhenMentioned`, `brandShareOfVoice`, `mostFrequentTop1Brand`, `avgBrandsPerAnswer`
- `overall` and `perEngine`: `brandMentionRate`, `avgBrandRankWhenMentioned`, `brandTop1Rate`
- `perQuestion`: the same metrics per question, plus per-engine mention rate
- `shareOfVoice`: per tracked brand (overall and per engine): `mentionRate`, `shareOfVoice`, `avgRankWhenMentioned`, `top1Count`
- `crossEngine`: whether engines agree on the #1 brand, pairwise agreement, within-engine consistency across samples
- `untrackedBrands`: detected brands with mention rate, #1 count and per-engine counts
- `citations`: `topCitedDomains`, `perEngineTopDomains`, `avgCitationsPerAnswer`, `answersCitingBrandDomain`
- `answersRequested`, `answersSucceeded`, `answersNotRunChargeLimit`: how many answers were requested, succeeded, or not started because of your maximum cost per run
- `billing`: events billed in this run and their prices

Example summary excerpt (real values from a 27-answer test run: 3 questions × Claude/Gemini/Perplexity × 3 samples, trimmed):

```
{
  "brand": "Bitwarden",
  "overall": {"answers": 27, "brandMentionRate": 1.0, "avgBrandRankWhenMentioned": 3.2963, "brandTop1Rate": 0.1481},
  "perEngine": {
    "claude":     {"brandMentionRate": 1.0, "avgBrandRankWhenMentioned": 3.7778, "brandTop1Rate": 0.3333},
    "gemini":     {"brandMentionRate": 1.0, "avgBrandRankWhenMentioned": 2.2222, "brandTop1Rate": 0.1111},
    "perplexity": {"brandMentionRate": 1.0, "avgBrandRankWhenMentioned": 3.8889, "brandTop1Rate": 0.0}
  },
  "shareOfVoice": {"overall": {
    "Bitwarden": {"mentionRate": 1.0, "shareOfVoice": 0.2455, "top1Count": 4},
    "1Password": {"mentionRate": 1.0, "shareOfVoice": 0.2455, "top1Count": 11},
    "Proton Pass": {"mentionRate": 0.8889, "shareOfVoice": 0.2182, "top1Count": 0}
  }},
  "crossEngine": {"questions": 3, "questionsAllEnginesAgreeTop1": 1, "avgPairwiseTop1Agreement": 0.5555},
  "untrackedBrands": {"answersWhereTop1IsUntracked": 12, "list": [
    {"name": "NordPass", "mentionRate": 0.9259, "top1Count": 9}
  ]},
  "citations": {"avgCitationsPerAnswer": 10.8148, "answersCitingBrandDomain": 8,
    "topCitedDomains": [{"domain": "security.org", "answersCiting": 19}, {"domain": "cyberinsider.com", "answersCiting": 18}]}
}
```

In this example the brand was mentioned in every answer, but an untracked competitor (NordPass) came first in 9 of 27 answers. That is the kind of gap a single "are we mentioned?" check misses.

### Pricing (pay per event)

One **answer** = one question × one engine × one sample. Only successful answers are charged.

| Event | Price |
|---|---|
| Perplexity answer | $0.015 |
| ChatGPT answer | $0.03 |
| Claude answer | $0.03 |
| Gemini answer | $0.05 |
| Summary report (once per run, if at least one answer succeeded) | $0.05 |

**Example:** 1 question × 4 engines × 3 samples = 12 answers
\= 3 × $0.015 + 3 × $0.03 + 3 × $0.03 + 3 × $0.05 = **$0.375**, plus the $0.05 summary report = **$0.425 per run**.

More examples (calculated from the prices above):

- 10 questions × 4 engines × 3 samples = 120 answers → $3.75 + $0.05 = **$3.80**
- 5 questions × Perplexity only × 3 samples = 15 answers → $0.225 + $0.05 = **$0.275**

Your **Maximum cost per run** is respected exactly. The only other limit is a built-in safety cap of $60 per run, well above the largest allowed task (about $46 for 2,000 answers), so normal runs never hit it.

### FAQ

**Are these the same rankings I'd see in the ChatGPT / Gemini / Claude / Perplexity apps?**
No. The results are **mention rates measured via the official APIs with native web search**, not screenshots or scrapes of the consumer apps, and they are not equivalent to rankings there. Consumer apps can use different models, system prompts, personalization, location and conversation history, so their answers can differ. Use this Actor as a consistent, repeatable benchmark rather than a mirror of what one particular user sees.

**Which models are used?**
Each row's `model` field records the exact model. At the time of writing: `openai/gpt-6-luna` (ChatGPT), `anthropic/claude-haiku-5.5` (Claude), `google/gemini-3.5-flash-lite` (Gemini), `perplexity/sonar` (Perplexity), all called through OpenRouter with provider-native web search.

**Why ask the same question several times?**
AI answers are not deterministic. In our tests the #1 brand from the same engine and the same question often changed between samples (a within-engine consistency of 0.67 was common with 3 samples). Several samples give you a rate instead of a coin flip. Raise `samplesPerEngine` for steadier numbers.

**Why add "Then give a complete answer that lists the main options."?**
Without it, some engines (notably ChatGPT with a single search) sometimes replied with one or two sentences. Using the same neutral line for all engines keeps the comparison fair. Set `completeAnswerHint` to `none` if you want the raw question only.

**How is "rank" defined?**
It's the order in which brands first appear in the answer text. `brandRank` counts all brands found (including ones you didn't list); `brandRankTrackedOnly` counts only your brand and listed competitors. It is not a score assigned by the AI.

**What is share of voice?**
For each tracked brand, the number of answers mentioning it divided by the total brand mentions across all tracked brands.

**How do I limit what a run costs?**
Set **Maximum cost per run** in the run options. The Actor never starts an answer whose charge would exceed it, and it reserves room for the summary report. Answers that were not started are counted in `answersNotRunChargeLimit`.

**How long does a run take?**
In our test runs, a 48-answer batch (12 questions × 4 engines × 1 sample) took 78 seconds, and 12-answer runs took 28–48 seconds. Your run time depends on the engines and the number of answers.

**Do I need my own API keys?**
No. Engine access is included in the per-answer price.

**Can I track non-English brands and questions?**
Yes, with one step from you. Questions can be in any language, and brand matching works for any script (Chinese, Japanese and Korean names are matched as substrings). However, **brands written in Chinese (or other non-Latin scripts) are not detected automatically as untracked brands**. In our Chinese-language CRM test, local Chinese CRM brands appeared in most answers but were not picked up automatically. **Add them to `competitors`** (e.g. `"纷享销客"`, `"销售易"`) to track them.

**My brand or a competitor is written in different ways. What should I do?**
Add the variants under `aliases`, with the key exactly equal to the name you entered in `brand` or `competitors`. For example, AI answers sometimes wrote "Monday Sales CRM" for "monday CRM"; without an alias that variant is counted as a separate, untracked brand. Typical variants: spacing ("1 Password"), a product suffix ("Mullvad VPN"), or a company-plus-product name.

**Does it measure sentiment?**
Not as a score. `brandContext` gives you the exact passage around your first mention so you can review how you're described.

**Can I schedule it?**
Yes. Use Apify Schedules with the same input to track changes over time. Compare runs knowing that some run-to-run variation is normal.

### Limitations

- **AI answers vary from run to run.** Even with several samples, rates move between runs. Small samples give coarse rates (with 3 samples, a single question × engine cell can only be 0%, 33%, 67% or 100%).
- **API ≠ consumer app.** Results are measured via official APIs with native web search and are not equivalent to what users see in chatgpt.com, claude.ai, gemini.google.com or perplexity.ai.
- **No accuracy guarantee and no guarantee of rankings or outcomes.** This Actor measures visibility; it does not improve it and makes no promise about future AI answers.
- **Untracked-brand detection is heuristic** (bold text, headings, list items, table cells; common words, adjectives, language names and generic category terms such as "CRM" or "SEO" are filtered out). It can miss brands written in plain prose and can occasionally flag a non-brand phrase such as an industry term or a feature name. Add important competitors to `competitors` for exact tracking.
- **Chinese-language (non-Latin) brand names are not auto-detected.** List them in `competitors`; once listed they are matched.
- **Inconsistent brand names need aliases.** A variant you haven't listed (e.g. "Monday Sales CRM" vs "monday CRM") is treated as a different brand.
- **Rank is order of appearance**, not an explicit recommendation score.
- **Gemini citations** rely on resolving Google redirect links. If that fails, the domain may fall back to the link title.
- No country/location targeting and no Google AI Overviews / AI Mode.
- **Not affiliated with, endorsed by, or sponsored by OpenAI, Anthropic, Google or Perplexity.** ChatGPT, Claude, Gemini and Perplexity are trademarks of their respective owners.

***

### More from this developer

- **[Bilibili Transcript: Video to Text, SRT Subtitles & AI Summary](https://apify.com/lone_fascia/bilibili-video-transcriber)**: turn Bilibili (B站) videos into timestamped transcripts, SRT/VTT subtitles and an AI English summary, even when the video has no subtitles.

# Actor input Schema

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

Your brand name as people write it. Matched case-insensitively as a whole word (e.g. "Kit" does not match "ConvertKit"). Add other spellings under Aliases.

## `questions` (type: `array`):

Questions a buyer would ask an AI assistant, one per line (max 50). Don't include your own brand name in the question. Each question is asked to every selected engine samplesPerEngine times: number of answers = questions × engines × samples.

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

Competitor brands to track exactly (max 25). Brands you don't list are still detected heuristically as untracked brands.

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

Which AI engines to ask. Each is called through its official API with the provider's own web search turned on. Price differs per engine (see Pricing).

## `samplesPerEngine` (type: `integer`):

How many times each question is asked to each engine. AI answers vary between runs, so several samples give a mention rate instead of a single lucky or unlucky answer. With 3 samples a single question × engine rate is 0%, 33%, 67% or 100%.

## `aliases` (type: `object`):

Alternate spellings per brand. Keys must equal your brand or a competitor exactly as entered above, e.g. {"1Password": \["1 Password"], "Proton Pass": \["ProtonPass"]}.

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

Your website domains, to count answers that cite your own site (subdomains are included).

## `completeAnswerHint` (type: `string`):

Adds the same neutral line "Then give a complete answer that lists the main options." to the question. 'all' (default) keeps the four engines comparable; without it, some engines occasionally reply with one or two sentences. The exact prompt sent is saved on every row.

## Actor input object example

```json
{
  "brand": "Notion",
  "questions": [
    "What is the best note-taking app for teams?",
    "Best tool for a company wiki?"
  ],
  "competitors": [
    "Confluence",
    "Coda"
  ],
  "engines": [
    "chatgpt",
    "claude",
    "gemini",
    "perplexity"
  ],
  "samplesPerEngine": 1,
  "aliases": {},
  "brandDomains": [],
  "completeAnswerHint": "all"
}
```

# Actor output Schema

## `answers` (type: `string`):

One row per answer: brand mentioned, rank, #1 brand, cited domains.

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

Per-engine comparison ('which AI recommends you most'), mention rates, share of voice, cross-engine agreement, untracked brands, top cited domains. The same report is also the last dataset row (type=summary).

# 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",
    "questions": [
        "What is the best note-taking app for teams?",
        "Best tool for a company wiki?"
    ],
    "competitors": [
        "Confluence",
        "Coda"
    ],
    "samplesPerEngine": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("lone_fascia/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": "Notion",
    "questions": [
        "What is the best note-taking app for teams?",
        "Best tool for a company wiki?",
    ],
    "competitors": [
        "Confluence",
        "Coda",
    ],
    "samplesPerEngine": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("lone_fascia/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": "Notion",
  "questions": [
    "What is the best note-taking app for teams?",
    "Best tool for a company wiki?"
  ],
  "competitors": [
    "Confluence",
    "Coda"
  ],
  "samplesPerEngine": 1
}' |
apify call lone_fascia/ai-search-visibility --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lone_fascia/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/hcxdoPBu8LhBfFzZo/builds/2QOqRp2rhwLazNt3f/openapi.json
