Using the API
CSV and bulk downloads
Choosing a format
Endpoints that offer more than one format take a format parameter:
| Format | Best for |
|---|---|
json | Apps and scripts. The default. |
csv | Spreadsheets, and tools like pandas or R. |
ndjson | Streaming, with one JSON record per line. |
curl "https://api.ukdataatlas.com/v1/data/population?period=2022&geography=ward&codeYear=2023&format=csv"The API picks the format from this parameter only, not the Accept header.
What CSV looks like
- Each row carries its own provenance, so a saved file still says where it came from.
- Rows include the measure's
unit, so values can't be misread. lowerBoundandupperBoundcolumns hold any published confidence interval, and are empty otherwise.- In lookup tables, a list is joined with
|in a single cell.
Whole datasets
Paging through a big dataset takes many requests. Instead, list the downloads on offer and fetch the one you want as a single file:
curl "https://api.ukdataatlas.com/v1/exports"Whole datasets default to JSON. Add format=csv for a spreadsheet or format=parquet for a compressed file with typed columns. Both flat formats contain the named measure across all its periods; JSON retains the complete source artifact, including other measures when they share a table. Missing values stay empty in CSV and null in Parquet. Each export's formats lists the flat files with their byte sizes, hashes and download links. Sizes describe the files before any HTTP compression.
Each download has a contentHash. Check it after downloading to be sure you got exactly the file that was published. Keep a copy in sync shows how.
/exports/{export-id}Download a datasetLookup tables
Lookup tables are the reference data you join against: area codes and names for each boundary release, crosswalks as one row per mapping, and named-location membership. Download them as CSV or NDJSON:
curl "https://api.ukdataatlas.com/v1/lookups/areas-combinedAuthority-2025-12-en-bgc?format=csv"Map tiles
Boundaries for maps come as vector tiles, or as one PMTiles archive holding every tile for a release. See Draw a map.