Postcode & Geolocation API for the UK

Free, Open Source and based solely on Open Data

An Ideal Postcodes open source project

Open Source

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

Updated with ONSPD data

Regularly Updated

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

Postcode lookup

Convenient Methods

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

API Endpoint & Methods

Lookup a postcode

GETapi.postcodes.io/postcodes/Request

Bulk lookup postcodes

POSTapi.postcodes.io/postcodesRequest

Get nearest postcodes for a given longitude & latitude

GETapi.postcodes.io/postcodes?lon=&lat=Request

Bulk Reverse Geocoding

POSTapi.postcodes.io/postcodesRequest

Get a random postcode

GETapi.postcodes.io/random/postcodesRequest

Validate a postcode

GETapi.postcodes.io/postcodes//validateRequest

Nearest postcodes for postcode

GETapi.postcodes.io/postcodes//nearestRequest

Autocomplete a postcode partial

GETapi.postcodes.io/postcodes//autocompleteRequest

Query for postcode

GETapi.postcodes.io/postcodes?q=Request

Lookup terminated postcode

GETapi.postcodes.io/terminated_postcodes/Request

Lookup Outward Code

GETapi.postcodes.io/outcodes/Request

Nearest outward code for outward code

GETapi.postcodes.io/outcodes/Request/nearest

Get nearest outward codes for a given longitude & latitude

GETapi.postcodes.io/outcodes?lon=&lat=Request