Skip to main content

Facts API

Facts are the atomic, self-contained units extracted from sources. All fact routes are repo-scoped.

List facts in repository

GET /api/v1/repositories/{repoID}/facts

Permission: fact:read. Returns facts in the repository with pagination + filters.

Query params:

  • q — full-text search (Postgres websearch_to_tsquery)
  • concept — concept UUID or canonical name filter
  • context — context filter (with canonical-name concept)
  • limit, offset — pagination

Get fact

GET /api/v1/repositories/{repoID}/facts/{factID}

Permission: fact:read. Returns the fact's metadata, source URLs, and linked concepts.


List fact concepts

GET /api/v1/repositories/{repoID}/facts/{factID}/concepts

Permission: fact:read. Returns the concepts linked to this fact.


Fact lifecycle

Facts move through these statuses:

StatusMeaning
newJust extracted, not yet embedded or deduped
stableSurvived dedup, ready for concept extraction
to_deleteLost a dedup match; will be cleaned up by cleanup_facts

See Deduplication for the dedup algorithm.