# ONS API (Office for National Statistics)

Category: [Statistics](https://free-web-services.com/web-services/open-data/statistics/)  
Page: https://free-web-services.com/web-services/open-data/statistics/ons-api.html  
Documentation: https://developer.ons.gov.uk/

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.

- API key: Not needed
- 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

Example request:

```sh
curl 'https://api.beta.ons.gov.uk/v1/datasets?limit=1'
```

The JavaScript works in a web page as well as in Node.js 18 or newer.

