# AEO Tracker — AI Answer Visibility Monitor (`muhammadafzal/aeo-tracker`) Actor

Track AI search visibility and AEO/GEO performance across ChatGPT, Gemini, Claude, and Perplexity.

- **URL**: https://apify.com/muhammadafzal/aeo-tracker.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $30.00 / 1,000 aeo answer checks

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## AEO Tracker: AI Search Visibility Monitor for ChatGPT, Gemini, Claude & Perplexity

Measure how often a brand appears, is recommended, and receives official citations in current AI search answers. This Apify Actor is built for answer engine optimization (AEO), generative engine optimization (GEO), AI SEO, brand monitoring, competitor research, and citation tracking.

The Actor sends the same neutral buyer-intent questions across four fixed, cost-conscious OpenRouter models representing ChatGPT, Gemini, Claude, and Perplexity. It returns comparable visibility results by answer engine without exposing model selection to end users.

### What the AEO Tracker measures

- Brand mention rate across AI-generated answers
- Official website citation rate
- Mention count and sentence-level mention context
- Explicit recommendation position in ranked answers
- Positive, negative, neutral, or mixed brand sentiment
- Competitor mentions and competitive visibility signals
- Raw grounded answer text and web citations
- Per-engine visibility breakdown for ChatGPT, Gemini, Claude, and Perplexity

The run summary is stored in both `OUTPUT` and `SUMMARY`. It includes successful and failed checks, total visibility score, model list, and an `engineBreakdown` with mention rate, citation rate, and visibility score for every configured engine.

### How it works technically

1. Provide a brand, optional official domain, industry, custom AEO queries, and competitor names.
2. The Actor uses supplied queries or generates neutral category questions from `industry`.
3. Each question is sent to the owner-controlled model matrix through the OpenRouter Chat Completions API.
4. OpenRouter's `openrouter:web_search` server tool grounds answers in current web results and returns standardized citation annotations.
5. The Actor extracts brand, domain, competitor, sentiment, recommendation-position, and citation signals.
6. One dataset row is written for each successful or failed query/model check, followed by the run summary.

This measures model-level AI answer visibility, not every user's personalized or logged-in ChatGPT, Gemini, Claude, or Perplexity interface. Keep the query set, model matrix, location, and timing stable when comparing runs over time.

### Fixed model matrix

The model list is intentionally not a public input. The Actor owner controls it in `src/main.ts` so pricing and result quality remain predictable:

| Engine | OpenRouter model | Role |
|---|---|---|
| ChatGPT | `openai/gpt-4o-mini` | Low-cost OpenAI baseline |
| Gemini | `google/gemini-3.1-flash-lite` | High-volume Google model with cost-controlled Exa grounding |
| Claude | `anthropic/claude-haiku-4.5` | Current efficient Anthropic model with web-search support |
| Perplexity | `perplexity/sonar` | Search-first model with citations |

OpenRouter model availability and pricing can change. See the [OpenRouter model catalog](https://openrouter.ai/models), [web-search documentation](https://openrouter.ai/docs/guides/features/server-tools/web-search), and the individual [GPT-4o mini](https://openrouter.ai/openai/gpt-4o-mini), [Gemini 3.1 Flash Lite](https://openrouter.ai/google/gemini-3.1-flash-lite), [Claude Haiku 4.5](https://openrouter.ai/anthropic/claude-haiku-4.5), and [Perplexity Sonar](https://openrouter.ai/perplexity/sonar) pages for current provider pricing.

### Configuration

Set `OPENROUTER_API_KEY` as an Apify Actor environment secret. It is never accepted as public input and is never written to the dataset.

Use `queries` for a fixed monitoring set. If omitted, three neutral questions are generated from `industry`. The default `maxChecks` is 12, which runs three generated queries across all four engines. Increase or decrease the cap deliberately: every completed query/model check is one billable AEO event.

Use `searchContextSize` to control the web-search context budget:

- `low`: lowest provider usage and suitable for routine monitoring
- `medium`: more grounding context for general research
- `high`: broadest context for complex categories, with higher provider usage

### Apify pricing

The configured pay-per-event price is `$0.01` per successful AEO answer check. A 12-check run can therefore generate up to `$0.12` in Apify event charges, plus the platform's synthetic Actor-start charge. Failed OpenRouter checks are written with an error and are not charged as successful checks. OpenRouter model-token and web-search usage is billed separately to the configured OpenRouter account.

### Example input

```json
{
  "brandName": "Notion",
  "brandDomain": "notion.so",
  "industry": "productivity software",
  "queries": [
    "What are the best productivity software tools for a small remote team?",
    "Which productivity apps are easiest for teams to adopt?",
    "What should a startup look for when choosing productivity software?"
  ],
  "competitors": ["Asana", "Coda"],
  "maxChecks": 12,
  "searchContextSize": "low"
}
```

### Dataset output

Each dataset record includes `engine`, `modelRequested`, `modelUsed`, `query`, `mentioned`, `cited`, `recommendationPosition`, `sentiment`, `competitorMentions`, `citations`, `answerText`, token usage, and any error diagnostic.

The summary's `engineBreakdown` makes cross-engine comparison straightforward:

```json
{
  "engine": "Gemini",
  "model": "google/gemini-3.1-flash-lite",
  "mentionRate": 0.5,
  "citationRate": 0.25,
  "visibilityScore": 43
}
```

The overall score is a directional snapshot: 70% mention coverage plus 30% official-domain citation coverage among successful checks. It is not a universal share-of-voice metric. Inspect `error` before interpreting a missing mention or a partial engine result.

### Local development

```bash
npm install
npm test
npm start
```

For a local run, set `OPENROUTER_API_KEY` and provide Apify input through the normal Actor storage environment. No cloud deployment or paid run is performed by the local build.

### Scope and responsible use

This Actor is for legitimate brand, content, competitor, and answer-engine visibility research. It does not guarantee rankings, reproduce every personalized AI answer, or replace primary-source verification.

# Actor input Schema

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

The brand, company, or product to monitor.

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

Optional official domain used to detect first-party citations, for example notion.so.

## `industry` (type: `string`):

Used to generate neutral comparison prompts when custom queries are not supplied.

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

Optional neutral questions to ask. If omitted, three category prompts are generated from industry. Do not include the brand name if you want an unbiased discovery test.

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

Optional competitor names to detect in each answer and compare against the tracked brand.

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

Hard cap on AEO checks. Each query is sent to the owner's predefined ChatGPT, Gemini, Claude, and Perplexity models until this cap is reached.

## `searchContextSize` (type: `string`):

OpenRouter web-search context budget. Higher settings can improve grounding but increase provider usage.

## Actor input object example

```json
{
  "brandName": "Notion",
  "brandDomain": "notion.so",
  "industry": "productivity software",
  "queries": [
    "What are the best productivity software tools for a small remote team?",
    "Which productivity apps are easiest for teams to adopt?"
  ],
  "competitors": [
    "Asana",
    "Coda"
  ],
  "maxChecks": 12,
  "searchContextSize": "low"
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing one record per query/model check.

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

Summary record with success counts and the directional visibility score.

# 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": "Notion",
    "brandDomain": "notion.so",
    "industry": "productivity software"
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/aeo-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 = {
    "brandName": "Notion",
    "brandDomain": "notion.so",
    "industry": "productivity software",
}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/aeo-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 '{
  "brandName": "Notion",
  "brandDomain": "notion.so",
  "industry": "productivity software"
}' |
apify call muhammadafzal/aeo-tracker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/aeo-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/6SMisKxgwLC8gO7Vf/builds/NaSHs3NOXMFpoSJi2/openapi.json
