Postcodes.io
UK postcode & geolocation API, serving up open data
...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.