views:

61

answers:

4

I'm working on a API that will accept addresses in searches. We would like to use Google's geocoding service to normalize the addresses before submitting the search criteria to our search engine.

This caught my attention: http://code.google.com/apis/maps/documentation/geocoding/index.html#Limits

"Note: the Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited. For complete details on allowed usage, consult the Maps API Terms of Service License Restrictions."

Does this mean we can't use the Geocoding service for this purpose? Having used libraries that access Google's geocoding service before, I know it's technically possible to do this but it sounds like a violation of the terms of service.

Are there other options for what we're trying to do?

+2  A: 

You are correct: you can't use the Google Geocoder for address cleaning.

You can use this wrapper to access USPS's Web Tools.

Another inexpensive solution is Semaphore, but you'll have to write your own wrapper class to call the DLLs.

Brad
Using the API is SO much cleaner than using a wrapper for a web form. Plus, we've been told using the API that the USPS is pretty sensitive about how it receives requests. If the same IP address is bombing their webform, be sure they'll likely be looking into it.
bpeterson76
@bpeterson, the sample project I referenced isn't a wrapper for a webform; it is an object-oriented wrapper for the web service. I have made my own alterations to this project to address some of its flaws, but I've yet to use it. If there is another API (other than the web service), I'm unaware of it.
Brad
+1  A: 

Short answer: You can't. The terms of service seem pretty clear-cut that geocoding using their API is not in line with their terms, unless you display them on a Google Map.

If you need this for other purposes, you should consider licensing a Geocoding library and dataset(s) for your regions of interest. There are quite a few companies which sell these for commercial purposes.

Reed Copsey
+1  A: 

The USPS has a free service to validate addresses. It's in a fairly easy-to-use API that you can curl information to and receive a valid response back. The only rub is that they're a little slow when it comes to registering, and they require you to run several tests before they'll open it up. Regardless, once you've jumped through the hoops, it does a great job. It's been keeping addresses in my app clean for quite a while now without any hiccups.

bpeterson76