Skip to main content

Overview

Postcodes.io is a free, open-source postcode lookup API and geocoder for the United Kingdom maintained by Ideal Postcodes.

The API allows developers to:

  • Look up detailed information about UK postcodes
  • Reverse geocode coordinates to postcodes
  • Search for postcodes by partial string
  • Find nearest postcodes to a given location
  • Access associated data like administrative areas and demographic information

No authentication is required to use this API.

Quick Start

GET https://api.postcodes.io/postcodes/BR87RE
{
"status": 200,
"result": {
"postcode": "BR8 7RE",
"quality": 1,
"eastings": 551626,
"northings": 170342,
"country": "England",
"nhs_ha": "South East Coast",
"longitude": 0.178871,
"latitude": 51.411831,
"european_electoral_region": "South East",
"primary_care_trust": "West Kent",
"region": "South East",
"lsoa": "Sevenoaks 001A",
"msoa": "Sevenoaks 001",
"incode": "7RE",
"outcode": "BR8",
"parliamentary_constituency": "Sevenoaks",
"parliamentary_constituency_2024": "Sevenoaks",
"admin_district": "Sevenoaks",
"parish": "Hextable",
"admin_county": "Kent",
"date_of_introduction": "198001",
"admin_ward": "Hextable",
"ced": "Swanley",
"ccg": "NHS Kent and Medway",
"nuts": "Sevenoaks",
"pfa": "Kent",
"codes": {
"admin_district": "E07000111",
"admin_county": "E10000016",
"admin_ward": "E05009960",
"parish": "E04012394",
"parliamentary_constituency": "E14001465",
"parliamentary_constituency_2024": "E14001465",
"ccg": "E38000237",
"ccg_id": "91Q",
"ced": "E58000739",
"nuts": "TLJ46",
"lsoa": "E01024445",
"msoa": "E02005087",
"lau2": "E07000111",
"pfa": "E23000032"
}
}
}

Data

DatasetRelease Date
ONS Postcode DirectoryFebruary 2025
OS Open NamesJanuary 2025
Scottish Postcode DirectoryJanuary 2025
note

Beyond the dates listed above, please be aware that the real-world dataset may change. Existing postcodes and places may be amended or discontinued. This information will not be captured until the next available update.

Endpoint

All services can be accessed from the following subdomain:

https://api.postcodes.io

The API accepts GET and POST requests. POST methods use content type application/json.

Data Extraction

The Postcodes.io application and database are packaged as Docker images for rapid local deployment and data extraction.

To perform one-time data extraction tasks using SQL, see our local data extraction guide.

Error Handling

To check for errors, examine the HTTP response code. 200 response indicates success while any other code will provide important information about why an error occured.

Alternatively, you can examine status code in the 'status' property in the result body.

Versioning

The API currently does not use any form of versioning. Any changes to the API will be backwards-compatible, this includes: adding new properties to responses, adding new endpoints, adding new optional request parameters and changing the order of properties.

If we make backwards-incompatible changes in the future, this will be released under a versioned endpoint.

Support

Email: [email protected]

GitHub

For bugs and feature requests use our GitHub issue tracker.