Skip to main content
fastCRW Pergamon
Statistics · GB

Office for National Statistics

api.beta.ons.gov.uk

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

Showing the catalogue

1Request

Population type short name.

Rows per page; 20 area types exist for UR.

Zero-based row offset for paging.

1 credit⌘ ↵
Code follows the fields above
curl "https://api.fastcrw.com/v1/data/ons/area-types?population_type=UR&limit=30&offset=0" \
  -H "Authorization: Bearer $FASTCRW_API_KEY"

2Response example

A sample shape. Press Run to see live data from Office for National Statistics.

JSON
{
  "limit": 30,
  "offset": 0,
  "count": 20,
  "total_count": 20,
  "items": [
    {
      "id": "nat",
      "label": "England and Wales",
      "description": "Data for both England and Wales.",
      "total_count": 1,
      "hierarchy_order": 1400
    },
    {
      "id": "ctry",
      "label": "Countries",
      "description": "Data for either the whole of England or Wales.",
      "total_count": 2,
      "hierarchy_order": 1300
    },
    "… 18 more items"
  ]
}

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

Licence: Open Government Licence v3.0

Ask with this source

A prompt for your agent that names this source and how to call it through the crw MCP.

  • Census area types

    Use Office for National Statistics (ons) from fastCRW Pergamon, capability "Census area types" (area-types). You need the geography level id, such as nat, ctry or ltla, before requesting census observations. Example options: population_type=UR, limit=30, offset=0. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "ons" and capability "area-types". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Census 2021 observations

    Use Office for National Statistics (ons) from fastCRW Pergamon, capability "Census 2021 observations" (census-observations). You want actual Census 2021 numbers, for example population by sex or by economic activity for a geography level. Example options: population_type=UR, area_type=nat, dimensions=sex. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "ons" and capability "census-observations". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Code list editions

    Use Office for National Statistics (ons) from fastCRW Pergamon, capability "Code list editions" (code-list-editions). You have a code list id and need its edition name before you can list its codes. Example options: id=cpih1dim1aggid, limit=20, offset=0. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "ons" and capability "code-list-editions". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>

  • Code lists

    Use Office for National Statistics (ons) from fastCRW Pergamon, capability "Code lists" (code-lists). You want to browse the classifications ONS uses, such as administrative geography or industry breakdowns. Example options: limit=50, offset=0. Use the crw MCP tools: crw_find_data to confirm the source and its options, then crw_get_data with provider "ons" and capability "code-lists". Tell me the credits used and cite the licence from the response. If the crw MCP tools are missing, install them with: npx -y crw-mcp install --api-key <your fastCRW API key>