---
title: "Export Graph"
method: GET
path: "/authorities/graph/export"
tags: ["authorities"]
---

# Export Graph

`GET /authorities/graph/export`

## Request

- Base URL: `https://api.casenode.ai`
- URL: `https://api.casenode.ai/authorities/graph/export`
- Auth: none declared

Export a bounded slice of the citation graph, column-oriented.

Unlike `/graph/subgraph`, this **never refuses**: past the cap it truncates
to the best `limit` matches (`sort`, default most-cited) and reports
``capped``. That is the whole difference in contract — subgraph guards an
interactive render, export hands back a usable slice whatever you ask for.

The corpus is ~420k nodes / ~2.2M edges; serialising all of it took ~23s and
70MB, fully buffered, which no API gateway will sit through. Hence the cap.
There is deliberately no offset or cursor, so **this route cannot walk the
whole corpus** — it answers "the interesting slice of X", not "all of X".

Two limits on what ``total`` and ``capped`` can promise:

* ``total`` is the *search index* match count. Meili indexes fewer rows than
  Postgres holds valid (417,463 vs 419,473 measured 2026-08-08), so an
  unindexed authority is unreachable here at every limit, and uncounted in
  ``total``. Closing that gap is a re-index, and it moves ``/graph/subgraph``
  identically — the two share this id selector on purpose.
* ``capped`` means "this is not the whole match set" — set when the total
  exceeds ``limit`` *or* when Postgres rejected an id Meili returned.

Neither makes ``capped: false`` a guarantee of completeness against
Postgres; it is a guarantee against the index.

## Query parameters

- `q` string: Free-text query, as on /search.
- `limit` integer: Maximum nodes to return. Always applied; hard ceiling 10000.
- `sort` 'citations' | 'relevance' | 'date': Which matches survive the cap. Default: most-cited first.
- `court` string, nullable: Court code, e.g. UKSC.
- `year_from` integer, nullable: Earliest judgment year.
- `year_to` integer, nullable: Latest judgment year.
- `cited_by_min` integer, nullable: Minimum citation count.
- `domain` string, nullable: Legal domain slug.
- `topic` string, nullable: Legal topic slug.
- `jurisdiction` string, nullable: Jurisdiction.

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/casenode/apis/casenode-api.md) · [All operations](https://skmtc.dev/casenode/apis/casenode-api/llms.txt) · [OpenAPI document](https://skmtc.dev/casenode/apis/casenode-api/revisions/5b2883d19661?raw)
