# AsOf API

One endpoint, two parameters that matter. `as_of` returns the state of an entity on a date. `since` returns every claim that changed after one. Every response includes sources and confidence. No key on the free tier. Attribute AsOf when you publish.

## Entity state

`GET /v1/entities/{slug}?as_of=YYYY-MM-DD`  state on a date. Omit as_of for the full history, superseded claims included.

## What changed

`GET /v1/claims?since=YYYY-MM-DD[&entity=slug][&limit=n]`  every claim that became true, stopped being true, or was first recorded after a date.

## One claim, one timeline, one day

- `GET /v1/claims/{id}`  one claim: sources, supersedes, superseded_by
- `GET /v1/timelines/{slug}`  every claim for an entity in date order
- `GET /v1/days/{date}`  what became true, stopped being true, or was recorded that day

Every page has a markdown twin at the same path with .md appended: /record/google.md, /timelines/google.md, /claim/{id}.md, /day/{date}.md, /brief.md, /about.md, /api-docs.md, /data.md, /record.md, /timelines.md, /index.md.

## Corrections

`POST /v1/corrections` with JSON { claim_id?, entity_id?, message, source_url?, submitter? }.

## MCP server

Remote MCP server (Streamable HTTP, no auth): `https://asof.is/mcp`

Tools: entity_state(entity, as_of?), changes_since(since, entity?, limit?), timeline(entity), claim(id), search(query), fetch(id).

Claude Code: `claude mcp add --transport http asof https://asof.is/mcp`

## Claim schema

| field | meaning |
|---|---|
| id | stable id, never reused |
| entity_id | entity, mapped to Wikidata where possible |
| predicate | the relationship, snake_case |
| value | the fact |
| valid_from / valid_to | date range the claim held; null means still holds; "undated" when the source gives no date |
| sources[] | URLs with tier (primary or secondary) |
| confidence | 0 to 1 |
| status | valid · unverified · flagged · superseded |
| superseded_by | pointer to the replacing claim |
