Organisations · Data feed
The data feed
Every figure on UK Explained, as plain JSON files. No key, no sign-up and nothing to call: each address is a file, rebuilt every night.
Files
| Address | What | Contains |
|---|---|---|
/api/v1/index.json | Start here | Lists everything else, with the licence. |
/api/v1/series.json | All series | Pay, claimants, inflation, debt, spending, NHS waits and more, with the latest value. |
/api/v1/series/<id>.json | One series | Every point, the source, a plain description and what it cannot tell you. |
/api/v1/areas.json | All areas | All 650 constituencies: pay, claimants, last election, Census 2021. |
/api/v1/areas/<slug>.json | One area | The same, for one constituency, plus its page address. |
/api/v1/mps.json | MPs | How often each voted with their party. |
/api/v1/calendar.json | Release calendar | Official releases due in the next ten weeks. |
/api/v1/status.json | Data status | When each dataset was last fetched. |
/api/v1/changes.json | Change notices | Changes to the feed and the site, with dates. |
/api/v1/world.json | Other countries | The UK and 15 other economies from the IMF: inflation, growth, borrowing, debt and more. |
/api/v1/catalogue.json | Every dataset | Each dataset with its title, unit, source, the date its figures last changed, and its CSV and JSON files. |
/api/v1/charts/<id>.json | One ranking or table | A ranking of countries or regions, such as hospital beds per person, with its source. |
A quick example
fetch('https://ukexplained.uk/api/v1/series/waiting.json')
.then(r => r.json())
.then(s => console.log(s.label, s.points.at(-1)));
Every record says where its figure came from. Keep the source with the figure when you republish it.
Using it
- Files are versioned (
v1). The shape will not change without a notice on the change notices page. - Be kind: the files are static and cached, so download what you need rather than polling every minute. They change once a night.
- The same figures as spreadsheet files: download the data.
- Free to reuse for any purpose, including commercial use, as long as you credit UK Explained (ukexplained.uk) and the original source named with each figure. Terms of use.