Skip to content

Independent statistics from official sources: World Bank, IMF, WHO and UN agencies

Data API

The API is a set of static JSON files, versioned with each data release. It needs no key, has no rate limit beyond the CDN's, and can be cached. Responses follow the TypeScript types in lib/published.ts.

Endpoints

  • GET https://trackingzoo.com/data/index.json: all active indicators (slug, title, unit, topic, provider, coverage, ranking year) and all entities (ISO3 id, ISO2, slug, type, region, income group).
  • GET https://trackingzoo.com/data/series/{indicator}.json: full history for one indicator: { meta, series: { ISO3: [[year, value, flag?], …] } }. Flags: e estimate, f forecast, p provisional.
  • GET https://trackingzoo.com/data/entity/{ISO3}.json: one country or aggregate: latest value of every indicator, ranks, and full history for core indicators.
  • GET https://trackingzoo.com/data/csv/{indicator}.csv: core indicators as CSV: entity, code, entity_type, year, value, flag.
  • GET https://trackingzoo.com/data/indices/{index}.json: TrackingZoo index values by country and year, ranking, sensitivity analysis.
  • GET https://trackingzoo.com/data/pip-global.json: global income distribution table from the World Bank PIP.
  • GET https://trackingzoo.com/data/search.json: the search index used by the site.

Example

const r = await fetch("https://trackingzoo.com/data/series/life-expectancy.json");
const { meta, series } = await r.json();
const canada = series.CAN;            // [[1960, 71.1], …]
console.log(meta.unit, canada.at(-1)); // "years" [2024, 82.1]

Rankings and comparisons

Rankings and comparisons are computed from the series files using the rules on the methodology page (one common year, sovereign states only, direction per indicator). The same code is in lib/derive.ts in the repository.

Database

For queries across indicators, the same data loads into Postgres (Supabase) with npm run sync; the schema is in supabase/migrations, with row-level security that gives anonymous users read access to published data only.