ONS
UK Office for National Statistics datasets
ONS beta API lists official UK statistical datasets with metadata and edition links. Public JSON with no API key on read routes.
GET https://api.beta.ons.gov.uk/v1/datasets?limit=1
{
"items": [
{
"contacts": [
{
"email": "qualityoflife@ons.gov.uk",
"name": "Will Shufflebottom, Owain Birrell, Pavan Bains and Geeta Kerai",
"telephone": "+44 300 0671543"
}
],
"description": "Seasonally and non seasonally-adjusted quarterly estimates of life satisfaction, feeling that the things done in life are worthwhile, happiness and anxiety in the UK.",
"keywords": [
"well-being"
],
"id": "wellbeing-quarterly",
"last_updated": "2023-12-13T09:40:24.204Z",
"links": {
"editions": {
"href": "https://api.beta.ons.gov.uk/v1/datasets/wellbeing-quarterly/editions"
},
"latest_version": {
"href": "https://api.beta.ons.gov.uk/v1/datasets/wellbeing-quarterly/editions/time-series/versions/9",
"id": "9"
},
"self": {
"href": "https://api.beta.ons.gov.uk/v1/datasets/wellbeing-quarterly"
},
"taxonomy": {
"href": "https://api.beta.ons.gov.uk/v1/peoplepopulationandcommunity/wellbeing"
}
},
"methodologies": [
{
"href": "https://www.ons.gov.uk/peoplepopulationandcommunity/wellbeing/methodologies/personalwellbeingquarterlyestimatestechnicalreport",
"title": "Personal well-being quarterly estimates technical report"
}
],
"national_statistic": false
}
],
"count": 1,
"offset": 0,
"limit": 1,
"total_count": 337
}curl "https://api.beta.ons.gov.uk/v1/datasets?limit=1"const res = await fetch("https://api.beta.ons.gov.uk/v1/datasets?limit=1");
const data = await res.json();
console.log(data);import requests
res = requests.get("https://api.beta.ons.gov.uk/v1/datasets?limit=1")
print(res.json())/datasets?limit=1PROBEDUK Office for National Statistics datasets
/datasets?limit=5Datasets — documented GET route.
/datasets?page=1Datasets — documented GET route.
We probe a documented GET and expect 2xx JSON — full uptime and health score. Export includes every documented route below.
Stable. No schema drift observed since monitoring began — the response shape has not changed under our checks.
ONS: common questions
Is ONS free to use?
Yes — ONS is a free government API. Free tier: Free — limits not published. Whether the free tier allows commercial use is unclear — check the provider docs.
Does ONS need an API key?
No — ONS needs no API key or signup. You can call it straight away; rate limits still apply (Unpublished).
Can I call ONS from the browser?
Yes — ONS returns CORS headers over HTTPS, so front-end code can fetch it directly with no backend proxy. Use the fetch snippet on this page, or hit "Run live" to try it now.
Is ONS up right now?
As of our last scheduled check, ONS is healthy with 100% uptime over 90 days and a 732 ms median response. We re-probe it every sweep — the status badge and uptime chart above always show the latest.