v1

latestOpenAPI 3.0.0Open Government Licence v3.02026-07-14355492.7 KB
Public

List datasets

Returns a list of all datasets available via the ONS APIs.

get/datasets

Query parameters

is_based_onstring

A population type to search on to return datasets that are associated with that population type e.g. Usual-Residents. This is applicable to Census 2021 datasets only.

typestring

A filter to search the datasets by dataset type e.g. type=static

limitinteger

Maximum number of items that will be returned. A value of zero will return zero items.

offsetinteger

Starting index of the items array that will be returned. By default it is zero, meaning that the returned items will start from the beginning.

sort_orderstring

Value for the sort order of the array that will be returned. Default value is DESC (z-a) for descending order, for the ascending order ASC can be used.

idstring

ID that represents a dataset

Response

A json list containing datasets which have been published

countinteger

The number of items returned.

limitinteger

The number of items requested.

offsetinteger

The offset of the first item to retrieve, starting at 0. Use this parameter as a pagination mechanism along with the limit parameter

total_countinteger

The total number of items available.

Example response

{
  "count": 20,
  "total_count": 123,
  "items": [
    {
      "id": "my-dataset",
      "canonical_topic": "7779",
      "collection_id": "666c06bc09d337ab9d164c82f8f383c081a4e38cbd91b79d4a23ea0025fecb3f",
      "contacts": [
        {
          "email": "example@ons.gov.uk",
          "name": "Expert Statistical Team",
          "telephone": "+44 1234 111111"
        }
      ],
      "description": "This dataset contains some very interesting data about the UK.",
      "is_based_on": {
        "id": "Usual-Residents",
        "type": "cantabular_table"
      },
      "keywords": [
        "Inflation"
      ],
      "links": {
        "editions": {
          "href": "https://api.beta.ons.gov.uk/v1/datasets/my-dataset/editions"
        },
        "latest_version": {
          "href": "https://api.beta.ons.gov.uk/v1/datasets/my-dataset/editions/july-september-2017/versions/5",
          "id": "5"
        },
        "latest_edition": {
          "href": "https://api.beta.ons.gov.uk/v1/datasets/my-dataset/editions/july-september-2017"
        },
        "self": {
          "href": "https://api.beta.ons.gov.uk/v1/datasets/my-dataset"
        },
        "taxonomy": {
          "href": "https://www.ons.gov.uk/theme/topic"
        }
      },
      "methodologies": [
        {
          "href": "https://www.ons.gov.uk/my-related-page",
          "title": "Related Link Title",
          "description": "This is a description of the linked resource."
        }
      ],
      "next_release": "To be announced",
      "publications": [
        {
          "href": "https://www.ons.gov.uk/my-related-page",
          "title": "Related Link Title",
          "description": "This is a description of the linked resource."
        }
      ],
      "qmi": {
        "href": "https://www.ons.gov.uk/businessindustryandtrade/retailindustry/methodologies/retailsalesindexrsiqmi"
      },
      "related_datasets": [
        {
          "href": "https://www.ons.gov.uk/my-related-page",
          "title": "Related Link Title",
          "description": "This is a description of the linked resource."
        }
      ],
      "related_content": [
        {
          "href": "https://www.ons.gov.uk/my-related-page",
          "title": "Related Link Title",
          "description": "This is a description of the linked resource."
        }
      ],
      "release_frequency": "Monthly",
      "state": "published",
      "subtopics": [
        "7755"
      ],
      "survey": "census",
      "title": "Consumer Prices Index",
      "topics": [
        "7779",
        "7755"
      ],
      "type": "static",
      "unit_of_measure": "Number of people"
    }
  ]
}
All 35 operations