Webinar
Smarty

Address standardization APIs: What they are & how to use them

Man using address standardization API

An address standardization API is an application programming interface (API) can that can automatically format address data according to a specified set of postal standards established by a local postal authority like the USPS.

However, the standardization process only reformats the address and doesn't verify whether it is real or mailable. If your company only uses an address API that's limited exclusively to standardization, you will end up with invalid addresses in your database.

Thankfully, normalizing addresses is only a part of the capabilities of Smarty's Address Validation APIs, so you'll only need one tool to standardize addresses and verify that the addresses exist.

Smarty has a suite of several address APIs that validate and standardize addresses to improve data integrity. An address standardization API without validation could result in invalid addresses in the correct format. They might look pretty, but if they made it into your database, they've catfished you; they're undeliverable.

You can try one of our address standardization APIs to see what it looks like when paired with top-notch address verification. For us, standardization and validation are a package deal; you really can't do one without the other, and to offer them separately would be a disservice.

US address standardization and validation API International address standardization and validation API US address autocomplete and standardization API

In this article, we'll cover:

What is an address standardization API?

Address standardization APIs will ingest address records, analyze the individual address components, identify normalization and formatting errors, and spit those addresses back out in a formalized, correct format. Unfortunately, no single address standardization format exists, so you may need a few different APIs depending on your address records.

Postal addresses in the United States of America can be standardized by APIs that follow the USPS address standardization guidelines, while international addresses require APIs built explicitly to match the standards of each country.

Adding an address standardization solution to your software stack is surprisingly simple. Smarty's APIs are designed for easy software integration, so you can seamlessly incorporate address validation searches into your current workflows. For example, you can verify that an address exists as customers enter their information. If the address data isn't standardized, an address validation API will automatically normalize complex addresses, fix pesky spelling errors, and catch data entry errors before you save them to your address lists. You'll also increase customer satisfaction and save money on undeliverable mail fees, wasted material costs, and wasted labor hours.

Do standardization APIs validate addresses?

Address Standardization APIs normalize address formatting but don't check to see if the address exists.]

By definition, APIs that perform address standardization (sometimes called address normalization) only standardize addresses to the formal of the local postal authority. If you want to validate your address records, you will also need an API for address validation. Because normalizing addresses is part of the address validation process, you don't need an address standardization API. If you use an address standardization API, your mailing list could include addresses as fictional as Hogwarts.

Occasionally, incorrect addresses could be on your address lists, even with an address verification API. When shopping for an address verification API, you'll want to ask about the tool's precision.

For example, UPS's Address Validation-Street Level API will only verify address data at the street level. It'll still standardize directionals, building numbers, suite numbers, and apartment numbers, but it won't check whether a specific building or suite number exists.

Let's do this in real-time. Say you're mailing a package to a specific apartment in a large complex:

12011 Bailey St Apt 1, Garden Grove, CA 92845

UPS will standardize address data and check for a "Bailey Street" in Garden Grove, California, 92845. However, if building number 12011 or apartment number 1 doesn't exist, UPS's API will falsely validate the incorrect address. Yikes! You can see how this adds to mega waste over time.

You could save money using UPS API if your mailing list doesn't include addresses with building, suite, or apartment numbers, but this scenario is also unlikely. You'll recuperate the costs spent investing in a validating address API by upgrading to a higher-precision tool because you'll be reducing money lost from sending mail, packages, and people to incorrect and incomplete addresses.

What types of standardization APIs exist?

Address standardization APIs can be categorized by the postal standardization formats they output. The best address standardization solution depends on the types of addresses in your mailing list.

USPS addressing standards API

Woman getting a package

The United States Postal ServiceⓇ created the primary address standards used in the United States of America. It developed the Coding Accuracy Support System (CASS) to check the accuracy of standardization and validation tools on the market. If address standardization software isn't CASS certified, it may not be sourcing its information from the USPS's official database.

The USPS address standardization API is a free address standardization solution that can parse individual address components, normalize the address, and validate that the address exists. This API certainly has its uses; however, it's limited by its lack of features and restrictive terms of service. You'll need to find a different API to merge address data, process addresses in bulk, or use the API for anything other than checking shipping addresses.

Example of an address that adheres to CASS standardization:

5317 I 55 N Jackson MS 39206-4105

Project US@ standardization for healthcare

According to the Journal of the American Medical Informatics Association, address standardization can reduce the number of medical records not linked to the correct patient's address by up to 20%. Without proper address linking, it's difficult for providers to share records with other providers, causing patient matching errors, unreliable population health analytics, and low-quality patient data.

To address this problem, the Office of the National Coordinator (ONC) for Health Information Technology created Project US@, an initiative to specify unified guidelines and standards for addresses in the healthcare industry. These standards are similar to USPS guidelines but differ in ways that make address data more accessible to the medical industry. Project US@ standardization capitalizes all letters and spells out all abbreviations.

Example of an address that adheres to Project US@ standardization:

5317 INTERSTATE 55 NORTH JACKSON MS 39206-4105

International address standardization API

If you send packages to an international address, you will need an international address validation API or international address verification API. These APIs are often designed to accommodate address standardization formats for multiple countries, so you should only need one API to validate your international addresses.

Here's an example of international address standards:

Country

Format

Example

France

Addressee

[Street number] [Street name]

[Postcode] [Locality]

Country

Jean Luc PICARD

52 RUE DES FLEURS

33500 LIBOURNE

FRANCE

Germany

Addressee

[Building information] [Sub-building information]

[Street] [House number]

[Postal code] [City]

Country

HERR MAX MUSTERMANN MUSTERWOHNUNG 4a, MUSTERBAU

MUSTERSTRAẞE 123

12345 MUSTERSTADT

GERMANY

Address autocomplete API

According to the Baymard Institute, approximately one-fifth of ecommerce shoppers abandon their shopping carts without purchasing because of a "too long/complicated checkout process." Address autocomplete is one way to improve the checkout process. It simplifies the checkout workflow by providing suggested addresses by the customer's first keystroke, and these suggestions update with each additional keystroke. However, if the autocomplete API doesn’t validate secondary addresses like apartment and suite numbers the way Smarty’s does, it may suggest fictional addresses or struggle to generate results.

Customizing HTTP requests: Smarty's street address API

Smarty's US Street API is a highly customizable tool that both standardizes and validates addresses and provides different outputs based on your needs. The API is customizable by:

Data input

If you have data for any of the following field combinations, your data is eligible for a positive address match.

  • Street + City + State

  • Street + ZIP Code

  • Freeform (enter the entire address in the "street" field)

Freeform

Sometimes address data is messy, especially when addresses are entered freeform through a single-line address entry field. Our street address validation API can be customized to accept messy address data. But note that freeform address data can't be used with the "Invalid" match setting, discussed below.

Format

Smarty's US Street Address API can return addresses in two standardized formats: USPS and Project US@. Our tool normalizes addresses by default according to USPS standards, though enterprise license users can change the output format to Project US@.

If you want to change the address output to the Project US@ format:

  1. Go to Smarty's street address validation API and scroll down to the header, "US Street Address API Tool"

  2. Using the drop-down menus, choose the input fields according to your business case

  3. For each field, input values in the "Values" column

    1. In the "match" field, enter "strict", "invalid", or "enhanced"

    2. In the "license" field, enter your license value, such as "us-rooftop-geocoding-enterprise-cloud." You can find your license value in your account by going to "Subscriptions" and clicking on "View" under the "USAGE DETAILS" column.

Address standardization API response

*Note: You will need to speak with an address specialist to sign up for an enterprise license to US Rooftop Geocoding for this to work. You can contact them here.

  1. In the "format" field, enter the value of "project-usa"

  1. Select the beautiful button labeled "View API Response"

To validate freeform addresses:

  1. Go to Smarty's street address validation API and enter the entire address in the "street" field.

  2. Select "View API response."

Match types

This field lets you customize the requirements for the API to consider an address a "match."

Strict: Strict matches only validate USPS postal addresses. The output will result in an empty array for invalid and valid non-USPS addresses. This case may apply to you if your organization is shipping exclusively through USPS.

Invalid: The API will return detailed output for valid and invalid addresses. Note that the invalid setting isn't compatible with freeform address input. The API will automatically employ a strict match output strategy for all addresses submitted freeform. Also, when submitting addresses in components, setting the match to invalid will prevent the API from finding valid matches for ambiguous address input.

Enhanced: Our enhanced match setting uses an additional pre-standardization algorithm to handle messy address data better. It can validate postal and non-USPS addresses, giving you access to over 20 million US addresses not in the USPS's official database. Enhanced mode requires a US Core license or a US Rooftop Geocoding license. Also, a freeform address that we can't find a match for will respond with an empty array, "[]."

If your address lists only include USPS postal addresses, you'll be able to validate your addresses using the "strict" and "invalid" match settings. But if your mailing list has non-USPS addresses, your packages may arrive at a PO box rather than on a doorstep. Your packages may also be considered "undeliverable" and sent back to you, along with a bill for the associated fees.

The difference between the Strict, Invalid, and Enhanced make more sense with examples. Here are samples of all 3 match types with valid, and less-than-fully valid addresses. You can see the differences in the match type comparison table.

Strict

Here's a sample of strict match in use:


		[
			{
				"input_index": 0,
				"candidate_index": 0,
				"delivery_line_1": "8084 Hogwarts Dr",
				"last_line": "Rives Junction MI 49277-8613",
				"delivery_point_barcode": "492778613841",
				"components": {
					"primary_number": "8084",
					"street_name": "Hogwarts",
					"street_suffix": "Dr",
					"city_name": "Rives Junction",
					"default_city_name": "Rives Junction",
					"state_abbreviation": "MI",
					"zipcode": "49277",
					"plus4_code": "8613",
					"delivery_point": "84",
					"delivery_point_check_digit": "1"
				},
				"metadata": {
					"record_type": "S",
					"zip_type": "Standard",
					"county_fips": "26075",
					"county_name": "Jackson",
					"carrier_route": "R001",
					"congressional_district": "05",
					"rdi": "Residential",
					"elot_sequence": "0090",
					"elot_sort": "A",
					"latitude": 42.353889,
					"longitude": -84.491013,
					"coordinate_license": 1,
					"precision": "Rooftop",
					"time_zone": "Eastern",
					"utc_offset": -5,
					"dst": true
				},
				"analysis": {
					"dpv_match_code": "Y",
					"dpv_footnotes": "AABB",
					"dpv_cmra": "N",
					"dpv_vacant": "N",
					"dpv_no_stat": "N",
					"active": "Y"
				}
			}
		]
	

If the address isn't in the USPS data, the response would look like this:


	[]

Invalid

It's important to note that the dpv reads "A1" if the entered address isn't in the USPS database. It could, however, still be in the non postal database.

Valid address:


	"analysis" {
				"dpv_match_code" "Y",
				"dpv_footnotes" "AABB",
				"dpv_cmra" "N",
				"dpv_vacant" "N",
				"dpv_no_stat" "N",
				"active" "Y"
				}
			}
	]

Invalid address:


	"analysis" {
				"dpv_footnotes" "A1",
				"active" "Y",
				"footnotes" "E#I#"
			}
		}
	]

Enhanced

A USPS deliverable address will appear like this when using enhanced mode.


[
	{
		"input_index" 0,
		"candidate_index" 0,
		"delivery_line_1" "8084 Hogwarts Dr",
		"last_line" "Rives Junction MI 49277-8613",
		"delivery_point_barcode" "492778613841",
		"smarty_key" "990266232",
		"components" {
			"primary_number" "8084",
			"street_name" "Hogwarts",
			"street_suffix" "Dr",
			"city_name" "Rives Junction",
			"default_city_name" "Rives Junction",
			"state_abbreviation" "MI",
			"zipcode" "49277",
			"plus4_code" "8613",
			"delivery_point" "84",
			"delivery_point_check_digit" "1"
		},
		"metadata" {
			"record_type" "S",
			"zip_type" "Standard",
			"county_fips" "26075",
			"county_name" "Jackson",
			"carrier_route" "R001",
			"congressional_district" "05",
			"rdi" "Residential",
			"elot_sequence" "0090",
			"elot_sort" "A",
			"latitude" 42.353889,
			"longitude" -84.491013,
			"coordinate_license" 1,
			"precision" "Rooftop",
			"time_zone" "Eastern",
			"utc_offset" -5,
			"dst" true
		},
		"analysis" {
			"dpv_match_code" "Y",
			"dpv_footnotes" "AABB",
			"dpv_cmra" "N",
			"dpv_vacant" "N",
			"dpv_no_stat" "N",
			"active" "Y",
			"enhanced_match" "postal-match"
		}
	}
]

If your cat hops on the keyboard while you aren't looking, an undeliverable USPS address will appear like this in enhanced mode:


[
	{
		"input_index" 0,
		"candidate_index" 0,
		"delivery_line_1" "808321324 Hogwarts Dr",
		"last_line" "Rives Junction MI 49277",
		"delivery_point_barcode" "49277",
		"components" {
			"primary_number" "808321324",
			"street_name" "Hogwarts",
			"street_suffix" "Dr",
			"city_name" "Rives Junction",
			"default_city_name" "Rives Junction",
			"state_abbreviation" "MI",
			"zipcode" "49277"
		},
		"metadata" {
			"zip_type" "Standard",
			"county_fips" "26075",
			"county_name" "Jackson",
			"latitude" 42.38793,
			"longitude" -84.46402,
			"precision" "Zip5",
			"time_zone" "Eastern",
			"utc_offset" -5,
			"dst" true
		},
		"analysis" {
			"dpv_footnotes" "A1",
			"active" "Y",
			"footnotes" "F#",
			"enhanced_match" "none"
		}
	}
]

Check out our API reference guide to understand our API's HTTP outputs. To learn more about DPV match codes, read here.

Match type comparison table

Here's a side-by-side comparison in a pretty table. You're welcome:


Strict

Invalid

Enhanced

Includes USPS Database

Includes over 20 million non-USPS addresses

Allows for freeform entry

Includes an enhanced address-matching algorithm

Empty array for invalid matches

Freeform only

Generates output for valid and invalid addresses

TL;DR - Too long; didn't read

Address standardization is an essential first step for address validation, but it doesn't go far enough to ensure the accuracy of your address records in your database.

Thankfully, APIs for address validation standardize addresses before analyzing the data, so you don't need an address standardization API. Depending on your address records, you may need multiple address validation APIs (e.g., an international address verification API and a USPS address verification API).

Interested in seeing how address validation APIs standardize address data? Try out our US Address Validation API, International Address validation API, and US Address Autocomplete API.