Consuming raw or undercooked cookie dough may increase your risk of foodborne illness.
What is an address API?
An address API is an application programmatic interface (API) that processes postal addresses.
There are different kinds of address APIs. Some of the more common types of address APIs validate, standardize, or normalize address data. Others will look up addresses in official databases (like the USPS address database). And still others will look up ZIP Codes or append ZIP codes to other address data.
In this article we'll discuss the following:
An address validation (or verification) API will programmatically check to see if an address is contained in an official address database. If the adress that is being check is found to exist in the official database, then that address is "valid". The nice thing about using an API to verify addresses is that you can validate a lot of addresses very quickly. In fact, SmartyStreets can validate up to 100,000 addresses per second.
Many countries have official address databases. For example, Canada has Canada Post, the UK has Royal Post, France has La Poste, Germany has Deutsche Post, etc. Each of these official databases contain all of the officially recognized postal addresses in the respective country. And, many of these countries provide access to their databases via an API.
For addresses in the United States, the USPS manages the official address database for the country. And, they make all of the information in that database accessible by using an API. But, their own API leaves a lot to be desired.
Fortunately, they do allow third-party suppliers to create their own APIs using the official USPS data. And thankfully, they often provide that same data in a much more efficient and robust manner than the USPS does.
It is also worthwhile to note that although the USPS processes mail going to international addresses, it does not offer an international address validation api.
Another big name in addresses is of course, Google. Most people have heard of Google Maps. And naturally, if Google does addresses on maps, they must do address validation too. Right?
Actually, No. Not really.
Many people think that you can do address validation using Google Maps API. But, Google doesn't actually validate addresses that you submit to them; meaning, Google does not check the address against the official address database of the country that the address is located in.
What they actually do is provide you their best approximation of where an address might be IF it existed.
Another thing most people don't realize is that using Google Maps API comes with a condition. You can use their API for free in most cases, but you must:
That's right. If you use the Google Maps API you must:
Even though the Google Maps API is free, it does not actually validate addresses, AND it comes with some pretty restrictive terms of service.
So, if real address validation is what you need, you may want to read our review on how to choose an address validation provider. It can help you choose the best address validation api for your needs.
Address standardization is "the process of changing addresses to adhere to USPS standards." Or, in countries outside of the United States, it is the process of modifying addresses to adhere to the official postal format of the country in which the address is located.
For address standardization, Google really can't help you.
Not only does Google not check an address against an official address database of a country, they do not modify that address to conform to the official postal format of the country. So, if you want to standardize an address, you either need to use the official address APIs of various countries (i.e. USPS, La Poste, etc), or you need to use a third-party address validation service. Most address validation services also standardize addresses as well.
ZIP Code APIs can peform a multitude of functions. They can verfiy that an address has the proper ZIP Code affixed to it. They can append a ZIP Code to an incomplete address. They can augment an address's ZIP Code by adding ZIP +4 data to the address, and much more.
Because ZIP Codes are only used in the United States, a true ZIP Code API will only provide ZIP Code data for addresses located in the US. However, many people mistakenly use the term "ZIP Code" to refer to "postal codes" in countries outside the United States. Consequently, many address validation services also provide postal code data for addresses outside of the United States, just like they provide ZIP Code data for US addresses.
Among the various address APIs it offers, the USPS also offers a ZIP Code lookup API. This API will return the ZIP Code and ZIP Code +4 that corresponds to a given address. It will also provide this data for a given city and state combo.
The benefit of using this API is that it's free! The downside to using it is, that it suffers from the same downfalls that almost all of the USPS APIs struggle with.
It is poorly documented, which can make implementation dificult. Also, it is not really supported. So, when you encounter a problem that is not covered in the inadequate documentation, you're going to have a hard time actually speaking with someone at the USPS who can actually help you fix the problem. And that's if the problem is on YOUR end. Because guess what? Just like all of the USPS APIs, the ZIP Code API struggles with frequent downtimes.
And, on top of all this, it can only process up to 5 lookups per request. When it's working of course.
While Google's Geocoding API can be used to look up ZIP Code info, it still comes with the same problematic terms of service that we mentioned in the address validation section of this article.
Unless your needs for a ZIP Code API also allow you to display a map, and give full logo and copyright notices, you're better off using a different ZIP Code API provider.
Just as the name suggests, an address autocomplete API automatically suggests addresses as a user is typing. The most common use case for this application is when someone is completing an order form of some kind.
An address autocomplete API can be useful for a number of reasons. One of those reasons is quality control. If a user sees their address being suggested as they type it in, they are more likely to click on their own, correct address.
Because the address that is being suggested has already been properly formatted and validated, when the user clicks on it, that data enters the company's database correctly, the first time. This can save a lot of time and money by avoiding shipping and/or mailing things to the wrong address.
Another benefit of using an autocomplete API is that it saves time. And, if a user spends less time typing things into an order form, the risk of shopping cart abandonment is also lowered.
But remember, Google does not validate addresses
So, one of the problems with using their API is that it doesn't do what most people think it does. Since Google doesn't validate addresses, the addresses that are suggested via its autocomplete API are not necessarily valid.
Why is that a problem?
Well, if you're using the autocomplete feature to help reduce the number of invalid addresses that users enter into your system, and Google doesn't validate addresses, you could still be getting invalid data put into your system, even if you're using Google's autocomplete API.
Another problem with Google's address autocomplete API is that it has the same restrictions as mentioned previously in this article, namely:
"Customer will display all attribution that (i) Google provides through the Services (including branding, logos, and copyright and trademark notices); or (ii) is specified in the Maps Service Specific Terms."
So, if you're looking for a subtle autosuggest experience for your users, Google will not provide that for you.
The SmartyStreets autocomplete API also suggests addresses for users as they are typing. So what are the main differences between the Google autocomplete API and the SmartyStreets API?
First of all, SmartyStreets DOES validate addresses, Google does not. Secondly, SmartyStreets does not have oppressive attribution requirements.
So, if you're wanting a better UX for your users, you might want to give SmartyStreets free Autocomplete API a try.
Geolocation is the the process of identifying the real-world geographic coordinates of a specifc location. Therefore, a Geolocation API would allow its users to programmatically identify the geocodes of a specific location, depending upon the input it receives.
One of the more common uses of a geocoding API is to convert postal addresses into lat long coordinates, also known as 'geocodes'.
For example, here is the postal address:
543 S State St Salt Lake City UT 84111-3521
By entering that address into the SmartyStreets address validation demo, we see that the corresponding geocodes are:
Latitude: 40.75745 Longitude: -111.88767
By using a geoclation API to convert addresses into geocodes, we can quickly identify the lat long coordinates of thousands of addresses. This can be useful for a number of applications.
Google Maps API can be used to find the geocodes of addresses.
One thing that Google is known for, of course, is Google Maps. And Google Maps has pretty much become the default way of finding your way around places. How many of us have used Google Maps to give us driving or walking directions to some place?
Google Map's ability to find a specific location is based on their use of geocodes. In fact, when you enter an address into Google Maps, it will automatically convert that address into to the address's corresponding lat long coordinates, or geocodes. Those coordinates are then used to navigat you to your desired destination.
And, if you want to convert LOTS of addresses into geocodes, Google Maps API can help you do that quickly.
Just keep in mind that when you're using their API, you have the same usage limitations and citation requirements that we discussed previously in this article.
So, if you can accomplish your project while giving full citation and displaying a map with your results, then the Google Maps API may be a good geocoding solution for you to consider.
The SmartyStreets Address Validation API can also be used to find the lat long coordinates of an address, as shown in the previous example.
In fact, the SmartyStreets Address APIs can be a great option for you to consider as well.
So what are the benefits of using the SmartyStreets API for geocoding vs the Google Maps API?
Already have an account? Log in.