Postal Codes Dataset for United Kingdom, GB

Postal Codes Dataset for United Kingdom, GB including name of the city, town, or place, various administrative divisions and alternative city names.

Report an issue
Downloads
692
Last updated
Rows
1,749,109
Size
235 MB
Format
csv
License · +1 more
OGL-UK-3.0

Data Files

1 file

postal-codes-gb-sample

Postal Codes Dataset for United Kingdom (GB)

This dataset lists British unit postcodes across England, Scotland and Wales (Great Britain only; Code-Point Open does not cover Northern Ireland), with coordinates and administrative geography (country / district / ward, plus the county in two-tier areas of England).

Column definitions, row count, size and last-updated date are in datapackage.yaml.

Data Sources

Required attribution: "Contains OS data © Crown copyright and database right; contains Royal Mail data © Royal Mail copyright and database right; contains National Statistics data © Crown copyright and database right; GeoNames data © GeoNames, CC BY 4.0."

Changes made to the source data: grid coordinates (British National Grid) converted to WGS84 latitude and longitude at 6 decimals; district, ward and county names joined on GSS code from the ONS lookups; place name set to the nearest GeoNames populated place; postcodes with positional quality 90 have blank coordinates and place name instead of 0,0.

Not endorsed by, or affiliated with, Ordnance Survey, Royal Mail, the Office for National Statistics or GeoNames.

Known limitations

  • Great Britain only: Northern Ireland is not covered.
  • Postcodes with OS positional quality 90 have no coordinate, so latitude, longitude and place_name are blank for them rather than estimated.
  • The county columns are populated only for two-tier areas of England; single-tier authorities (Scotland, Wales and unitary English authorities) correctly have no county value.
  • place_name is the nearest GeoNames populated place to the postcode coordinate, not an official postal town.
  • alternative_city_name is always empty.

Usage

The dataset files are available in CSV format and can be accessed and downloaded using the links provided in datapackage.yaml. Read postal_code as text (dtype=str): British postcodes mix letters, digits and a space (AB10 1WS).

For other inquiries, contact datahub@datopian.com

API access

Access dataset files directly from scripts, code, or AI agents.

Each file has a stable URL (r-link) that you can use directly in scripts, apps, or AI agents. These URLs are permanent and safe to hardcode.

  1. Fetch datapackage.yaml to inspect schema and resources
  2. Download data resources listed in datapackage.yaml
  3. Read README.md for full context
/logistics/postal-codes-gb/3 files
  • ATTRIBUTION.txthttps://datahub.io/logistics/postal-codes-gb/_r/-/ATTRIBUTION.txt
  • README.mddocumentationhttps://datahub.io/logistics/postal-codes-gb/_r/-/README.md
  • datapackage.yamlmetadata & schemahttps://datahub.io/logistics/postal-codes-gb/_r/-/datapackage.yaml