PHP / Google Maps API - Easiest method to verify a street address and standardize / prevent duplicates?
What is the easiest way to do this? I've read Google Map API can't legally be used as an address verification service. What are some practical alternatives and/or respected开发者_Go百科 premium/pay-per-request services?
Address Validation API from '09 - Address validation using Google Maps API
I'm glad you asked this question.
UPS and USPS both offer free APIs for address verification.
However, USPS requires that you can only use their APIs if you intend on using their shipping service. UPS doesn't appear to have this restriction. The TOS looks fairly boilerplate and you aren't required to use them for shipping (although I'm not a lawyer so idk).
USPS Developer Kit - https://www.usps.com/business/webtools.htm?
UPS eCommerce APIs - https://www.ups.com/upsdeveloperkit?loc=en_US
List of 7 Address Verification Services - http://www.programmableweb.com/news/7-package-tracking-apis-rock/review/2014/08/26
It sounds like you are looking for a "live" address verification solution as opposed to a batch processing or "scrubbing" solution.
As for the "live" address verification services, you are correct that USPS (US Postal Service) requires you to use their delivery services if you use their API. UPS (United Parcel Service) is the same way. Here is a quote from their TOS (Terms Of Service)
"The UPS Systems and Information are to be used solely by Access User in connection with shipments tendered by, to or for Access User to UPS for delivery and for no other purpose."
There are quite a few different service providers available that license the USPS data and then allow you to use it WITHOUT the stated requirements. The USPS API is very complex and unless you are going to be using it A LOT, it might not be worth the investment to get it figured out.
In the interest of full disclosure, I'm the founder of SmartyStreets, we have an address verification API called LiveAddress.
精彩评论