Postcodes.io is an open-source HTTP API for querying UK postcode and geolocation data. It serves information derived from datasets including the ONS Postcode Directory, Ordnance Survey Open Names, and the Scottish Postcode Directory. Developers can retrieve administrative and geographic details for individual postcodes and outward codes. The API also supports postcode search, autocomplete, reverse geocoding, nearest-postcode queries, and lookups for terminated postcodes. Bulk endpoints allow multiple postcode or coordinate queries to be processed together. The service runs against a prebuilt PostgreSQL/PostGIS database supplied by a separate data pipeline. It can be used through the public API or self-hosted locally with Docker.
Features
- Individual postcode and outward code lookup
- Postcode search and autocomplete
- Reverse postcode geocoding
- Nearest postcode discovery
- Terminated postcode lookup
- Bulk postcode lookup and reverse geocoding