Address autocomplete | What it is & how to use it
Address Autocomplete is a form checkout feature that automatically suggests street addresses while someone types. If you apply this functionality to your processes, it reduces the amount of time your customer spends filling out forms by minimizing the necessary keystrokes for completion. It also prevents typos, misspellings, and incomplete addresses at the point of entry to improve conversion rates, fulfillment quality, address reliability, and user experience for your business.
How do you get address autocomplete in your processes? You implement an address autocomplete API. The next question you're asking yourself is, “What's an address autocomplete API?” 🤔
An address autocomplete API is an application programming interface (API) that provides developers with rules, protocols, and tools to enable type-ahead address search functionality within applications. As your customer starts typing, the API sends queries with each keystroke to provide relevant real-time address predictions.
Customers love the added ease of quickly choosing their address from a list of local addresses, and your business benefits from a clean and accurate database to support super-efficient operations.
Try Smarty's user-facing demos and the US Address Autocomplete and International Address Autocomplete APIs here. 🤩
US Address Autocomplete | International Address Autocomplete | See the Documentation |
---|---|---|
Before you implement the first address autocomplete API you find, let's learn all the ins and outs of what makes the ideal address autocomplete solution. In this article, we'll discuss the following:
- What is address autocomplete? (again)
- 6 considerations for choosing a US autocomplete API
- Best address autocomplete API providers
- Autocomplete API example
- Autocomplete cost
- Conclusion checklist
What is address autocomplete?
As mentioned, address autocomplete is an application feature that suggests street addresses when a user is typing. The optimal solution can:
- Streamline user input time and effort, reducing friction at checkout.
- Lower cart abandonment rates by minimizing shopper fatigue.
- Eliminate typographical errors (misspellings, typos, etc).
- Improve operational efficiency.
- Reduce costs and returned packages.
- Enable businesses to provide accurate shipping estimates.
- Retain customer loyalty.
- Standardize addresses to the local postal authority format.
- Validate and verify that an address is accurate and mailable.
- Enhance address data quality by limiting invalid entries.
6 Considerations for developers who use an autocomplete API
So, you've decided to use a US address autocomplete API in your website, form, or project. Great choice. 👏
To get the most out of any address predictive fill, you'll want to make sure your API:
- Uses geolocation
- Provides secondary unit designators (apartment numbers)
- Handles PO Boxes, APOs, FPOs, DPOs
- Standardizes & validates
- Provides only real addresses
- Includes non-USPS addresses
The 6 considerations above are the current standards for an address autocomplete API. We created a free guide that outlines a cutting-edge, revolutionary autocomplete method for high-speed form filling. This innovative approach allows your customer to select their real and accurate address without typing a single keystroke! It doesn't get any faster than that. 🏃💨
#1: Geolocation
The goal of any address autocomplete solution is to make entering an address quick, easy, and accurate. In addition to producing addresses in real time (which every autocomplete address solution does, or at least the ones we've tried), an effective way to do this is to use an autocomplete tool with a geolocation feature.
The geolocation feature estimates your customer's location using their IP address (a unique number linked to their online activity). When this location data is incorporated into the autocomplete tool, it prioritizes addresses closest to your customer's estimated location when they type. If the nearest suggestions aren't selected, the range of suggested addresses expands.
Note that if your customers use VPNs, the autocomplete may take longer to populate their correct addresses.
Suggesting addresses near a customer's location helps them choose their correct address faster. If you choose an address autocomplete API that can't geolocate, your customer has to enter more characters before their address appears. Each unnecessary keystroke adds time to complete a form or checkout, which increases the probability of typos and makes it more likely for your customers to abandon their cart. 😢
Let's paint the picture of why using an address autocomplete with a geolocation feature is essential.
In the US, hundreds of thousands of addresses contain "151."
As you narrow the search to only within a state, thousands of addresses still contain "151." However, once the options are within a city, only a handful of addresses may include "151." Hang with us; we're getting there.
Imagine a customer typing an address into a form, and your autocomplete API includes a geolocation feature. The autocomplete software notes their IP address, and when they enter "151," the API returns addresses containing "151," with the closest options to their location prioritized first.
Customers can see and select their correct address in just 4 to 5 keystrokes, compared to the 40-50 characters needed to manually enter a typical US address. Providing geolocation as an autocomplete feature saves significant time and effort, enhancing the overall experience with your company. 👍
#2: Secondary unit designators (apartment, suite, or unit numbers, etc)
Autocomplete tools typically provide a location's main address, known as the primary address. However, many options don't include secondary addresses or unit designators, such as apartment numbers, suite numbers, and floor numbers.
It's important to note that it may not be as helpful for your customers if you only have the address of a larger complex like an apartment building or business park without the specific apartment, suite, or unit number. Without this detailed information, they might not receive accurate suggestions, and if they have to enter the details manually, there's a higher chance of errors and cart abandonment. 🤨
An API that can suggest and complete primary and secondary addresses can prevent forgotten, incorrect, and mistyped unit numbers. Forms with the autocomplete capability for secondary addresses reduce lost and returned mail and help block flawed or incomplete addresses from entering your system. Additionally, it lets your customers know that you prioritize their needs.
Do you want pinpoint accuracy or “just close enough” from your address autofill API? If you need to determine the distance from the nearest National Park, close enough accuracy should be sufficient. But if you need precise accuracy for tasks like delivering food, routing technicians, or providing homeowner's insurance quotes, you'll want to use an address autocomplete that provides pinpoint accuracy.📍
Here's an example. Let's say a customer enters their address as 233 S Wacker Dr, and then the autocomplete address tool pops up with suggestions.
The address seems correct, right? However, in this case, it would be incorrect. Here's the twist: the address belongs to the famous Willis Tower (formerly Sears Tower). This street address has the following valid mailing options:
- 6 addresses for floors
- 284 addresses for suites
- 598 addresses for units
- 9 addresses for the lobby
If your customer needs to receive a delivery at a building with 800 valid secondary addresses, you'll need an address autocomplete API that includes all of them.
Storytime! 📖
Meet Peter. 👨He works in unit 6083 and stumbles upon your website. He finds your best-selling inflatable unicorn horn for cats, and a wide grin spreads across his face. Peter can see it now. This horn will be the final touch on the wizard ensemble he's been refining since losing to Janice's handmade pumpkin costume last year.
Peter spent many nights sewing an elaborate cloak and crafting a tall, vegan leather hat to really impress the judges this year. He adds the horn to his cart and envisions Potion (his Tabby cat) as his perfect magical sidekick. Winning “best costume” feels within his grasp.
Peter quickly goes to checkout and selects (what he thinks is) his address from the autofill suggestions your company has provided. In his excitement, he fails to notice the address options don't include his unit number (or any other secondary unit designators).
Peter gets notified when the unicorn horn ships, and up until the day before the contest, he's confident it'll arrive in time.
But it doesn't. In fact, it never arrives at all. 🫢
With tears in his eyes, Peter angrily leaves you a 1-star review (he'd leave no stars if he could). He turns to his large social media following and pleads for help, spreading the word that no one should shop with your company—ever—again!!
This is obviously a dramatic example, but with nearly 25% of US addresses containing apartments, units, suites, and other secondary unit designators, if you're sending anything directly to a location, providing accurate and complete addresses is vital for customer satisfaction and your brand's reputation.
Unfortunately, many autocomplete API providers don't suggest secondary unit designators in their addresses. They only provide primary addresses at street level or house number level. If you choose to use one of these APIs and have a customer who lives in a basement apartment, they're out of luck. 🤷
Test out some apartment numbers (or any other secondary unit designator) in your autocomplete API options before you commit to make sure you can provide accurate and deliverable addresses to your customers.
#3: PO Boxes, APOs, FPOs, DPOs
An additional concern related to the handling of secondary unit designators is how an autocomplete API addresses PO Boxes (POBs), army post offices (APOs), fleet post offices (FPOs), and diplomat post offices (DPOs). Considering that there are 21 million PO Boxes in the US, how autocomplete API tools address (pun intended) this issue can significantly impact your revenue.
Address providers that offer type-ahead suggestions stop providing suggestions after users enter a PO Box number. It's as if they're saying, "Don't touch me with that hot garbage." The big question is: why? These APIs only focus on mapping services, so they don't prioritize providing all the deliverable addresses or mailing points a customer might want to ship. 📦
To get the highest return on your address autocomplete solution, you'll want to test some addresses that include PO Boxes, APOs, FPOs, and DPOs in any prospective autocomplete APIs.
#4: Standardization & validation
Another critical issue to consider when evaluating an autocomplete address API is whether it standardizes (correctly formats) and validates (ensures addresses are real and accurate while fixing any typos and/or adding any missing information) according to the country's official postal format.
Take this example:
You see 5 PO Boxes' address suggestions from a commonly-used address autocomplete provider. Not one of the 5 suggestions is shown using the same format. Someone selecting any of these addresses will most likely experience a delivery delay.
According to USPS.com, “The delivery address is the most important information on your mailpiece.” Most delivery services use automated mail processes. If their machines can't read an address because it's not in the standardized format, the shipped item will be delayed, misrouted, or lost. Yikes. 😧
Here's what a PO Box address should look like when it's returned from the autocomplete API in the correct format.
All the addresses are in the correct USPS standard format with valid PO Boxes. You can send a package there, and the PO Box owner will definitely receive it.
When you use an address autofill service that standardizes and validates every address offered to your customers, you'll keep your database clean and confidently ship your product wherever it needs to go.
Your customers will receive their items, and you'll reduce lost, undeliverable, and returned packages. Your operations, inventory, customer service, and database teams will do a happy dance! Instead of communicating with angry customers and reshipping products (this time to the right address), your teams will complete actions that actively contribute to the bottom line, increasing productivity and ROI. 📈
#5: Providing only real addresses
Many assume that every address autocomplete API contains only real, valid shipping addresses, but that's not true. Some APIs provide inaccurate addresses because their logic is based on where an address would hypothetically be located… if the address did exist.
For example, here is a valid address:
30 Knole Lane Dennis MA 02638-2009
When the customer's finger slips and accidentally hits the "4" key instead of the "3," the address is entered as 40 Knole Lane. While it looks correct in the system, the problem is that this new address doesn't actually exist.
Knole Lane in Dennis, MA, has only two valid street addresses. The two house numbers that actually exist on this street are 30 and 33.
If an address autocomplete tool ignores house numbers in favor of applying plausible address logic, the wrong address won't be corrected but will displayed as a valid option like this:
Not only does the tool fail to suggest a real address, but it also falsely confirms an address that doesn't legitimately exist. If your address autocomplete solution allows for false positives like this example, you'll have to deal with the same operational and customer satisfaction issues previously mentioned. 😖
#6: Includes non-USPS addresses
In the United States, a non-USPS address (sometimes known as a "non-postal" address) is a valid street address not listed in the USPS address database. Non-USPS addresses may include, but are not limited to:
- Locations in rural areas where USPS delivery isn't feasible
- Areas with harsh weather
- New constructions not in the USPS database
While USPS doesn't deliver to the millions of valid non-USPS addresses, integrated freight & logistic shippers like FedEx and UPS are happy to pick up the slack. 😁
To make sure your customers receive accurate and valid addresses regardless of their location, your address autocomplete software shouldn't solely rely on the USPS address database. The most effective address validation in the United States should begin with the USPS address database and incorporate non-USPS addresses from other trustworthy data sources to create a comprehensive dataset.
Some autocomplete address APIs enable customers to update their database. As Alexander Pope said, "To err is human." Depending on a diverse group of people to accurately input addresses into a database is like constructing a house on sand. It's risky, unreliable, and only a matter of time before it negatively impacts your company's productivity.
Best address autocomplete API providers
Now that we've discussed the 6 things to consider when deciding on the best address autocomplete API, let's compare two popular solutions to see how they stack up.
For a quick head-to-head comparison between Google and Smarty®, check out Google's address autocomplete versus Smarty's.
Googles Places's autocomplete API
The Google Places library has a vast set of worldwide public business listings with data from over 200 countries and territories. However, this doesn't guarantee the validity or accuracy of the addresses they provide. WHY?
Unlike most address autofill providers, Google allows volunteers to submit data via their Local Guides program. More on this later.
Geolocation
✅ Google's Autocomplete API returns address suggestions quickly, starting with the user's geolocation. Although it's API increases the speed of address entry, Google clearly states it doesn't guarantee the validity of an address. See the image below taken from the FAQ's section of Address Validation on the Google Maps Platform website.
If you want the benefits of a speedy check, along with accurate and valid addresses from Google, you have to purchase two products: autocomplete and address validation. 🤨
Secondary unit designators
❌ Google doesn't suggest apartments, units, suites, floors, or any other secondary unit indicators with their auto-completed addresses. Also, if someone types a unit number into Google's API, it doesn't check to make sure the unit number is valid.
Consider this: Based on our most recent count, 181 million mailing addresses are in the US. Of those, 44,937,008 contain secondary address indicators. So, almost a fourth of US users would need to enter the apartment number into Google's tool manually, and half of the users might just forget altogether. 😬
Standardizing & validation
❌ Google doesn't validate addresses through their address autocomplete API. As mentioned earlier, you can standardize and validate addresses with Google, but you have to use address autocomplete and address validation together. And yes, you have to pay for both. 😱
However, even if you decide to use both products, you still may not obtain a complete and valid address because of Google's address validation API features:
- Inconsistent address parsing (breaking an address into separate parts, such as house number, street name, city, etc.)
- Inconsistent RDI data (specifies if an address is residential or commercial)
- Invalid address suggestions from Google's autocomplete
- High-risk of false positives
In addition to the inconsistent address results, Google products have:
- Extremely restrictive address storage terms.
- For Example, Google generally allows the storage of address data (such as latitude/longitude coordinates, place IDs, etc.) retrieved through its APIs, but there are restrictions on how long and in what form certain types of data can be stored.
- Specific address data must be refreshed periodically to ensure accuracy.
- See Google's Google Maps Platform Terms of Service for related documentation.
- Cumbersome bulk validation
- Slow and limited APIs
- Strict attribution requirements
- Google's Terms of Service requires you to put the autocomplete form on a public page. So, if you need to auto-complete addresses behind a login page or on an internal form, you might run into problems. Google's autofill product requires you to use it with a Google map or display its “Powered by Google” branding.
- Lackluster customer support
Check out this article for more in-depth coverage of Google's address validation product.
Again, any address a customer selects from Google's autocomplete product is NOT VALIDATED, SO IT MAY NOT BE ACCURATE. Sorry to yell, but this is a critical point and a massive distinction between Google and most address autocomplete options.
To get validated addresses, you'll have to run your data through Google's autocomplete API and then Google's validation API. Talk about killing one bird with two stones.
Why are Google's addresses not standardized?
Sometimes, Google's addresses are standardized, and sometimes they're not. It gets tricky because much of Google's aggregated data comes from volunteers who report issues with streets, businesses, and residential addresses and add new locations. Google doesn't require address standardization training, so volunteers can enter data however they see fit. The volunteers aren't ensuring that their entries are in the correct formatting according to a country or territory's guidelines, and more importantly, neither is Google.
Take something as simple as a post office box.
Here is an autocomplete Google Places example without a map:
We have 4 suggestions and 3 formats for “PO Box,” and only one is in the correct standardized format. To be fair, Google doesn't do PO Box data either, but it does show the 3 different incorrect formats.
Even if you're not using USPS for shipping and delivery, any other logistics company (DHL, FedEx, UPS, etc.) requires addresses to be correct according to a country or territory's standards. Otherwise, items will be sent back or refused, wasting time and money. Standardization may seem unimportant, but it's crucial for streamlining processes.
PO Boxes, APOs, FPO, DPOs
❌ This one is short. Google doesn't support auto-complete address suggestions for any form of post office boxes.
❌ Google often suggests addresses that don't exist.
Provides only real addresses
❌ Google often suggests addresses that don't exist.
Remember our friend Peter Smith in unit 6083 of Willis Tower? Let's say he's now trying to order a new flashy collar from your imaginary sister brand, Kitty Bling. He starts typing in his valid address: 233 S Wacker Dr., Chicago, IL, when Potion meows and casually walks across his keyboard. As a result, he accidentally enters an invalid address like this:
However, Google displays it as a valid suggestion, so Peter clicks the result and moves on to the next. And who can blame Peter? We live in a curated world where personally exciting articles, music, movies, apps, etc., are all served up according to our interests and likes. We expect websites and well-known brands to anticipate our needs, so why wouldn't Peter trust an address result during checkout?
You might wonder, "What if Peter HAD entered his unit number? Wouldn't the system reject the invalid address and mark it undeliverable?”
The answer is still no. Remember, Google doesn't validate apartment numbers. See the above section on secondary unit designers.
Poor Peter will be disappointed once again. Just like the unicorn horn, the cat collar won't be delivered. Peter can't catch a break. 🫣
Includes non-USPS (non-postal) addresses
✅ Yes, Google includes non-postal addresses, increasing the volume of addresses in their database. Yay! Don't celebrate just yet. Remember, Google address autocomplete API allows untrained volunteers to add residential and business addresses to their database willy-nilly. Finding duplicate and inaccurate addresses inside Google's address system is easy.
Smarty's US Autocomplete API
Smarty has been in the address validation game for a decade and provides address autocomplete solutions for the US and internationally. These APIs are on-the-nose, accurate, fast, and reliable. Let's see how Smarty's US Autocomplete API does when challenged with the same 6 considerations we posed to Google.
Geolocation
✅ The Smarty US Autocomplete Pro API uses geolocation to return relevant address suggestions from the first keystroke. If a customer types in “863,” addresses near their location appear. Because of this configuration, customers often find their relevant address within their search's first 5-6 keystrokes.
Secondary unit designators
✅ The Smarty US Autocomplete Pro API provides secondary unit designators (apt, suite, unit, floor number, etc). It uses the official USPS database and other authoritative sources for address suggestions. If an address can get mail, it can be predicted with the API.
Suggested addresses will display floor numbers, apartment numbers, unit numbers, and suites in an easy-to-understand format. So, if a user types in the address of an apartment building, the Smarty autocomplete tool will also provide the address with unit numbers in that apartment building (see below).
Standardizing & validation
✅ The Smarty US Autocomplete Pro API standardizes and validates addresses. Smarty is an address data intelligence company with address validation and verification as its flagship solution. It would be silly not to offer standardization and validation within the autocomplete API.
To remain consistent and accurate, trained professionals collect and update all addresses so results are always provided in the USPS standardized format. Even better, database information is updated every month to keep addresses current.
If you pair Smarty's address autocomplete with address verification, you also get ZIP+4 Codes and 55 points of metadata for enhanced data quality and contextual understanding. Not all address providers supply that data.
PO Boxes, APOs, FPO, DPOs
✅ The Smarty US Autocomplete API handles PO Boxes, APOs, FPOs, and DPOs. If USPS delivers to an address with a box (PO Boxes, APOs, FPOs, and DPOs), it's included in US Address Autocomplete.
Provides only actual addresses
✅ Smarty's US Autocomplete API suggests ONLY valid addresses. Full Stop. There are no caveats or exceptions. Customers can't select an invalid address using the Smarty US Autocomplete Pro API.
Customers must enter valid information to get their address in the prediction list. If what someone enters isn't an actual address, no suggestions will appear, making it fast and easy for them to correct their mistake and for their accurate address to populate. Ensuring address data is correct at the entry point keeps your database clean, consistent, and valuable.
Includes non-USPS (non-postal) addresses
✅ Smarty's US Autocomplete API includes non-USPS addresses. There's no need to rely on volunteers or open-source projects to gather data because thoroughly vetted, reliable address sources who are trained in address validation and standardization are already in place.
Smarty's US address database, which has 220 million addresses and is compiled from only authoritative sources, is constantly growing and available for purchase in the comprehensive US Master Address List and by state.
Accuracy is the #1 priority for Smarty's US Autocomplete API. Correct addresses appear in 4-6 keystrokes by geolocating and parsing the house number. It may take 10-13 (or even more) keystrokes from other sources before they suggest the correct address.
Smarty provides the below well-tested, open-source, and actively developed SDK packages available at no charge for the address autocomplete API:
- iOS SDK is compatible with
- Objective-C
- Swift
- JavaScript SDK
- JAVA SDK is compatible with:
- Android development
- Clojure
- Groovy
- Scala
- Kotlin
- … or any other JVM language.
Address autocomplete service provider comparison
What a ride! Here is a service comparison for each point we covered above and what each address autocomplete service offers:
Consideration | Google Places's autocomplete | Smarty's US Autocomplete |
---|---|---|
Geolocation | ✅ | ✅ |
Secondary unit designators | ❌ | ✅ |
Standardization & validation | ❌ | ✅ |
PO Boxes, APOs, FPO, DPOs | ❌ | ✅ |
Provides only real addresses | ❌ | ✅ |
Includes non-postal addresses | ✅* | ✅ |
Special considerations | Yes | No |
Autocomplete cost | $$$$ | $$ |
* Provider relies on data from open-source projects or volunteers for non-postal addresses.
Address autocomplete API example
Imagine you're Peter from earlier. 👨 Here's how his experience would have gone if your company had implemented Smarty's US Autocomplete API:
- Peter's in the checkout process, and it asks for his address.
- Peter types the first 5 keys of his street into the address form field.
- Because the platform has installed Smarty's US Autocomplete API with geolocation, the tool knows roughly where Peter is located.
- With each entered keystroke, the US Autocomplete API returns address suggestions (taken from an index of house number, street, city, and state combinations) and populates a dropdown of relevant local addresses.
- Peter quickly and effortlessly recognizes his correct, verified address (with the unit number!) from the suggestions in the dropdown menu and selects it.
- Peter finishes checking out and clicks the purchase button.
- He confidently goes about his life, excited to receive his item ASAP.
Experience the difference an accurate address autocomplete API makes for your customers and try out Smarty's address autocomplete API free demo. You can also create sample cURL requests to see the API response or check out the autocomplete documentation to help customize your configuration.
Autocomplete cost
It shouldn't be hard to figure out how much your address autocomplete solution costs. Some providers use credits, or Smarty's autocomplete pricing is calculated per keystroke. Each keystroke counts as one lookup. On average, an address is found within 8-10 keystrokes (sometimes fewer).
- Monthly plans start at $20 USD for 5k lookups (0.004 USD per lookup) and range to $500 USD monthly for 200k lookups (0.0025 per lookup).
- Annual plans start at 200 USD for 60k lookups (0.0033 USD per lookup) and range to $5,000 USD yearly for 2.3M lookups (0.0021 per lookup).
- If none of those seem quite right, custom plans are also available.
Assuming an average of 10 keystrokes to find an address, the above monthly pricing ranges would yield a cost of 0.04 USD to 0.025 USD per auto-completion.
Other autocomplete APIs offer confusing prices, making it difficult to determine the actual cost until after signing up. Not knowing the price until you enroll can be costly and pretty frustrating. A company that worked with Smarty to create a custom $25,000 USD annual plan reported that they previously paid over $300,000 USD yearly for Google's autocomplete. Yikes. 🤯
International Address Autocomplete
We've created another article that discusses choosing an international address autocomplete API in depth. Because every country and territory has specific address formatting guidelines, you must consider other factors when selecting an international autocomplete.
You can also try out Smarty's International Address Autocomplete API.
Because Google Maps was designed with maps and navigation in mind, it's great for getting to the Eiffel Tower but not so great for finding the exact address of the customer. Since Google relies on crowdsourced contributions, they frequently lack address precision, and the quality varies widely by country. 😬🥴
Conclusion Checklist
Now you know everything you should consider when choosing an address autocomplete API provider. Hooray! Use the checklist below to see that you're getting everything you want and need for your address autofill and get ready for your customer's loyalty to soar with a faster and more profitable online checkout.
My address autocomplete API needs to be able to:
▢ Geolocate my customers to improve address predictions
▢ Provide address with secondary unit designators
▢ Handle PO Boxes, APOs, FPOs
▢ Identify alias addresses
▢ Accept alternate city names
▢ Standardize the address
▢ Validate the address
▢ Prevents customers from entering fake house numbers
▢ Includes non-postal addresses from authoritative sources
▢ Requires the least amount of keystrokes before the correct address appears
▢ It doesn't require special considerations
▢ Works efficiently with your current product stack
▢ Offers a free trial, so you can test drive it before fully committing
▢ Easy-to-understand pricing
You should also check out our address autocomplete guide for more information and API implementation tips. 🙌