Address validation using Google Maps API - api

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 whole of europe to start with accessed by an API into the web application.
There are a number of companies that offer this service,
QAS
Capscan
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 utilize 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.

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.

Google's geocoding api does what want you want. As Xerus points out, as long as you are not using the geocoded points on a non-google Map, you should be good (terms of service). Specifically,
3.1 Use without a Google Map. Customer may use Google Maps Content from the Geocoding API in Customer Applications without a corresponding Google Map.
3.3 No use with a non-Google map. Customer must not use Google Maps Content from the Geocoding API in conjunction with a non-Google map.

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.

The answer depends upon the degree of confidence you place in the data and how your data is being used. For example, if you're using it for mailing or shipping, you'll want to be be confident that the data is correct. If you're just using it as another fraud-prevention mechanism then you could potentially allow a degree of error to creep into the data.
If you want any degree of real accuracy, you're need to go with a service that does real address verification and you're going to have to pay for it. As has been mentioned by Adam, address verification and validation at first seems simple and easy, but it's a black hole fraught with challenges and, unless you've some underlying data to work with, virtually impossible to do by yourself. Trust me, you're actually saving money by using a service. You're welcome to go down this road yourself to experience what I mean, but I can guarantee you'll see the light, so to speak, after even a few hours (or days) of spinning your wheels.
I should mention that I'm the founder of SmartyStreets. We do address validation and verification addresses and we offer this for the USA and international as well. I'm more than happy to personally answer any questions you have on the topic of address cleansing, standardization, and validation.

Another option is YADDRESS.

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.

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.

I know that this post is a bit old but incase anyone finds it still relevant you might want to check out the free geocoding services offered by USC College. This does included address validation via ajax and static calls. The only catch is that they request a link back and only offer allotments of 2500 calls. More than fair.
https://webgis.usc.edu/Services/AddressValidation/Default.aspx

You could consider using CDYNE's PAV-I API that validates international addresses. international-address-verification They cover over 240 countries, so it should cover all of the countries that you are looking to validate for.

A great blog describing 14 address finders:
https://www.conversion-uplift.co.uk/free-address-lookup-tools/
Many address autocomplete services, including Google's Places API, appears to offer international address support but it has limited accuracy.
For example, New Zealand address and geolocation data are free to download from Land Information New Zealand (LINZ). When a user search for an address such as 76 Francis St Hauraki from Google or Address Doctor, a positive match is returned. The land parcel was matched but not the postal/delivery address, which is either 76A or 76B. The problem is amplified with apartments and units on a single land parcel.
For 100% accuracy, use a country-specific address finder instead such as https://www.addy.co.nz for NZ address autocomplete.

Related

How to get a rout information with trafic flow information included for a past date?

I am trying to use Azure Maps API. It will be nice to have route information which should include the locations of course and a speed profile. As you can understand speed profile is not an east one. Free flow speed profile is ok. But we want to simulate real-world conditions meaning that we want to select date and time of departure to get accurate speed information as close to as possible to a real world traffic influence.
Is there any feature that Azure provide this? If not, which API can provide this
I don't have any code at this moment to show since ı don't know which API to use.
Historical traffic data is not currently available in Azure Maps but is being investigated as a potential future feature.

Get social share count for Asian social networks (QZone, Renren & Mixi)

I'm trying to get the share counts for any (or all) of the social networking sites QZone, Renren & Mixi. The counts are being fetched server-side so I was hoping for some kind of API but I don't speak Chinese or Japanese so I'm having trouble finding the right information.
Any pointer in the right direction would be very much appreciated as my searches so far haven't yielded anything useful. Thanks!
Requests for offsite resources are off-topic for stackoverflow - however a quick look found http://dev.renren.com which is usable via online translation eg google translate and has a full API. The best place to ask would be a developers group for mostly Asia based developers.
I'm not really sure what you are trying to do and if you already have functionality to share to those networks or not, if not then many of the third party sharing services provide that and will do the share counting for you eg add this, add to any etc. I understand that some sites based in Asia are restricted by country of origin so signing up for a test account must is restricted to mobiles registried in specific countries, anonymous and open to all it is not.

The Geocoding api returns a wrong location for a pincode, but Google maps returns right location

I used the pincode (400036) in the geocoding webservice, but got a location in China. The webservice is shared below.
http://maps.google.com/maps/api/geocode/json?address=india&components=postal_code:400036&sensor=false
Ideally it should be a location in Mumbai (Bombay) in the state of Maharashtra, India.
Any ideas why this could occur?
Also, any other parameters that can be passed to make this particular pin code work?
Thanks and regards,
Anand
P.S.: I'm a Business Analyst, so my technical know-how and command of programming languages is pretty limited. However, I'll be most happy to receive help from the community here and pass it on to my dev team. Thanks.
Geocoding and working with real-world data is hard, and not even the great Google (no sarcasm, I'm a fan) gets it right all the time. Apparently there is a software or data bug in the Google API, since this works (added Country India to the component filter):
http://maps.google.com/maps/api/geocode/json?components=postal_code:400001%7Ccountry:IN&sensor=false
But this does not, and is not even filtering by country because it still returns Chinese results:
http://maps.google.com/maps/api/geocode/json?components=postal_code:400036%7Ccountry:IN&sensor=false
If you're a paying customer, you can contact Google for support here: http://www.google.com/enterprise/portal
You can use http://geoanalyzer.in for this. Google maps and google api are slighly different as Google Maps shows you results from both Google Maps API and also from Google places hence a lot of time you get wrong data in case of Google Maps API. Geo Analyzer solved this and has been built specifically for Indian addresses.
This is one of the few available solutions that is targeted for Indian address system complexity. I hope this will help.

MelissaData Replacement?

We currently use MelissaData to scrub our addresses. We have been pretty unhappy with the product and the support in general (considering how expensive they are). Can anyone recommend a good replacement? We want a product that we can download the database and don't want to use any web service type of calls to do the address scrubbing.
In order to have a complete address database, you will need to get it from the source, which in the United States is the US Postal Service. Once you have their data, you will need to parse it into a format that is usable. This is not a simple task since the USPS stores the data in their own proprietary format and the documentation is often "less than helpful". It literally can take years to refine your algorithms to handle all of the wacko edge cases that street addresses have. However, that would allow you to keep the data local instead of calling a webservice. You will need to license from the USPS their ZIP+4 data, and then be prepared to integrate new date each month as it is released. If you are going to scrub your addresses for mailing with the intention of obtaining mailing discounts, you will also need to go through the process of becoming CASS-Certified by the USPS. (This is not a task for the faint of heart, and not a quick process--As I mentioned earlier, it can take years to perfect.)
If your core operations are address verification, it is probably worth it go down that road since the time you spend developing your custom application will support your business. However, if you are not in the address verification business and would prefer to do other things rather than jumping through USPS certification and maintenance hoops, I recommend finding an address verification provider whose workflow will integrate nicely with your requirements. This will allow you to focus on what you do best instead of trying to reinvent the wheel.
In the interest of full disclosure, I am the founder of SmartyStreets. We provide street address verification.
A good replacement is CODE1 from the postal division of the USPS.
CODE1 will have to be installed on the SQL server - something that has to be considered when using this.
Also, to update the db it needs to run a DTSx package nightly, weekly or quarterly depending on how often you wish to update the addresses.
I would recommend trying ZP4 from www.SemaphoreCorp.com. The product and web site have an older look to them, but they've been doing this for years, and it's only $99 for a disc. No, I don't work for them or get any compensation, but I work for GreatData.com (we sell primarily 5-digit ZIP Code products) and have recommended them to lots of clients over the years and haven't heard any complaints.

Design an API for a web service without "selling the farm"?

I'm going to try to phrase this as a generic question.
A company runs a website that has a lot of valuable information on it. This information is queried from an internal private database. So technically, the information in the database is the valuable part.
If this company wished to develop an API that developers could use to access their database of valuable & useful information, what approach should the company take?
It's important to give developers what they need. But it is also important to keep competing websites from essentially using the API to steal everything and essentially steal all traffic from the company's website.
Is there was some way the API could be used in a way that drives traffic back to the original company's website somehow? Something that gives users a reason to keep going there.
This is a design consideration that my company is struggling with that I can imagine other web-based services have come across before.
Institute API keys - don't make it public. Maybe make the signup process more complex than "anyone with an e-mail address".
Rate limit the API based on keys. If you're running more than X requests a minute, you're likely mining the database.
Don't provide a "fetch everything" API. Make the users know something to get information on it. Don't reveal what you know.
I've seen a lot of companies giving out API keys and stating a TOS that all developers must adhere to. For example, any page that uses data from the API must include your logo and a link back to your website. If any developer is found breaking the rules, the API key can be cancelled and your data is safe again.
Who is meant to use the API?
A good general method of solving this problem is to limit access to the data to end users (rather than allow applications or developers at it). Provide applications and users with identification, each, and make sure that to access a subset of the data, a combination of both user and application key is required.
Following this pattern, each user will have access to a very limited subset of the data (presumably, the data that they require for their own specific use), and you can put measures in place to enforce this. Any attempts at data-mining will become obvious.
This type of approach meshes well with capability-type security models on the server side.