views:

3487

answers:

6

I have a task to validate addresses entered into a system I am currently creating. The system requires that address entered are validated against a valid data source. In the UK the dataset comes from the Royal Mail and is expensive to access.

The data needed is post code info for the whold of europe to start with accessed by an API into the web application.

There are a number of companies that offer this service,

  1. QAS
  2. Capscan
  3. Postcode anywhere

These all offer the service I require. However this is expensive and in some cases not a complete data set. e.g. not Ireland

I was also wondering if there would be a way to utalis the google maps API to validate this data via postal code and country.

Would the google maps method be possible or do I have to go down the line of one of these expensive companies? Any thoughts on what line I should take.

+5  A: 

The answer probably depends how critical it is for you to receive support and possible customization for this service.

Google can certainly do this. Look into their XML and Geocoding API's. You should be able to craft an XML message asking Google to return Map coordinates for a given address. If the address is not found (invalid), you will receive an appropriate response. Here's a useful page: http://code.google.com/apis/maps/documentation/services.html#XML_Requests

Note that Google's aim in providing the Maps API is to plot addresses on actual maps. While you can certainly use the data for other purposes, you are at the mercy of Google should one of their maps not exactly correspond to your legal or commercial address validation needs. If you paid for one of the services you mentioned, you would likely be able to receive support should certain addresses not resolve the way you expect them to.

In other words, you get what you pay for ;) . If you have the time, though, why not try implementing a Google-based solution then going from there? The API looks pretty slick, and it's free, after all.

tehblanx
A: 

Thanks for this answer it is as I imagined. Because of the nature of the application I will most probably have to go down the route of the paid for service.

I will also experiment with the google API though as the maps always look flashy on a site!!

Paul
+5  A: 

Google's geocoding api would seem to do want you want, but unfortunately this use also appears to violate the api's terms of service. Specifically, the stipulation that you may not

10.12 use or display the Content without a corresponding Google map, unless you are explicitly permitted to do so in the Maps APIs Documentation, the Street View API Documentation, or through written permission from Google (for example, you must not use geocodes obtained through the Service except in conjunction with a Google map, but the Street View API Documentation explicitly permits you to display Street View imagery without a corresponding Google map); or

fgregg
@fgregg: slightly off topic, but do you think saving the driving distance between 2 points is against the ToS? provided that clicking a nearby link will actually show a google map?
Mark
+5  A: 

I am both a web developer and a former employee of one of the companies you mentioned. I completely understand where you're coming from. Verifying addresses seems like a simple problem to tackle, but it's very much an iceberg. I suppose one workaround to the legal constraints of the Google or Yahoo! Maps APIs is to request your users verify their addresses on a map. If I were in your shoes, though, I wouldn't go that route.

The reason address verification services are so expensive is that they require licenses and ongoing relationships with grumpy, bureaucratic postal authorities (including the Royal Mail). Unfortunately, postal authorities are the best (and often the only) sources of data against which to verify addresses, so there really isn't any other way to go about it. The bottom line is you need to weigh the cost of bad addresses (usually a question of mail volume) against the cost of the software to verify them. Irish postal data is even more rubbish than Irish postal formats (which frequently omit building numbers), so there's little you can do about those addresses.

Adam
A: 

Validate it against FedEx's api. They have an API to generate labels from XML code. The process involves a step to validate the address.

Alexandre H. Tremblay
A: 

Google basis (free) does not provide address verification (Geocoding) as there is no UK postcode license.

This means postcode searches are very in-accurate. The proximity search is very poor, even for town searches, often not recognising locations.

This is why Google have a premier and a enterprise solution which still is more expensive and not as good as business mapping specialists like bIng and Via Michelin who also have API's.

As a free lance developer, so serious business would use Google as the system is weak and really provides a watered down solution.

Andrew Stacks