# LLM Citation Tracker: Top Cited Sources & Placement Gaps (`apricot_blackberry/ai-citation-source-finder`) Actor

Prompts in (your own LLM keys); ranked domains and URLs that ChatGPT, Claude, Gemini and Perplexity cite, source types and gaps out. From $0.01 per answer.

- **URL**: https://apify.com/apricot_blackberry/ai-citation-source-finder.md
- **Developed by:** [Creator Fusion](https://apify.com/apricot_blackberry) (community)
- **Categories:** SEO tools, AI, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $6.00 / 1,000 answer analyzeds

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

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## LLM Citation Tracker: Top Cited Sources & Placement Gaps

This **LLM citation tracker** runs your category prompts through **ChatGPT**, **Claude**, **Gemini** and **Perplexity** with your own API keys and returns a ranked leaderboard of the domains and URLs they cite, tagged by source type, plus the pages where a competitor is cited and you are not.

Use it to see which sites (Reddit, G2, listicles, publishers) AI search leans on in your category, and where to get placed next.

### Who it's for

- **GEO and AI-visibility leads** who need to know which sites drive citations in their category.
- **PR and content strategists** who want a pitch list: filter the CSV to `sourceType = publisher` or `review`.
- **AI agents and no-code builders** who call one tool with a list of prompts and get structured sources back.

Scoring brand mentions or share of voice is a different job; this actor only looks at sources.

### Sample output

Real rows from the offline demo run (`test/smoke-input.json`: `brandDomain` `asana.com`, competitor `monday.com`, `demoMode: true`). Live rows have the same fields with `"demo": false`.

Citation row (one per prompt x engine x sample x normalized URL):

```json
{
  "rowType": "citation",
  "status": "ok",
  "prompt": "best project management software for small teams",
  "engine": "openai",
  "sample": 1,
  "demo": true,
  "model": "gpt-5-mini",
  "url": "https://zapier.com/blog/best-project-management-software",
  "rawUrl": "https://zapier.com/blog/best-project-management-software/?utm_source=openai",
  "resolved": true,
  "domain": "zapier.com",
  "title": "The best project management software",
  "sourceType": "publisher",
  "cited": true,
  "consulted": true,
  "position": 1,
  "checkedAt": "2026-11-06T15:21:04.461Z"
}
```

Answer row (one per answer):

```json
{
  "rowType": "answer",
  "status": "ok",
  "prompt": "best project management software for small teams",
  "engine": "openai",
  "sample": 1,
  "demo": true,
  "model": "gpt-5-mini",
  "citationsCount": 4,
  "consultedCount": 2,
  "warnings": [],
  "checkedAt": "2026-11-06T15:21:04.461Z"
}
```

Report row (one per run, the last dataset item, also saved to the key-value store as `REPORT`; arrays shortened here to the first entries):

```json
{
  "rowType": "report",
  "status": "ok",
  "demo": true,
  "answersAnalyzed": 8,
  "citationsTotal": 20,
  "domains": [
    {
      "domain": "g2.com",
      "sourceType": "review",
      "citedCount": 4,
      "consultedCount": 4,
      "promptsCovered": 2,
      "engines": [
        "anthropic",
        "gemini",
        "openai",
        "perplexity"
      ],
      "shareOfCitations": 0.2
    },
    {
      "domain": "zapier.com",
      "sourceType": "publisher",
      "citedCount": 4,
      "consultedCount": 4,
      "promptsCovered": 2,
      "engines": [
        "gemini",
        "openai",
        "perplexity"
      ],
      "shareOfCitations": 0.2
    }
  ],
  "urls": [
    {
      "url": "https://g2.com/categories/project-management",
      "domain": "g2.com",
      "sourceType": "review",
      "citedCount": 3,
      "consultedCount": 3,
      "promptsCovered": 1,
      "engines": [
        "anthropic",
        "gemini",
        "openai"
      ]
    }
  ],
  "bySourceType": {
    "publisher": 0.4,
    "review": 0.25,
    "competitor": 0.15,
    "ugc": 0.15,
    "brand": 0.05
  },
  "byEngine": {
    "anthropic": [
      {
        "domain": "monday.com",
        "citedCount": 2
      },
      {
        "domain": "forbes.com",
        "citedCount": 1
      }
    ]
  },
  "gaps": [
    {
      "domain": "forbes.com",
      "sourceType": "publisher",
      "url": "https://forbes.com/advisor/business/software/best-task-management-software",
      "prompts": [
        "best task management app for remote teams"
      ],
      "competitorsPresent": [
        "monday.com"
      ],
      "citedCount": 1
    }
  ],
  "enginesSkipped": [],
  "notes": [
    "DEMO DATA: synthetic sample answers replayed offline (2 prompts x 4 engines). No API calls were made and nothing was charged.",
    "Demo mode ignores your prompts and replays the bundled sample prompts.",
    "1 source(s) are Gemini redirects that were not resolved (resolveRedirects off, or lookup failed); their domain comes from the chunk title and they are left out of the URL leaderboard."
  ],
  "topDomains": "g2.com | zapier.com | monday.com | reddit.com | forbes.com | capterra.com | techradar.com | asana.com | pcmag.com | youtube.com",
  "gapsCount": 3,
  "enginesSkippedFlat": "",
  "checkedAt": "2026-11-06T15:21:04.507Z"
}
```

Skipped engines (no key) give one `rowType: "answer"` row with `"status": "skipped"` and `"reason": "NO_KEY"`. Failed answers give `"status": "error"` with `error.code`, `error.message` and the flat copies `errorCode`, `errorMessage`; they are never charged. Error codes: `INVALID_KEY`, `RATE_LIMITED`, `TIMEOUT`, `NETWORK`, `PROVIDER_ERROR`, `BAD_RESPONSE`, `EMPTY_ANSWER`, `BUDGET_EXHAUSTED`.

#### Output and definitions

- **Dataset (overview and flat views):** rows with `rowType` `citation`, `answer` or `report`. The `flat` view has only scalar columns, so the CSV opens in Google Sheets without cleanup: `rowType, status, demo, prompt, engine, model, sample, url, domain, sourceType, cited, consulted, position, resolved, citationsCount, checkedAt, reason, errorCode, errorMessage`, plus `answersAnalyzed, citationsTotal, topDomains, gapsCount, enginesSkippedFlat` on the report row. Download as JSON, CSV, Excel or HTML.
- **Key-value store `REPORT`:** the report object, linked from the run's Output tab.
- **cited**: the engine attached the source to its answer (OpenAI `url_citation`, Anthropic `web_search_result_location`, Gemini chunks referenced by `groundingSupports`, Perplexity `citations`).
- **consulted**: the engine retrieved the source while searching. Every cited source is also consulted; `cited: false` rows are the retrieved-but-not-cited ones.
- **Source types**: `brand`, `competitor` (from your input, these win), `ugc` (Reddit, YouTube, Quora, Medium, LinkedIn, Facebook, X and similar), `review` (G2, Capterra, Trustpilot, Yelp), `reference` (Wikipedia), `publisher` (Forbes, TechRadar and other media), `other` (domains not in the built-in list of about 90).
- **Domain stats**: `citedCount` counts each domain once per answer; `consultedCount` counts answers that retrieved it (cited included); `promptsCovered` is the number of distinct prompts it appeared for; `shareOfCitations` is its share of all cited sources.

### Pricing

Pay per event. You also pay your AI providers directly for each search call (roughly $0.01 to $0.014 each). The prices below are Creator Fusion's only charge.

| Event | FREE | BRONZE | SILVER and up | When it fires |
|---|---|---|---|---|
| `answer-analyzed` | $0.010 | $0.008 | $0.006 | Per successful live answer (an answer with zero citations still counts) |
| `source-report` | $0.15 | $0.12 | $0.10 | Once per run that has at least one live answer |
| `url-resolved` | $0.0005 | $0.0005 | $0.0005 | Per Gemini redirect link successfully resolved (each link once per run) |

Worked examples (Apify event charges only; provider cost is on your own keys):

- **30 prompts x 4 engines, about 150 Gemini links**: 120 answers. FREE: $1.20 + $0.15 + $0.075 = **$1.425**. SILVER: $0.72 + $0.10 + $0.075 = **$0.895**.
- **10 prompts on OpenAI and Perplexity only, 1 sample**: 20 answers. FREE: $0.20 + $0.15 = **$0.35**.
- **Demo mode**: **$0.00**.

Demo runs, skipped engines, error rows and failed redirect lookups are never charged. The actor checks your maximum run budget before every call; when it is reached it stops, writes `BUDGET_EXHAUSTED` rows and still writes the report (uncharged).

### Input

Only `prompts` is required; every other field has a default, so an agent can call with one field.

| Field | Type | Default | Description |
|---|---|---|---|
| `prompts` | string\[] (1-200) | none (prefill: one example prompt) | Questions your buyers ask AI |
| `brandDomain` | string | empty | Your site, e.g. `asana.com`. Tagged `brand`, used for gaps |
| `competitorDomains` | string\[] (max 10) | `[]` | Competitor sites. Tagged `competitor`, used for gaps |
| `engines` | `openai`, `anthropic`, `gemini`, `perplexity` | all four | Engines without a key are skipped |
| `samplesPerPrompt` | integer 1-3 | `1` | Repeat each prompt per engine. prompts x engines x samples must be 600 or fewer |
| `resolveRedirects` | boolean | `true` | Resolve Gemini `vertexaisearch.cloud.google.com` links to real URLs |
| `includeConsulted` | boolean | `true` | Also output sources the engine retrieved but did not cite |
| `models` | object | `{}` (provider defaults: `gpt-5-mini`, `claude-sonnet-4-5`, `gemini-3-flash`, `sonar`) | Model per engine, e.g. `{"openai":"gpt-5-mini"}` |
| `openaiApiKey`, `anthropicApiKey`, `geminiApiKey`, `perplexityApiKey` | string (`isSecret`) | none | Your provider keys |
| `demoMode` | boolean | `false` | Bundled sample data, no keys, no charge |

Input is validated before anything is charged: wrong prompt count, samples outside 1-3, more than 600 total answers, or an invalid domain fails the run immediately.

Example input:

```json
{
  "prompts": ["best project management software for small teams", "best task management app for remote teams"],
  "brandDomain": "asana.com",
  "competitorDomains": ["monday.com", "clickup.com"],
  "engines": ["openai", "gemini", "perplexity"],
  "samplesPerPrompt": 2,
  "resolveRedirects": true,
  "includeConsulted": true,
  "openaiApiKey": "sk-...",
  "geminiApiKey": "AIza...",
  "perplexityApiKey": "pplx-..."
}
```

Minimal example (agents and MCP):

```json
{ "prompts": ["best project management software"] }
```

#### Try it with no keys

Set `demoMode: true`. The actor replays bundled synthetic answers (2 prompts x 4 engines, including Gemini redirect links) with no network calls and no charges. Every row carries `demo: true` and the report says so in `notes`.

```json
{ "prompts": ["best project management software for small teams"], "brandDomain": "asana.com", "competitorDomains": ["monday.com"], "demoMode": true }
```

A run with no keys and no demo mode also exits cleanly: each engine is reported as `skipped` with reason `NO_KEY`, the report is valid with `domains: []`, and nothing is charged.

#### Setting up keys

Create a key with each provider you want to test and paste it into the matching secret field. Keys are Apify secret inputs: they are used only for the run, are never written to logs or the dataset, and any provider error text is scrubbed of key-shaped strings before it is stored. You can use one engine or all four.

### Use with AI agents (MCP)

Add this server to Claude, Cursor or any MCP client:

```text
https://mcp.apify.com?tools=apricot_blackberry/ai-citation-source-finder
```

Example `call-actor` input (free demo; for live answers add `openaiApiKey` and the other keys inside `input`):

```json
{
  "actor": "apricot_blackberry/ai-citation-source-finder",
  "input": {
    "prompts": [
      "best project management software"
    ],
    "brandDomain": "asana.com",
    "competitorDomains": [
      "monday.com"
    ],
    "demoMode": true
  },
  "callOptions": {
    "maxTotalChargeUsd": 1
  }
}
```

Read the last dataset item (`rowType: "report"`) or the `REPORT` record for the leaderboard and gaps. Always set `maxTotalChargeUsd` as a run option (never inside `input`); 10 prompts on 4 engines cost at most about $0.60 in events at the FREE tier, so `maxTotalChargeUsd: 1` is a safe cap for small runs.

### API

Run it synchronously and get the dataset items back (`maxTotalChargeUsd` is a query parameter, not input):

```bash
curl -X POST "https://api.apify.com/v2/acts/apricot_blackberry~ai-citation-source-finder/run-sync-get-dataset-items?maxTotalChargeUsd=1" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prompts":["best crm for small teams"],"demoMode":true}'
```

JavaScript (`apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('apricot_blackberry/ai-citation-source-finder').call(
    { prompts: ['best crm for small teams'], brandDomain: 'hubspot.com', engines: ['openai'], openaiApiKey: process.env.OPENAI_API_KEY },
    { maxTotalChargeUsd: 1 },
);
const report = await client.keyValueStore(run.defaultKeyValueStoreId).getRecord('REPORT');
console.log(report.value.domains.slice(0, 10));
```

Python (`apify-client`):

```python
import os
from decimal import Decimal
from apify_client import ApifyClient

client = ApifyClient(token=os.environ["APIFY_TOKEN"])
run = client.actor("apricot_blackberry/ai-citation-source-finder").call(
    run_input={"prompts": ["best crm for small teams"], "brandDomain": "hubspot.com", "engines": ["openai"], "openaiApiKey": os.environ["OPENAI_API_KEY"]},
    max_total_charge_usd=Decimal("1"),
)
report = client.key_value_store(run["defaultKeyValueStoreId"]).get_record("REPORT")
print(report["value"]["gaps"])
```

For CSV, read `https://api.apify.com/v2/datasets/<datasetId>/items?view=flat&format=csv`. There is no Standby endpoint: runs take 20 to 90 seconds, so use run-sync or a normal run.

### n8n, Make and Zapier

In Make, add the Apify "Run an Actor" module with this actor and your input, then "Get Dataset Items" filtered to `rowType = report`, and an Iterator over `gaps` to write one row per gap to Google Sheets. n8n and Zapier work the same way with their Apify nodes: run the actor, read the default dataset, split the report's `gaps` array.

### FAQ

**What is a gap?** A domain that an engine cited in an answer that also cited one of your competitors, for a prompt where your own domain was never cited on any engine or sample. It is a page you could try to get placed on. Your own and your competitors' domains are never listed as gaps, and without `competitorDomains` there are no gaps.

**What is the difference between cited and consulted?** Cited sources are the links shown in or under the answer. Consulted sources were retrieved during the search but not used as a citation. Both are output so you can see near-misses.

**Why resolve Gemini links?** Gemini returns temporary `vertexaisearch.cloud.google.com/grounding-api-redirect/...` links that hide the real site. The actor follows each once (5 second timeout, 10 at a time, cached per run) to recover the real URL. When a link cannot be resolved the row keeps `resolved: false` and the domain from Gemini's source title, and it is left out of the URL leaderboard.

**Does it measure brand mentions or share of voice?** No. This actor only looks at sources. For mentions, rank and share of voice, use the AI Visibility Tracker from the same publisher.

### Limits

- Provider APIs only; no scraping of chatgpt.com, AI Overviews or AI Mode.
- The default model IDs and web-search tool versions, how Perplexity's `citations` differ from its `search_results`, and whether Gemini redirects resolve from Apify IPs have not been verified against live APIs yet. Override models with `models` if a default is rejected.
- AI answers vary run to run; use `samplesPerPrompt` for a steadier picture.
- At most 200 prompts and 600 answers per run; each call times out after 90 seconds; concurrency is 8 overall and 3 per engine.
- Page content is not fetched or scored.
- Up to 10 competitor domains per run.
- It records only public source URLs and titles that the AI engines return; no personal data is collected.

### Support

Built by Creator Fusion LLC (Creator Fusion Labs). Questions and bug reports: contact@creatorfusion.net, or open an issue on the Actor's Issues tab.

If this Actor saved you time, please leave a review on its [Apify Store page](https://apify.com/apricot_blackberry/ai-citation-source-finder). Honest reviews, good or bad, are how other people decide whether to trust it, and we read every one. Found a problem? Open an issue on the Issues tab and we will fix it.

# Actor input Schema

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

Questions your buyers ask AI assistants, one per line (1 to 200). Each prompt runs on every selected engine that has an API key. The only required field. Example: best project management software for small teams

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

Your website domain without https://, used to tag your own pages as sourceType brand and to find gaps. Leave empty to skip brand tagging. Example: asana.com

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

Up to 10 competitor website domains, one per line. A gap is a domain cited next to a competitor for a prompt where your domain is never cited. Example: monday.com

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

Which AI engines to ask: openai (ChatGPT), anthropic (Claude), gemini (Google Gemini), perplexity. An engine without an API key is skipped with reason NO_KEY and is not charged. Default: all four. Example: \["openai","gemini"]

## `samplesPerPrompt` (type: `integer`):

Repeat each prompt this many times per engine, an integer from 1 to 3, because AI answers vary. Total answers (prompts x engines x samples) must be 600 or fewer. Example: 1

## `resolveRedirects` (type: `boolean`):

Gemini returns vertexaisearch.cloud.google.com redirect links instead of real URLs. When on, each is followed once to the real page and billed as one url-resolved event ($0.0005). Unresolved links keep the domain from the Gemini source title. Example: true

## `includeConsulted` (type: `boolean`):

Also output pages the engine retrieved while searching but did not cite (rows with cited: false). Example: true

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

Optional JSON object with a model override per engine (keys openai, anthropic, gemini, perplexity). Leave {} for the defaults: gpt-5-mini, claude-sonnet-4-5, gemini-3-flash, sonar. Example: {"openai":"gpt-5-mini","gemini":"gemini-3-flash"}

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

Your OpenAI API key for ChatGPT answers with web search (starts with sk-). Used only for this run, never logged or stored in results; usage is billed to your OpenAI account. Leave empty to skip ChatGPT. Example: sk-...

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

Your Anthropic API key for Claude answers (starts with sk-ant-). Used only for this run, never logged or stored in results. Leave empty to skip Claude. Example: sk-ant-...

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

Your Google AI Studio API key for Gemini answers (starts with AIza). Used only for this run, never logged or stored in results. Leave empty to skip Gemini. Example: AIza...

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

Your Perplexity API key (starts with pplx-). Used only for this run, never logged or stored in results. Leave empty to skip Perplexity. Example: pplx-...

## `demoMode` (type: `boolean`):

Replay bundled synthetic sample answers (2 prompts x 4 engines, project management software) with no keys, no network calls and no charges. Your prompts are ignored in demo mode. Rows are marked demo: true.

## Actor input object example

```json
{
  "prompts": [
    "best project management software for small teams"
  ],
  "brandDomain": "asana.com",
  "competitorDomains": [
    "monday.com",
    "clickup.com"
  ],
  "engines": [
    "openai",
    "gemini"
  ],
  "samplesPerPrompt": 1,
  "resolveRedirects": true,
  "includeConsulted": true,
  "models": {
    "openai": "gpt-5-mini",
    "anthropic": "claude-sonnet-4-5",
    "gemini": "gemini-3-flash",
    "perplexity": "sonar"
  },
  "openaiApiKey": "sk-...",
  "anthropicApiKey": "sk-ant-...",
  "geminiApiKey": "AIza...",
  "perplexityApiKey": "pplx-...",
  "demoMode": false
}
```

# Actor output Schema

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

Answer rows, one row per cited or consulted source, and the report row, overview view.

## `flat` (type: `string`):

The same rows as scalar CSV columns.

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

Ranked domains and URLs, share by source type, top domains per engine, and gaps as one JSON record.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "prompts": [
        "best project management software for small teams"
    ],
    "models": {}
};

// Run the Actor and wait for it to finish
const run = await client.actor("apricot_blackberry/ai-citation-source-finder").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "prompts": ["best project management software for small teams"],
    "models": {},
}

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

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

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

```

## CLI example

```bash
echo '{
  "prompts": [
    "best project management software for small teams"
  ],
  "models": {}
}' |
apify call apricot_blackberry/ai-citation-source-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apricot_blackberry/ai-citation-source-finder"
        }
    }
}
```

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/hlaLpVtNynaQmEhKk/builds/YhEBPW3s76LQnSli9/openapi.json
