> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rankraft.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Where AI gets its answers

> Find the third-party sites the engines cite most, to target for coverage.

The citations report ranks the domains (or pages) cited in answers to your prompts. Filtering out your own site and your competitors leaves the third-party sources worth getting onto: forums, reviews, roundups and marketplaces.

## How this example works

1. **`filter: owner is third_party`** keeps only sites that are neither yours nor a competitor's.
2. **Rows arrive ranked** by how many answers cited each domain.
3. **`source_kind`** says what kind of site it is, so you can plan the right approach for each.

```js JavaScript theme={"system"}
import { RankRaft, f } from "rankraft-js";

const rr = new RankRaft();

const page = await rr.reports.citations({
  site_id: process.env.RANKRAFT_SITE_ID,
  start_date: "2026-09-01",
  end_date: "2026-09-30",
  entity: "domain",
  filter: f.is("owner", "third_party"),
  limit: 25,
});

for (const r of page.data) {
  console.log(`${String(r.rank).padStart(2)}. ${r.domain.padEnd(30)} ${r.source_kind.padEnd(12)} ` +
    `${r.answers} answers, ${(r.citation_share * 100).toFixed(1)}% of third-party citations`);
}
```

```python Python theme={"system"}
import os
from rankraft import RankRaft, F

with RankRaft() as rr:
    page = rr.reports.citations(
        site_id=os.environ["RANKRAFT_SITE_ID"],
        start_date="2026-09-01",
        end_date="2026-09-30",
        entity="domain",
        filter=F("owner").is_("third_party"),
        limit=25,
    )

for r in page:
    print(f"{r['rank']:>2}. {r['domain']:<30} {r['source_kind']:<12} "
          f"{r['answers']} answers, {r['citation_share']:.1%} of third-party citations")
```

```bash curl theme={"system"}
curl https://api.rankraft.ai/v1/reports/citations \
  -H "X-API-Key: $RANKRAFT_API_KEY" -H "Content-Type: application/json" \
  -d '{"site_id":"'$RANKRAFT_SITE_ID'","start_date":"2026-09-01","end_date":"2026-09-30",
       "entity":"domain","filter":{"field":"owner","op":"is","value":"third_party"},"limit":25}'
```

> [!NOTE]
>
> With an `owner` filter, `citation_share` is each domain's share of the **third-party** citations, not of all citations. For a domain's share of everything, drop the filter; see [Citation rank by domain](/cookbook/citation-rank).

## Drill into pages

Switch `entity` to `page` and filter on the domain to see which articles get cited:

```json theme={"system"}
{
  "entity": "page",
  "filter": { "field": "domain", "op": "is", "value": "reddit.com" }
}
```

## Only forums and reviews

```json theme={"system"}
{ "and": [
  { "field": "owner", "op": "is", "value": "third_party" },
  { "field": "source_kind", "op": "in", "value": ["forum", "review"] }
] }
```

## Where competitors are cited

`"filter": { "field": "owner", "op": "is", "value": "competitor" }` with `entity: "page"` shows which of their pages the engines rely on. That is often the clearest hint of the content you are missing.

> [!TIP]
>
> The Action Center already turns sources like these into one card per prompt, with platform rules such as disclosure on Reddit built into the advice. Read them with [`GET /v1/sites/{site_id}/actions`](/api-reference/endpoints/list-actions).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.