Skip to main content

Postcode & Geolocation API for the UK

Search, validate and geolocate UK postcodes. Retrieve the latest administrative and geospatial information for postcodes

Open Source

MIT licensed. Maintained and freely available on GitHub. Fork it, make a contribution or even set up your own

Regularly Updated

Updated with the latest data from Ordnance Survey and Office for National Statistics when it becomes available

Convenient Methods

Simple, useful and self-explanatory API methods like bulk reverse geocoding, autocomplete and validation

API Endpoints

Lookup a Postcode

GET

api.postcodes.io/postcodes/

Bulk Postcode Lookup

POST

api.postcodes.io/postcodes

{
  "postcodes": [
    "OX49 5NU",
    "M32 0JG",
    "NE30 1DP"
  ]
}

Lookup Nearest Postcodes around a Point

GET

api.postcodes.io/postcodes?lon=

&lat=

Bulk Reverse Geocoding

POST

api.postcodes.io/postcodes

{
  "geolocations": [
    {
      "longitude": 0.629834723775309,
      "latitude": 51.7923246977375
    },
    {
      "longitude": -2.49690382054704,
      "latitude": 53.5351312861402,
      "radius": 1000,
      "limit": 5
    }
  ]
}

Nearest Postcodes around a Postcode

GET

api.postcodes.io/postcodes/

/nearest

Lookup Terminated Postcode

GET

api.postcodes.io/terminated_postcodes/

Lookup an Outward Code

GET

api.postcodes.io/outcodes/

Nearest Outward Code around an Outward Code

GET

api.postcodes.io/outcodes/

/nearest