OpenPostcodes

Data sources & licences

Every third-party dataset behind the API, which response field(s) it powers, and its licence. Code is MIT licensed; the data below is a mix of Open Government Licence, Creative Commons and public-domain sources. Currently serving ONSPD May 2026.

ProvidesCoverageDatasetPublisherLicence
postcode, part, eastings, northings, admin_district, ward, constituency, county, parish_code, census, classification, health, travel_to_work_area_code, police_force_area_code, national_park_code, built_up_area_code, county_electoral_division_code, date_introduced (codes)UK & Crown DependenciesONS Postcode Directory (ONSPD)
ONSPD May 2026
Office for National StatisticsOpen Government Licence v3.0
admin_district, ward, constituency, county (names)England, Scotland, Wales & Northern IrelandONS Open Geography Portal
"Names and Codes" registers
Office for National StatisticsOpen Government Licence v3.0
census.msoa_nameEngland & WalesMSOA NamesHouse of Commons LibraryCC BY 4.0
elevation; OS-derived coordinates embedded in ONSPD (eastings, northings)GB mainlandOS Terrain 50Ordnance SurveyOrdnance Survey Data Licence — Crown copyright and database right 2026
The postcode text itself, via ONSPDUK & Crown DependenciesBundled in ONSPD (see above)Royal MailRoyal Mail copyright and database right 2026
boundaryGreat Britain (not Northern Ireland, Channel Islands or Isle of Man)GB postcode unit boundaries
Approximate - Voronoi diagram of ONS NSUL address points, not an official/legal boundary
Mark Longair, derived from ONS National Statistics Postcode Lookup (NSUL)Open Government Licence v3.0
nearest.railway_stationGB mainlanddavwheat/uk-railway-stationsdavwheatNot stated
nearest.railway_stationNorthern IrelandTranslink NI Railways StationsTranslink, via Open Data NIOpen Government Licence
nearest.hospital, nearest.gpEnglandCQC care directoryCare Quality CommissionOpen Government Licence
nearest.gpNorthern IrelandGP Practice List SizesBusiness Services Organisation (BSO), via Open Data NIOpen Government Licence
nearest.hospitalNorthern Ireland (major HSC Trust hospitals only)Hand-compiled from HSC Trust websites and nidirect - no single downloadable dataset of NI hospital locations was found (RQIA's register excludes GP practices and HSC-run hospitals)-n/a
nearest.schoolEnglandGet Information about SchoolsDepartment for EducationOpen Government Licence
nearest.schoolScotlandScottish School Roll and LocationsScottish GovernmentOpen Government Licence
nearest.bus_stopGB mainlandNaPTANDepartment for TransportOpen Government Licence
nearest.bus_stopNorthern IrelandTranslink Bus Stop ListTranslink, via Open Data NIOpen Government Licence
nearest.airportGB mainlandOurAirportsOurAirportsPublic domain
nearest.coastGB mainlandNatural EarthNatural EarthPublic domain
nearest.foodbankGB mainlandGive FoodGive FoodCC BY 4.0
nearest.defibrillator (public-access units only)GB mainlandThe CircuitBritish Heart FoundationNot stated
nearest.pharmacy, nearest.post_office, nearest.libraryGB mainlandOpenStreetMapOpenStreetMap contributorsODbL
utilities.electricityGreat Britain (14 GB licence areas, point-in-polygon); Northern Ireland hardcoded to its single distributor, NIE Networks (name only - NI has no MPAN-style distributor id)GIS Boundaries for GB DNO Licence Areas
2024-05-03
National Energy System OperatorOpen Government Licence
utilities.water, utilities.sewerageEngland & Wales (GIS boundaries); Scotland/NI hardcoded to the national supplierConstituency information: Water companies
v1.5, April 2024
Ofwat, via the House of Commons LibraryOpen Government Licence
utilities.broadbandGB & Northern Ireland (not Channel Islands or Isle of Man)Connected Nations data downloadsOfcomOpen Government Licence