About this API
The Office for National Statistics (ONS) is the UK's national statistics institute. Its beta API (api.beta.ons.gov.uk/v1) exposes a catalogue of official-statistics datasets — spanning the economy, labour market, population and the 2021 Census, through to wellbeing — together with their editions, versions, dimensions and individual observations. Responses are JSON and hyperlinked: you move from the dataset list to editions, versions and specific values by following links. Access is open and unrestricted, with no key or registration required, and the data is published under the Open Government Licence v3.0. The API is labelled beta, so its structures may still change.
Frequently asked questions
Do I need an API key?
No. The ONS API is open and unrestricted — no key or registration is needed. You just send a GET request to api.beta.ons.gov.uk/v1.
What data does this API return?
UK official statistics: a catalogue of datasets plus their editions, versions, dimensions and individual observations. It covers areas such as the economy, labour market, population, the 2021 Census and wellbeing. Responses are JSON, hyperlinked to related resources.
Can this API be called directly from a browser?
Yes. The endpoint returns an Access-Control-Allow-Origin: * header, so it can be called directly from front-end code in the browser — which is why the live 'Try it' button on this page works.
Who runs this API?
The Office for National Statistics (ONS) — the UK's national statistics institute, responsible for the country's official statistics.