Wednesday, 1 September 2010

Postcode based address lookup for your website without PAF

(Demo link below)

Ecommerce website developers like to make their websites as easy to use as possible. When a user places an order you can make it easier for them if they only have to type their UK postcode and then select their address from a list of relatively few property addresses that are based within any single postcode. In fact, this is what I needed for my website. This technology can also be used for data cleansing and related.

The Royal Mail controls and owns this database of 28 million addresses. It calls it PAF or Postcode Address File. It does resell this database but it is expensive and they make millions from it. There has been pressure on the tax payer subsidised Royal Mail to open up the database but nothing has come to fruition. There are companies that will charge for each individual search. This is often a good service but I hereby offer a PAF alternative for testing which is almost as reliable but for a fraction of the cost.

There was excitement in 2010 that it might be possible to bypass the Royal Mail and use the Ordnance Survey's data it has opened up in its new initiative. OS give you a full list of UK postcodes with its highly accurate latitude and longitude data. They also have opened up street level maps with town and street names. The problem is that although the postcode data is in a pure data format the maps have only been released in a raster format! It's theoretically possible to extract the street data using OCR (Optical Character Recognition) but early experiments by me using Google's open source OCR project Tesseract gives very poor results. I see no reason why OS can't release the data in some open raw data/point/vector format but they haven't. Maybe Royal Mail got to them. I have asked them on Twitter.

Please have a play with my demonstration script using a database which gives PAF-like results without using PAF.

Postcode based address lookup demo.

I expect to be happy to open up how this works and help many people quickly integrate postcode technology on their websites without getting their credit card out.

Please leave me some comments with exactly what you did and what you think. It's completely legal and not tied up in legal contracts. I may consider running it as an API service or releasing the code and database depending on your feedback. Or you might be interested in directly employing me for something like this.

3 comments:

max said...

Hi,

i would be interested in using this on my site.

how can i use it?

Max

Chris said...

Go to http://www.tabcat.co.uk/ and view the integration example. Thanks

Haven said...

Awesome article and nice blog,thanks to share.