Search code examples
databasepostal-code

UK Zip Code List - Nearest Five Zip List


Does anyone know of a free postcode CSV for UK? I have one for the USA but can't fined a UK equivalent.

I want to implement nearest Five kind of logic based on long, Lat.

Kindly let me know if any one is aware.

Regards, Jigar


Solution

  • It looks like you need to explore the Ordnance Survey OpenData dataset.

    The UK doesn't have zip codes; rather, it has postcodes, which are much more precise. For example the building where I work has a postcode to itself, BS1 2PH.

    Commercial organisations that validate postcodes use the Postcode Address File, which is commercially licensed (and expensive!), mostly as maintaining a per-premise address format is very time-consuming.

    In practice most Web sites. etc. use Web services such as Postcode Anywhere which aggregate and resell the data.