> ## 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.

# Owned citation share with change

> What share of all the links in AI answers point to your own site, and how that moved against the previous period.

Owned citation share is the fraction of **all citations** in answers to your prompts that point to your own site. It is computed from the citations report by summing the rows whose `owner` is `own`, then compared with the previous window.

> [!NOTE]
>
> This is a different figure from `citation_rate` in the visibility report. `citation_rate` is the share of **answers** that link to you at least once; citation share is your share of **links**. An answer citing you once among nine other sources raises your citation rate fully and your citation share by a tenth. Use `citation_rate` for the Visibility Score and citation share to see how much of the evidence the engines rely on is yours.

## How this example works

1. **Request the citations report unfiltered**, with `entity: "domain"` and no `group_by`. Filtering on `owner` would make shares add up to 1 within the filter; see [Conventions](/cookbook/conventions#citation_share-is-computed-after-the-filter).
2. **Fetch every page.** The long tail of domains matters to the denominator.
3. **Divide your citations by all citations.** Summing the raw `citations` counts is exact; summing `citation_share` gives the same answer, give or take rounding.
4. **Run it for the previous window** and report the change in percentage points.

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

const rr = new RankRaft();
const site_id = process.env.RANKRAFT_SITE_ID;

async function ownedShare(start_date, end_date) {
  const rows = await rr.reports
    .citations({ site_id, start_date, end_date, entity: "domain", metrics: ["citations"], limit: 100 })
    .all();
  const total = rows.reduce((s, r) => s + r.citations, 0);
  const own = rows.filter((r) => r.owner === "own");
  const owned = own.reduce((s, r) => s + r.citations, 0);
  return { share: total ? owned / total : null, owned, total, domains: own.map((r) => r.domain) };
}

const [now, before] = await Promise.all([
  ownedShare("2026-09-01", "2026-09-30"),
  ownedShare("2026-08-02", "2026-08-31"), // the previous 30 days
]);

if (now.share === null) throw new Error("No citations in this range.");
console.log(`Owned citation share: ${(now.share * 100).toFixed(1)}% (${now.owned} of ${now.total} citations)`);
if (before.share !== null) console.log(`Change: ${((now.share - before.share) * 100).toFixed(1)} pp`);
console.log("Your domains cited:", now.domains.join(", ") || "none");
```

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

SITE_ID = os.environ["RANKRAFT_SITE_ID"]

def owned_share(rr, start, end):
    rows = rr.reports.citations(
        site_id=SITE_ID, start_date=start, end_date=end,
        entity="domain", metrics=["citations"], limit=100,
    ).all()
    total = sum(r["citations"] for r in rows)
    own = [r for r in rows if r["owner"] == "own"]
    owned = sum(r["citations"] for r in own)
    return {"share": owned / total if total else None, "owned": owned, "total": total,
            "domains": [r["domain"] for r in own]}

with RankRaft() as rr:
    now = owned_share(rr, "2026-09-01", "2026-09-30")
    before = owned_share(rr, "2026-08-02", "2026-08-31")  # the previous 30 days

if now["share"] is None:
    raise SystemExit("No citations in this range.")
print(f"Owned citation share: {now['share']:.1%} ({now['owned']} of {now['total']} citations)")
if before["share"] is not None:
    print(f"Change: {(now['share'] - before['share']) * 100:+.1f} pp")
print("Your domains cited:", ", ".join(now["domains"]) or "none")
```

```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","metrics":["citations"],"limit":100}'
# Page through info.next_cursor, then sum citations where owner == "own" over the sum of all citations.
```

## Variations

| Question | Change |
| - | - |
| Per engine | Add `group_by: ["platform"]` and do the sums per `platform`. |
| Only some engines or prompt categories | Add a `filter` on `platform` or `category`. Those narrow which answers count, so the share is still of all links in those answers. |
| Competitors' share | Sum rows where `owner` is `competitor` instead. |
| Which of your pages are cited | `entity: "page"` with `filter: owner is own`; here the within-filter share is what you want. |

> [!WARNING]
>
> Filtering on `domain`, `owner` or `source_kind` narrows the **links** counted, so the shares change meaning. Filtering on `platform`, `prompt` or `category` narrows the **answers**, and leaves every link in them in the denominator.

## Common follow-ups

> **[Citation share and volume over time](/cookbook/citation-share-over-time)**
>
> The daily line.

> **[Citation rank by domain](/cookbook/citation-rank)**
>
> Where you sit among every cited domain.


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