ONS API (Office for National Statistics)
by developer.ons.gov.uk
Statistics
Added on November 7th, 2026
Checked and working on November 7th, 2026
Visit developer.ons.gov.uk →
What it does
The ONS API gives official statistics for the United Kingdom from the Office for National Statistics: datasets on population, the labour market, prices, the economy and well-being, with their editions, versions and observations. Filter a dataset by dimensions such as time and geography and download it as JSON or CSV. Free, no key needed.
At a glance
- API key
- Not needed · More APIs with no key
- Pricing
- Free, no key needed.
- From the browser
- Yes (CORS)
- Formats
- JSON
- Interface
- REST, HTTP-GET
- Provider
- developer.ons.gov.uk
- Last checked
- Working on November 7th, 2026
More information: https://developer.ons.gov.uk/
Is this your service? Show that it is listed
Put this badge on your website or in your README; it links to this page. About the badge
Example request
curl
curl 'https://api.beta.ons.gov.uk/v1/datasets?limit=1'
JavaScript
const response = await fetch("https://api.beta.ons.gov.uk/v1/datasets?limit=1");
const data = await response.json();
console.log(data);
Python
import requests
response = requests.get(
"https://api.beta.ons.gov.uk/v1/datasets?limit=1",
timeout=30,
)
print(response.json())
The JavaScript works in a web page as well as in Node.js 18 or newer.