# AI Search Visibility & GEO Rank Tracker: ChatGPT, Gemini (`rs-automation-labs/ai-search-visibility-checker`) Actor

AI search visibility tracker for GEO/AEO: see if ChatGPT, Perplexity, Gemini, Claude, Grok and Google AI Overviews mention, rank and cite your brand vs competitors. Share of voice, sentiment, cited sources, gap prompts, HTML report, trend alerts. $0.015/check + AI at cost.

- **URL**: https://apify.com/rs-automation-labs/ai-search-visibility-checker.md
- **Developed by:** [RS Automation Labs](https://apify.com/rs-automation-labs) (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

$15.00 / 1,000 ai answer checkeds

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 & GEO Rank Tracker: ChatGPT, Perplexity, Gemini, Claude, Grok & Google AI Overviews

Track your brand's **AI search visibility**. Find out whether **ChatGPT, Perplexity, Gemini, Claude, Grok and Google AI Overviews** mention, rank and cite your brand when people ask buying questions, and how you compare with competitors. Get **share of voice**, position in the answer, sentiment, the **sources each AI cites**, "gap" prompts where only competitors appear, and a prioritized fix list. It's a **GEO / AEO rank tracker** and **LLM visibility monitor** in one Actor.

**No API keys needed.** Answers come from the engines' official web-search APIs through Apify's official OpenRouter proxy, and Google AI Overviews come from Apify's official Google AI Overviews Scraper. You can also bring your own OpenRouter, OpenAI, Perplexity or Gemini key. **You pay $0.015 per successful check. Failed checks are free.**

### What does this AI search visibility tracker do?

For every **prompt × AI engine** it asks the engine a real question with live web search turned on, then analyzes the answer:

- **Brand mentioned?** It counts mentions, including aliases and the bare domain.
- **Position:** your rank among the tracked brands in the order they appear, plus your position in the answer's list ("#3 of 8").
- **Sentiment and recommended-or-not:** positive, neutral, negative or mixed, plus a one-line *perception* ("A popular free option for an easy-to-read performance overview").
- **Citations:** every URL the AI cited, whether **your domain was cited** and at what rank, and which competitor domains were cited.
- **Competitors:** who was mentioned, in what position, with what sentiment, and whether they were recommended.
- **Share of voice** in each answer, and a **0–100 visibility score**.
- **Brands you're not tracking** that the AI recommends.

Then it writes a **run summary** (JSON plus an HTML report) to the key-value store. The summary has share of voice per engine, mention, top-1 and citation rates, "gap" prompts where only competitors appear, the most-cited source domains, trend versus the previous run, and **actionable recommendations**.

### Use cases

- **SEO / GEO / AEO agencies** that report "AI visibility" to clients every month.
- **Marketing and growth teams** who want to know whether ChatGPT recommends them or a competitor.
- **Founders** checking how AI describes their product before a launch.
- **PR and content teams** looking for the sources AI trusts, so they know where to get mentioned.

### Supported AI engines

| Engine | How it's queried | Country targeting |
|---|---|---|
| ChatGPT (`chatgpt`) | OpenAI model with OpenAI web search | User location passed to search |
| Perplexity (`perplexity`) | Perplexity Sonar | User location passed to search |
| Gemini (`gemini`) | Gemini with Google Search grounding | Country hint in the prompt |
| Claude (`claude`) | Claude model with web search | Country hint in the prompt |
| Grok (`grok`) | Grok model with web search | Country hint in the prompt |
| Google AI Overviews (`google_ai_overview`) | Apify's official Google AI Overviews Scraper | — |

LLM engines are called through official APIs (via OpenRouter by default), not by logging in to or scraping chat websites.

### Why this Actor?

- **Zero setup.** No OpenAI, Perplexity or Gemini accounts are needed. LLM usage is billed **at cost** to your Apify account through Apify's official OpenRouter integration. You can bring your own key to pay the provider directly.
- **Official APIs only.** It never logs in to or scrapes chat UIs. Engines use their own web-search tools (OpenAI web search, Perplexity Sonar, Gemini Google Search grounding, Claude and Grok native search).
- **Six engines in one run**, including Google AI Overviews.
- **A cheap analysis fee.** Most AI visibility Actors bundle the LLM cost and charge $0.05–$0.30 per check. Here you pay a small per-check fee plus the real LLM cost.
- **Deterministic and auditable.** Mentions, positions and citations are computed with rules from the answer you can see. An optional, very cheap LLM pass refines sentiment and recommendations and finds untracked brands.
- **Built for monitoring.** Schedule it to get trend deltas between runs and Slack/Discord/Zapier webhooks.

### How to use it

1. Enter **your brand** and **domain**, for example `GTmetrix` and `gtmetrix.com`.
2. Add **competitors**, one per line, as `Name | domain` (aliases go after a comma: `Google PageSpeed Insights, PageSpeed | pagespeed.web.dev`).
3. Add the **prompts** your buyers ask, *or* give **keywords** (e.g. `website speed test`) and let the Actor generate unbranded buyer prompts ("What is the best website speed test tool?", "Top 10 … in United States", "Alternatives to Pingdom", and so on).
4. Pick **engines**, **country** and optionally **language**, then click **Start**.
5. Open the **Overview** dataset view, or the **HTML report** in the Output tab.

Tip: AI answers vary between runs. For more reliable numbers, set **Samples per prompt** to 2–3 for your most important prompts.

### Input example

```json
{
  "brandName": "GTmetrix",
  "brandDomain": "gtmetrix.com",
  "competitors": [
    "Google PageSpeed Insights, PageSpeed | pagespeed.web.dev",
    "Pingdom | pingdom.com",
    "WebPageTest | webpagetest.org"
  ],
  "queries": ["What are the best free tools to test website speed?"],
  "keywords": ["website speed test"],
  "engines": ["chatgpt", "perplexity", "gemini", "google_ai_overview"],
  "country": "US",
  "maxChecks": 100
}
```

Engines: `chatgpt`, `perplexity`, `gemini`, `claude`, `grok`, `google_ai_overview`.

### Output example

One dataset row per prompt × engine × sample. This is a real row from a cloud run (2026-10-22, Perplexity, citations shortened):

```json
{
  "query": "What are the best free tools to test website speed?",
  "engine": "perplexity",
  "engineLabel": "Perplexity (Sonar)",
  "route": "apify-openrouter-proxy",
  "status": "ok",
  "model": "perplexity/sonar",
  "brand": "GTmetrix",
  "country": "US",
  "brandMentioned": true,
  "brandMentionCount": 3,
  "brandPosition": 3,
  "brandListPosition": 3,
  "listLength": 8,
  "brandSentiment": "positive",
  "brandRecommended": true,
  "brandPerception": "A popular free option for an easy-to-read performance overview.",
  "brandDomainCited": false,
  "brandCitationRank": null,
  "shareOfVoice": 0.231,
  "visibilityScore": 70,
  "competitorsMentioned": ["Google PageSpeed Insights", "WebPageTest", "Pingdom"],
  "topBrandInAnswer": "Google PageSpeed Insights",
  "brandsRanked": ["Google PageSpeed Insights", "WebPageTest", "GTmetrix", "Pingdom"],
  "mentionCounts": {"GTmetrix": 3, "Google PageSpeed Insights": 4, "Pingdom": 2, "WebPageTest": 4},
  "citations": [
    {"url": "https://www.uptrends.com/tools/website-speed-test", "title": "Website Speed Test - Monitor & Resolve", "domain": "uptrends.com", "isBrand": false, "competitor": null},
    {"url": "https://www.guru99.com/website-speed-test-tools.html", "title": "11 Best FREE Website Performance Test Tools (2026) - Guru99", "domain": "guru99.com", "isBrand": false, "competitor": null}
  ],
  "citationCount": 20,
  "citedDomains": ["uptrends.com", "seo.com", "guru99.com", "contentsquare.com", "calibreapp.com", "w3era.com"],
  "otherBrandsMentioned": ["Lighthouse", "Uptrends", "Calibre"],
  "analysisMethod": "rules+llm",
  "upstreamCostUsd": 0.00541,
  "checkedAt": "2026-10-22T10:31:55Z"
}
```

Same run, all engines, for the same prompt:

| Engine | Mentioned | Position | Sentiment | Citations | Own domain cited | Visibility |
|---|---|---|---|---|---|---|
| ChatGPT | yes | 2 | neutral | 8 | no | 70 |
| Perplexity | yes | 3 | positive | 20 | no | 70 |
| Google AI Overview | yes | 2 | positive | 10 | **yes** | 92 |

#### Main fields

| Field | Meaning |
|---|---|
| `brandMentioned`, `brandMentionCount` | Whether and how often your brand (name, aliases or domain) appears |
| `brandPosition` | Your rank among the tracked brands, in order of first mention (1 = mentioned first) |
| `brandListPosition`, `listLength` | Your position in the answer's list or ranking, if it has one |
| `brandSentiment`, `brandRecommended`, `brandPerception`, `brandContext` | How the answer talks about you |
| `brandDomainCited`, `brandCitationRank`, `brandInCitedTitles` | Whether your website is among the AI's sources |
| `competitors[]`, `competitorsMentioned`, `competitorsCited` | The same metrics for each competitor |
| `shareOfVoice` | Your mentions divided by all tracked-brand mentions in this answer |
| `visibilityScore` | 0–100: mentioned (40) + position (up to 30) + own domain cited (15) + sentiment (up to 15) |
| `citations[]`, `citedDomains` | Every source URL with title and domain |
| `otherBrandsMentioned` | Brands the AI mentioned that you don't track |
| `status` | `ok`, `no_answer` (e.g. Google showed no AI Overview; free) or `error` (free) |
| `upstreamCostUsd` | Real LLM cost of this check as reported by OpenRouter, before any plan multiplier |

#### Dataset views

- **Overview:** one line per check with mention, position, sentiment, citation and score.
- **Details:** perception, context, ranking and competitor detail.
- **Citations:** sources and domain citations.
- **Issues:** failed checks with their error codes.

#### Key-value store

- `REPORT`: HTML report with KPI cards, share-of-voice bars, per-engine table, gaps, most-cited sources and recommendations.
- `OUTPUT`: the same summary as JSON (`totals`, `metrics`, `byEngine`, `shareOfVoice`, `shareOfVoiceByEngine`, `byQuery`, `gaps`, `topCitedDomains`, `otherBrandsDiscovered`, `trend`, `recommendations`).

Example recommendations from a real run (prompt "How can I check my website's Core Web Vitals for free?"):

- **High: Close competitor-only answers.** *"4 answers mention a competitor but not GTmetrix… Sources cited in those answers: samuelschmitt.com, wp-rocket.me, inmotionhosting.com, gscwizard.com, gtechme.com, loadfocus.com - pitch reviews, comparisons, listicle inclusion or community answers there."*
- **Low: Brands AI recommends that you are not tracking.** *"Consider adding these as competitors: CrUX, Search Console, LoadFocus, SpeedVitals, RUMvision."*

#### Error codes

| Code | Meaning |
|---|---|
| `PROXY_NOT_AVAILABLE` | Apify's OpenRouter proxy refused the request; add your own OpenRouter key |
| `AUTH_ERROR` | An API key was rejected |
| `INSUFFICIENT_CREDITS` | The provider or OpenRouter account has no credit |
| `RATE_LIMITED`, `UPSTREAM_ERROR` | Temporary; already retried with backoff |
| `BAD_REQUEST` | The model refused the request, e.g. a model override without web search |
| `TIMEOUT`, `NETWORK_ERROR` | The engine didn't answer in time |
| `NO_CREDENTIALS` | No key and no Apify token available (should not happen on Apify) |
| `EMPTY_ANSWER`, `NO_AI_OVERVIEW` | The engine returned nothing, or Google showed no AI Overview (`no_answer` rows) |
| `SKIPPED_CHARGE_LIMIT_REACHED` | Your max-charge limit for the run was reached |

Failed checks are **never charged**.

### Track AI visibility over time (LLM visibility monitoring)

Turn on **Compare with previous run**, keep the same **Monitor ID** and schedule the Actor weekly. The summary then shows trend deltas versus the previous run, and the optional webhook posts a short text summary to Slack, Discord, Zapier or any endpoint.

### How much does AI rank tracking cost?

You pay two things:

1. **This Actor's fee: $0.015 per successful check** ($15 per 1,000 prompt × engine checks; *query-check* event). Failed checks, skipped checks and "no AI Overview" results are free. There is no start fee or other paid event, and Apify platform compute is included.
2. **The real AI cost**, at cost:
   - **No key (default):** billed to your Apify account through Apify's official OpenRouter proxy. Apify bills this at the OpenRouter price on paid plans, and at **10× on the Apify FREE plan**.
   - **Your own key:** billed by OpenRouter, OpenAI, Perplexity or Google directly. Apify adds nothing on top.
   - **Google AI Overviews:** billed by Apify's Google AI Overviews Scraper per AI Overview found (about $0.003 on the FREE plan, less on paid plans).

Example: **10 prompts × 4 engines every week = 40 checks = $0.60 in Actor fees per week**, plus the AI cost per engine below.

Measured AI cost per check (real cloud runs, October 2026, before any plan multiplier):

| Engine (default model) | Typical AI cost per check |
|---|---|
| ChatGPT (`openai/gpt-4.1-mini` + web search) | $0.001 – $0.015 |
| Perplexity (`perplexity/sonar`) | ~$0.006 |
| Gemini (`google/gemini-3.1-flash-lite` + Google Search) | ~$0.015 – $0.03 (Google charges per search the model runs) |
| Claude (`anthropic/claude-haiku-4.5` + web search) | ~$0.01 + tokens (estimate, $0.01/search) |
| Grok (`x-ai/grok-4.3` + web search) | ~$0.005 + tokens (estimate, $0.005/search) |
| LLM analysis (`openai/gpt-4.1-nano`) | ~$0.0001 |

The platform compute is tiny (256 MB, I/O-bound). A 4-check run used about $0.0001 of compute.

**Tip for the Apify FREE plan:** add your own OpenRouter API key to avoid the 10× proxy multiplier. Or use Perplexity and Google AI Overviews, which are the cheapest engines.

### Using your own API keys (optional)

| Key | Used for |
|---|---|
| OpenRouter API key | All LLM engines and the analysis model, billed by OpenRouter |
| OpenAI API key | ChatGPT engine, through the OpenAI Responses API with `web_search` |
| Perplexity API key | Perplexity engine (`sonar`) |
| Gemini API key | Gemini engine, through Gemini API Google Search grounding |

A provider key takes priority for its engine, then an OpenRouter key, then Apify's proxy. All keys are secret inputs. They are encrypted by Apify and never logged or written to output.

### FAQ

**Is this the same as what users see in ChatGPT, Gemini or Perplexity?**
It's very close but not identical. The Actor uses each vendor's official API with live web search, which is the same family of models and search as the consumer apps. Consumer apps also add personalization, memory and location, so treat results as a representative, repeatable sample. Repeated samples (`runsPerQuery`) smooth out the randomness.

**Do I need API keys?**
No. Without keys, LLM usage goes through Apify's official OpenRouter proxy and is billed at cost to your Apify account. Keys are optional.

**How is this different from an AI search readiness audit?**
Readiness audits score your website (crawlability, structured data, and so on). This Actor measures the actual answers: whether AI engines mention, rank and cite you for real buyer prompts.

**Is there an AI search volume metric?**
No. The Actor measures visibility in answers, not how often people ask a prompt.

**Can I call it from an AI agent or MCP client?**
Yes. Like every Apify Actor, it can be called through Apify's MCP server or the API.

**Why don't you scrape the ChatGPT website?**
Scraping logged-in chat UIs breaks their terms of service and is fragile. Official APIs are legal, stable and cheap.

**Does country targeting work?**
It does for ChatGPT and Perplexity (user location is passed to the search). Other engines get the country in the prompt ("…in United States"). Google AI Overviews currently use the scraper's default location.

**How do I track over time?**
Turn on *Compare with previous run*, keep the same *Monitor ID*, and schedule the Actor weekly. The summary then includes deltas, and the webhook posts a short text summary.

**Can I change models?**
Yes. Use *Model overrides*, e.g. `{"gemini": "google/gemini-3.5-flash"}`. The model must support native web search on OpenRouter.

### Limitations

- AI answers are non-deterministic, so run several samples for decisions.
- Rule-based mention detection matches the names and aliases you give. Add aliases for common abbreviations.
- Sentiment without the LLM pass uses a simple lexicon.
- Google AI Overviews appear only for some queries. "No AI Overview" rows are free and reported as `no_answer`.
- On the Apify FREE plan, the OpenRouter proxy costs 10× the provider price.

### Support

Open an issue on the Issues tab with your run ID. Feature requests are welcome.

# Changelog

This Actor's version history is a separate document: https://apify.com/rs-automation-labs/ai-search-visibility-checker/changelog.md

# Actor input Schema

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

Brand, product or company to track, exactly as people write it (e.g. 'HubSpot').

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

Used to detect when AI engines cite your own site (e.g. hubspot.com). Subdomains count too.

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

Alternative names, product names or common misspellings, e.g. 'HubSpot CRM', 'Hub Spot'.

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

One per line. Add the domain after a | to also track their citations: 'Pingdom | pingdom.com'. Up to 20. Extra spellings: 'Google PageSpeed Insights, PageSpeed | pagespeed.web.dev'.

## `queries` (type: `array`):

The questions your customers ask AI assistants, sent verbatim. Tip: use unbranded buyer questions ('best CRM for startups') to measure organic visibility.

## `keywords` (type: `array`):

E.g. 'CRM software', 'website speed test tool'. With auto-generation on, each keyword becomes up to 4 unbranded buyer prompts (best ..., top ... in your country, recommendations, how to choose) plus 'alternatives to <competitor>' prompts.

## `autoGenerateQueries` (type: `boolean`):

Generated prompts never contain your brand name, so they measure organic visibility.

## `maxGeneratedQueries` (type: `integer`):

Upper limit for auto-generated prompts (your own prompts are always used first).

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

Each prompt is sent to every selected engine with live web search enabled. One successful answer = one 'query check'.

## `runsPerQuery` (type: `integer`):

AI answers vary between runs. 2-3 samples per prompt give more stable numbers (each sample is one check). Google AI Overviews are always fetched once.

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

2-letter code such as US, IN, GB, DE. Passed to engines that support user location (ChatGPT, Perplexity) and used in auto-generated prompts. Google AI Overviews are fetched from Apify's default location.

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

E.g. 'English', 'Hindi', 'German'. Leave empty to let the engine choose (usually the prompt's language).

## `maxChecks` (type: `integer`):

Hard cap on prompts x engines x samples, so a long list can't create a surprise bill. Prompts beyond the cap are listed in the summary.

## `useLlmAnalysis` (type: `boolean`):

Adds a cheap LLM pass (about $0.0003 per answer at cost) that judges sentiment, whether each brand is actually recommended and which other brands the answer suggests. Mentions, ranks and citations are always computed from the answer text itself. Off = rule-based sentiment only.

## `analysisModel` (type: `string`):

Model used for the LLM analysis.

## `includeFullAnswer` (type: `boolean`):

Turn off for smaller datasets (an excerpt is always saved).

## `openRouterApiKey` (type: `string`):

One key for every LLM engine, billed by OpenRouter directly. Without any key the Actor uses Apify's official OpenRouter proxy and the model cost is billed to your Apify account at OpenRouter prices (10x on the Apify FREE plan). Stored encrypted, never logged.

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

Uses the official OpenAI Responses API with the web_search tool.

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

Uses the official Perplexity Sonar API.

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

Free key from Google AI Studio. Uses the official Gemini API with Google Search grounding (free daily quota on the Gemini free tier).

## `modelOverrides` (type: `object`):

Pick other models per engine, e.g. {"chatgpt": "openai/gpt-5.4-mini", "claude": "anthropic/claude-sonnet-4.6"}. Use OpenRouter ids, or provider ids when you supply that provider's key.

## `concurrency` (type: `integer`):

How many AI answers to fetch at the same time.

## `maxRetries` (type: `integer`):

Retries for temporary failures (rate limits, 5xx, timeouts) with exponential backoff. Failed checks are never charged.

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

How long to wait for one AI answer before retrying.

## `maxAnswerTokens` (type: `integer`):

Upper limit for each AI answer. Real assistants answer in roughly 400-1200 tokens.

## `compareWithPrevious` (type: `boolean`):

Remember the summary in a named key-value store and report changes in visibility and mention rate since the last run. Ideal for weekly schedules.

## `historyStoreName` (type: `string`):

Named key-value store that keeps previous summaries on your account.

## `monitorId` (type: `string`):

Separate histories for different clients or projects, e.g. 'client-acme'.

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

We POST a JSON summary when the run finishes. Includes a 'text' field, so Slack / Google Chat incoming webhooks work as is (Discord uses 'content', also included). Zapier, Make and n8n work too.

## Actor input object example

```json
{
  "brandName": "GTmetrix",
  "brandDomain": "gtmetrix.com",
  "competitors": [
    "Google PageSpeed Insights, PageSpeed | pagespeed.web.dev",
    "Pingdom | pingdom.com",
    "WebPageTest | webpagetest.org"
  ],
  "queries": [
    "What are the best free tools to test website speed?",
    "How can I check my site's Core Web Vitals?"
  ],
  "autoGenerateQueries": true,
  "maxGeneratedQueries": 10,
  "engines": [
    "chatgpt",
    "perplexity",
    "gemini",
    "google_ai_overview"
  ],
  "runsPerQuery": 1,
  "maxChecks": 100,
  "useLlmAnalysis": true,
  "analysisModel": "openai/gpt-4.1-nano",
  "includeFullAnswer": true,
  "concurrency": 4,
  "maxRetries": 2,
  "requestTimeoutSecs": 120,
  "maxAnswerTokens": 1500,
  "compareWithPrevious": false,
  "historyStoreName": "ai-visibility-history",
  "monitorId": "default"
}
```

# Actor output Schema

## `overview` (type: `string`):

One row per query x engine check: mentioned, position, sentiment, citations and competitors.

## `citations` (type: `string`):

Which URLs and domains each AI answer cited.

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

Share of voice, engine comparison, gaps, cited sources and prioritized actions.

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

Visibility score, share of voice, per-engine metrics, gaps, top cited domains and recommendations.

# 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 = {
    "brandName": "GTmetrix",
    "brandDomain": "gtmetrix.com",
    "competitors": [
        "Google PageSpeed Insights, PageSpeed | pagespeed.web.dev",
        "Pingdom | pingdom.com",
        "WebPageTest | webpagetest.org"
    ],
    "queries": [
        "What are the best free tools to test website speed?",
        "How can I check my site's Core Web Vitals?"
    ],
    "engines": [
        "chatgpt",
        "perplexity",
        "gemini",
        "google_ai_overview"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rs-automation-labs/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 = {
    "brandName": "GTmetrix",
    "brandDomain": "gtmetrix.com",
    "competitors": [
        "Google PageSpeed Insights, PageSpeed | pagespeed.web.dev",
        "Pingdom | pingdom.com",
        "WebPageTest | webpagetest.org",
    ],
    "queries": [
        "What are the best free tools to test website speed?",
        "How can I check my site's Core Web Vitals?",
    ],
    "engines": [
        "chatgpt",
        "perplexity",
        "gemini",
        "google_ai_overview",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("rs-automation-labs/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 '{
  "brandName": "GTmetrix",
  "brandDomain": "gtmetrix.com",
  "competitors": [
    "Google PageSpeed Insights, PageSpeed | pagespeed.web.dev",
    "Pingdom | pingdom.com",
    "WebPageTest | webpagetest.org"
  ],
  "queries": [
    "What are the best free tools to test website speed?",
    "How can I check my site'\''s Core Web Vitals?"
  ],
  "engines": [
    "chatgpt",
    "perplexity",
    "gemini",
    "google_ai_overview"
  ]
}' |
apify call rs-automation-labs/ai-search-visibility-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rs-automation-labs/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/HqiKii3CdZODLO8C2/builds/qKpvzXgIls4XnBoBL/openapi.json
