Need to find latitude and longitude of postcodes and store into my database

phpNutt picture phpNutt · Apr 15, 2010 · Viewed 9.5k times · Source

I’ve got a database full of UK Postcodes, now I’d like to be able to store the latitude and longitude of these specific postcodes along with the record with the database. Is there any way that I can obtain this data free without violating any T&C's?

I know I could do this using Google maps API for each postcode, but I have way over 20,000 postcodes in this database and to get the lat and lng for each of these postcodes each time is not an option really.

Thanks in advance, M

Answer

Ben picture Ben · Jan 20, 2012

Postcode location data is available free now. See this answer:

https://www.ordnancesurvey.co.uk/opendatadownload/products.html

The one you want is "Code-Point open".