Skip to main content
All providers

Office for National Statistics

StatisticsGB

api.beta.ons.gov.uk

UK official statistics: the ONS dataset catalogue and the editions and versions behind each one.

Capabilities (17)

GET /v1/data/ons/area-types1 credit

Returns the geography levels a population type can be tabulated at, from England and Wales down to output areas, each with its id, label and how many areas it contains.

population_typelimit?offset?
GET /v1/data/ons/census-observations1 credit

Returns Census 2021 counts for a population type, cross-tabulated by the requested variables at the requested geography level, each row naming its dimension options and the count.

population_typearea_typedimensions
GET /v1/data/ons/code-list-editions1 credit

Returns the editions of one code list, each with its edition name and a link to the codes it contains.

idlimit?offset?
GET /v1/data/ons/code-lists1 credit

Returns every classification code list ONS publishes, each with its id and links to its editions and codes.

limit?offset?
GET /v1/data/ons/codes1 credit

Returns the codes of one code list edition, each with its code, human label and a link to the datasets that use it.

ideditionlimit?offset?
GET /v1/data/ons/dataset1 credit

Returns one dataset's record: title, description, keywords, national-statistic flag, release frequency, contact details, licence and links to its editions and latest version.

id
GET /v1/data/ons/datasets1 credit

Returns the catalogue of ONS published datasets, each with id, title, description, keywords, contacts, release frequency and a link to its latest version.

limit?offset?
GET /v1/data/ons/dimension-options1 credit

Returns the valid option codes and labels for one dimension of a dataset version, each linked to its entry in the underlying code list.

ideditionversiondimensionlimit?offset?
GET /v1/data/ons/dimensions1 credit

Returns the dimensions of one dataset version, each with its label, its options endpoint and the code list that defines its values.

ideditionversionlimit?offset?
GET /v1/data/ons/edition1 credit

Returns one edition of a dataset, with its internal id and an explicit pointer to the current latest version number.

idedition
GET /v1/data/ons/editions1 credit

Returns the editions of one dataset, each with its edition name and a link to the current latest version of that edition.

idlimit?offset?
GET /v1/data/ons/observations1 credit

Returns the actual observation values of a dataset version for one combination of dimension options, with the unit of measure and the total observation count.

ideditionversiontimegeographyaggregate
GET /v1/data/ons/population-type-dimensions1 credit

Returns the census variables that can be crossed for one population type, each with its id, label, category count and a long plain-English description.

population_typelimit?offset?q?
GET /v1/data/ons/population-types1 credit

Returns the census population bases available for Census 2021 tabulation, each with its short name, label, description and whether it is microdata or tabular.

limit?offset?
GET /v1/data/ons/search1 credit

Searches ONS published content and returns scored results with title, summary, release date, content type and URI, alongside topic and content-type facet counts.

qlimit?offset?sort?content_type?topics?
GET /v1/data/ons/version-metadata1 credit

Returns the statistical metadata of one dataset version: dimension list, unit of measure, release date and frequency, methodology and quality-statement links, licence, and the CSV/XLSX download URLs with their byte sizes.

ideditionversion
GET /v1/data/ons/versions1 credit

Returns every published version of one dataset edition, each with its version number, release date, any correction or alert notices, and download links.

ideditionlimit?offset?

Attribution

Display this wherever you show the data. It arrives on every response as provenance.attribution_text.

Contains public sector information licensed under the Open Government Licence v3.0.

Cache: up to 3600s