Developer API

Pre-baked JSON on a CDN — zero request-time computation, every response carrying the release version, OGL attribution and a verifiable receipt block (verify it yourself). Base URL: https://statbook.co.uk. The full contract is in the OpenAPI spec.

Endpoints

EndpointReturnsAccess
GET /v1/figuresindex of all figures with current values; filter with ?category= and ?jurisdiction=Free
GET /v1/figures/{id}full record including historyFree
GET /v1/figures/{id}/currentcurrent value onlyFree
GET /v1/figures/{id}/asof/{date}the value in force on a dateAPI key
GET /v1/changes?since={date}diff feed of releases since a dateAPI key
GET /v1/releases/{version}/manifestsigned manifest (per-record hashes)Free
GET /v1/releases/{version}/datasetbulk dataset downloadFree (delayed) / key (latest)

Static hosting note: each endpoint is also reachable as a plain file by appending .json (e.g. /v1/figures/employment.guarantee_pay.daily_rate.json) — same bytes, no envelope.

Values come in two forms: value is the canonical display string exactly as the corpus pins it ("£751.00" — this is what the record hash covers), and value_numeric is the machine-readable projection (751.0; percentages as numbers, banded tables already structured) carried on the index, current, history and asof responses. Integrate against value_numeric; cite value.

Authentication

Free endpoints need no key, no account, no cookie. Keyed endpoints take Authorization: Bearer <key> (or X-Api-Key). Keys are stored hashed and are revocable; per-key rate limits apply. Get a key on the pricing page.

The receipt block

Every figure response ends with a receipt object:

{
  "record_hash": "sha256:…",   // canonical hash of the figure object
  "release_version": "1.0.1",
  "manifest": "https://statbook.co.uk/v1/releases/1.0.1/manifest.json",
  "sources": [ { "citation": …, "uri": …, "retrieved": …, "content_hash": … } ],
  "last_verified": "…"
}

An archived response can be validated end-to-end by any third party with no cooperation from us: recompute the record hash, find it in the signed manifest, check the manifest signature. Step-by-step instructions.

Example

curl https://statbook.co.uk/v1/figures/employment.guarantee_pay.daily_rate/current

MCP server

Statbook ships an MCP server exposing get_figure, get_figure_asof, list_figures and whats_changed. The free tier works with no key; keyed capabilities (as-of, changes) accept your API key as configuration — same tiers on every surface.

{
  "mcpServers": {
    "statbook": {
      "command": "python",
      "args": ["-m", "mcp.server"],
      "env": { "STATBOOK_API_KEY": "<optional>" }
    }
  }
}

Bulk dataset

Fair use

The free tier is rate-limited per IP, generously. Don't scrape the free tier at bulk-substitute volumes — the bulk download exists and is free (acceptable-use policy).