# AI Citation Monitor — Which Sources AI Engines Cite (`muhammadafzal/ai-citation-monitor`) Actor

Track which sources and domains ChatGPT, Perplexity, Claude, and Gemini cite for your prompts — whether your domain is cited, who dominates the citation share, and how it changes over time. The GEO companion to rank tracking.

- **URL**: https://apify.com/muhammadafzal/ai-citation-monitor.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** AI, SEO tools, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $40.00 / 1,000 prompt engine checks

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## AI Citation Monitor — Which Sources AI Engines Cite

See **which sources and domains ChatGPT, Perplexity, Claude, and Gemini cite** when they answer your prompts — and whether **your domain** is one of them. This is the citation half of Generative Engine Optimization (GEO): the Rank Tracker tells you *if you're mentioned*; the Citation Monitor tells you *what content AI trusts and links to*, so you know what to create to get cited.

Export results, run via API, schedule and monitor runs, or integrate with other tools.

---

### What it does

For every **prompt × engine**, the actor records:

- **brand_cited** — was your domain cited as a source?
- **citation_domains / citation_urls** — every source the answer relied on
- **competitor_domains_cited** — which rivals got cited alongside (or instead of) you
- **new_domains / lost_domains** — what changed since the last run
- **citation_status** — `new`, `gained`, `lost`, `unchanged`, or `absent` for your domain

Plus a run **SUMMARY** in the key-value store:
- **citation leaderboard** — the domains AI cites most for your topics, with share %
- **brand citation rate** — how often your domain is cited
- **citation gap domains** — high-authority sources cited ahead of you (your opportunity list)

---

### Input

| Field | Type | Description |
|---|---|---|
| `brandDomain` | string | The domain you want cited (e.g., `notion.so`). |
| `competitorDomains` | string[] | Competitor domains to track in citations. |
| `prompts` | string[] | Questions to monitor (auto-generated from `industry` if empty). |
| `industry` | string | Fallback for prompt generation. |
| `trackingId` | string | Stable ID for run-over-run citation history. |
| `maxPrompts` | integer | Cap on prompts per run (cost control). |

Engines, models, and web search are managed internally (all four engines, web search on) for predictable cost.

#### Example input

```json
{
  "brandDomain": "notion.so",
  "competitorDomains": ["evernote.com", "obsidian.md"],
  "prompts": [
    "What is the best note-taking app for teams?",
    "Recommend an all-in-one workspace tool."
  ]
}
````

***

### API key (required)

All engines run through **[OpenRouter](https://openrouter.ai)** — set a single environment variable on the actor (Console → Settings → Environment variables, mark **Secret**):

```
OPENROUTER_API_KEY = sk-or-...
```

If the key is missing, checks are reported with an `error` and **not charged**.

***

### Output

Each row:

```json
{
  "brand_domain": "notion.so",
  "engine": "perplexity",
  "model_used": "perplexity/sonar",
  "prompt": "What is the best note-taking app for teams?",
  "brand_cited": true,
  "brand_cited_urls": ["https://notion.so/product"],
  "citation_urls": ["https://notion.so/product", "https://zapier.com/blog/..."],
  "citation_domains": ["notion.so", "zapier.com", "g2.com"],
  "competitor_domains_cited": ["evernote.com"],
  "total_citations": 8,
  "new_domains": ["g2.com"],
  "lost_domains": ["reddit.com"],
  "previous_brand_cited": false,
  "citation_status": "gained",
  "error": null,
  "checked_at": "2026-06-08T12:00:00.000Z"
}
```

***

### Pricing (Pay Per Event)

| Event | When |
|---|---|
| `actor-start` | Once per run. |
| `prompt-engine-check` | Each successful prompt × engine check. |

Failed checks are **not charged**.

***

### Scheduling for trend tracking

1. Run once to seed a baseline.
2. Schedule daily/weekly with the same `trackingId`.
3. Each run diffs cited domains vs the last snapshot (`new_domains` / `lost_domains`) and updates your domain's `citation_status`.

History is stored in a named key-value store (`ai-citation-history-<trackingId>`), so multiple sites track independently.

***

### Use cases

- **GEO content strategy** — find the exact sources AI cites for your topics, then earn placement on them.
- **Citation gap analysis** — see which authoritative domains outrank you and prioritize outreach.
- **Competitive monitoring** — track when competitors gain or lose AI citations.
- **Pairs with the AI Visibility Rank Tracker** for a full GEO picture: mentions + citations.

# Actor input Schema

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

The domain you want to see cited by AI engines (e.g., 'notion.so'). Each answer's cited sources are checked for this domain.

## `competitorDomains` (type: `array`):

Competitor domains to also track in the citations (e.g., 'evernote.com', 'obsidian.md'). Lets you compare citation presence against rivals.

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

The questions your buyers ask AI engines (e.g., 'What is the best note-taking app?'). The actor records which sources each engine cites for them. If empty, prompts are auto-generated from 'industry'.

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

Your category (e.g., 'productivity software'). Used ONLY to auto-generate prompts when you don't supply your own. Ignored if 'prompts' is provided.

## `trackingId` (type: `string`):

Optional stable identifier used to store and compare citation history across scheduled runs. Defaults to a slug of your domain. Use distinct IDs to track multiple sites separately.

## `maxPrompts` (type: `integer`):

Safety cap on how many prompts are checked per run (cost control). Extra prompts beyond this limit are ignored.

## `platforms` (type: `array`):

Internal: which engines to query. Managed by the actor (all four) for predictable cost.

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

Internal: per-engine OpenRouter model slug overrides. Managed by the actor; not user-editable.

## `useWebSearch` (type: `boolean`):

Internal: live web search for citation grounding. Managed by the actor (on).

## `webSearchResults` (type: `integer`):

Internal: web results per query. Managed by the actor.

## Actor input object example

```json
{
  "brandDomain": "notion.so",
  "competitorDomains": [
    "evernote.com",
    "obsidian.md"
  ],
  "prompts": [
    "What is the best note-taking and productivity app?",
    "Recommend the top productivity software for teams."
  ],
  "industry": "productivity software",
  "trackingId": "",
  "maxPrompts": 25,
  "platforms": [
    "perplexity",
    "chatgpt",
    "claude",
    "gemini"
  ],
  "models": {},
  "useWebSearch": true,
  "webSearchResults": 3
}
```

# Actor output Schema

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

Link to the dataset containing all prompt x engine citation records.

# 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 = {
    "brandDomain": "notion.so",
    "competitorDomains": [
        "evernote.com",
        "obsidian.md"
    ],
    "prompts": [
        "What is the best note-taking and productivity app?",
        "Recommend the top productivity software for teams."
    ],
    "industry": "productivity software"
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/ai-citation-monitor").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 = {
    "brandDomain": "notion.so",
    "competitorDomains": [
        "evernote.com",
        "obsidian.md",
    ],
    "prompts": [
        "What is the best note-taking and productivity app?",
        "Recommend the top productivity software for teams.",
    ],
    "industry": "productivity software",
}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/ai-citation-monitor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "brandDomain": "notion.so",
  "competitorDomains": [
    "evernote.com",
    "obsidian.md"
  ],
  "prompts": [
    "What is the best note-taking and productivity app?",
    "Recommend the top productivity software for teams."
  ],
  "industry": "productivity software"
}' |
apify call muhammadafzal/ai-citation-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=muhammadafzal/ai-citation-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "AI Citation Monitor — Which Sources AI Engines Cite",
        "description": "Track which sources and domains ChatGPT, Perplexity, Claude, and Gemini cite for your prompts — whether your domain is cited, who dominates the citation share, and how it changes over time. The GEO companion to rank tracking.",
        "version": "1.0",
        "x-build-id": "FGq5ufsQMc392whby"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/muhammadafzal~ai-citation-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-muhammadafzal-ai-citation-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/muhammadafzal~ai-citation-monitor/runs": {
            "post": {
                "operationId": "runs-sync-muhammadafzal-ai-citation-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/muhammadafzal~ai-citation-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-muhammadafzal-ai-citation-monitor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "brandDomain": {
                        "title": "Your Domain",
                        "type": "string",
                        "description": "The domain you want to see cited by AI engines (e.g., 'notion.so'). Each answer's cited sources are checked for this domain.",
                        "default": "notion.so"
                    },
                    "competitorDomains": {
                        "title": "Competitor Domains",
                        "type": "array",
                        "description": "Competitor domains to also track in the citations (e.g., 'evernote.com', 'obsidian.md'). Lets you compare citation presence against rivals.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "prompts": {
                        "title": "Tracked Prompts",
                        "type": "array",
                        "description": "The questions your buyers ask AI engines (e.g., 'What is the best note-taking app?'). The actor records which sources each engine cites for them. If empty, prompts are auto-generated from 'industry'.",
                        "default": [],
                        "items": {
                            "type": "string"
                        }
                    },
                    "industry": {
                        "title": "Industry / Category",
                        "type": "string",
                        "description": "Your category (e.g., 'productivity software'). Used ONLY to auto-generate prompts when you don't supply your own. Ignored if 'prompts' is provided.",
                        "default": "productivity software"
                    },
                    "trackingId": {
                        "title": "Tracking ID",
                        "type": "string",
                        "description": "Optional stable identifier used to store and compare citation history across scheduled runs. Defaults to a slug of your domain. Use distinct IDs to track multiple sites separately.",
                        "default": ""
                    },
                    "maxPrompts": {
                        "title": "Max Prompts",
                        "minimum": 1,
                        "maximum": 200,
                        "type": "integer",
                        "description": "Safety cap on how many prompts are checked per run (cost control). Extra prompts beyond this limit are ignored.",
                        "default": 25
                    },
                    "platforms": {
                        "title": "AI Platforms",
                        "type": "array",
                        "description": "Internal: which engines to query. Managed by the actor (all four) for predictable cost.",
                        "items": {
                            "type": "string"
                        },
                        "default": [
                            "perplexity",
                            "chatgpt",
                            "claude",
                            "gemini"
                        ]
                    },
                    "models": {
                        "title": "Model Overrides",
                        "type": "object",
                        "description": "Internal: per-engine OpenRouter model slug overrides. Managed by the actor; not user-editable.",
                        "default": {}
                    },
                    "useWebSearch": {
                        "title": "Use Web Search",
                        "type": "boolean",
                        "description": "Internal: live web search for citation grounding. Managed by the actor (on).",
                        "default": true
                    },
                    "webSearchResults": {
                        "title": "Web Search Results",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Internal: web results per query. Managed by the actor.",
                        "default": 3
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
