Places UI Kit: A ready-to-use library that provides room for customization and low-code development. Try it out, and share yourinput on your UI Kit experience.

Handle United States addresses

This document covers address validation specific to the United States:

USPS data in your workflow

When validating addresses in the United States, the Address Validation APIcan also populate theuspsData portion of the return.

Key Point: If your system primarily or exclusively handles US addresses, you mayelect to use this response object as a first point of reference in your checkinglogic. However, it's important to know that theuspsData object is notguaranteed to be fully populated for every address validated by the service.

Because this object is not always populated, you shouldn't rely on thisproperty as the sole means to validate addresses, but instead incorporate theverdict and address components into your system as well.

USPS Delivery Point Verification (DPV)

As part of theuspsData response, thedpvConfirmation field returns a singlecharacter to let you know if the USPS can deliver to the provided address.

You can use this field to determine the following:

  • address validity.
  • if a sub-premise number is missing from the address.
  • if the sub-premise number does not exist in the USPS data system.

The service either returns one of fourdpvConfirmation values or it does notreturn adpvConfirmation value at all. The table below shows the recommendedbehavior your logic should use for each of the 5 possible outcomes. For moredetails on this logic, seeWorkflow overview inBuild your validation logic.

Value

Behavior

Description

N

or empty

Fix the address

The address was not DPV confirmed.

This means the USPS does not recognize the entered premise number existing on the entered street (route), and cannot deliver there.

D

Fix the address

The address was DPV confirmed for the primary number only, and the secondary number information was missing.

This means that the premise number entered exists on the entered street, but to reach a fully verified/deliverable address, a valid sub-premise number also needs to be provided. In other words, the sub-premise was missing from the input.

S

Confirm the address

The address was DPV confirmed for the primary number only, and the secondary number information was present but not confirmed.

This means that the premise number entered exists on the entered route, but the sub-premise provided does not exist within that building, according to USPS.

Y

Accept the address

The address was DPV confirmed for primary and any secondary numbers.

This means the address is fully deliverable by USPS, including the sub-premise number, if applicable.

The rest of this section discusses real world scenarios that use the DPV codes.

DPV N example - fix the address

This example uses non-existent street number on an otherwise valid address.

  • Address entered: 12 Amphitheatre Parkway, Mountain View, CA, 94043
  • Region: USA
  • ThedpvConfirmation field returns:N

This is anextremely strong signal that this premise number does not existon this route. As with other problematic addresses, your system should promptthe user for corrections.

DPV D example - fix the address

This example uses the Google office in New York, but does not contain asub-premise which is a required part of the address. You can see this by usingthe address in thedemo without sub-premise information.

  • Address entered: 111 8th Avenue, New York, NY, 10011
  • Region: USA
  • ThedpvConfirmation field returns:D

This confirms that the sub-premise was missing from the input. To get to a DPVof Y, a valid sub-premise must be included as part of the input. For example,you could include a valid sub-premise ofFL 4 (4th Floor) to obtain adpvConfirmation value of Y.

DPV S example - confirm the address

This example uses a sub-premise number that does not exist within the building:

  • Address entered: 1600 Amphitheatre Parkway, Suite 101, Mountain View, CA,94043
  • Region: USA
  • ThedpvConfirmation field returns:S

This indicates that, while 1600 Amphitheatre Parkway exists as an address thatcan accept mail, the sub-premise Ste 101 is not a valid part of the address.Your system should confirm this information with the user and provide anopportunity for a correction.

DPV Y example - accept the address

This example uses the Googleplex address in Mountain View, CA as aknown quality address.

  • Address entered: 1600 Amphitheatre Parkway, Mountain View, CA, 94043
  • Region: USA
  • ThedpvConfirmation field returns:Y

The address is fully deliverable by USPS. This gives you a very high degree ofconfidence that the API returned an address of good quality, and you can use itas provided.

Note: The DPV does not indicate if the Address Validation API has made anychanges to the input, such as a spell correction.

Security messages for US addresses

This section covers the security flags provided in the USPS data forartificially created addresses. This security measure is designed to prevent theartificial creation of an address list by detecting when a submitted addressappears to have been constructed artificially and not obtained legitimately.This should be a very rare occurrence.

When the USPS identifies an artificially created address, theerrorMessagefield of theuspsData property of the response contains anerror message describing the issue. For example:

AMS API processing was terminated due to the detection of what is determined tobe an artificially created address. No address beyond this point has beenvalidated and/or processed. If you believe this address was identified in error,please contact your Vendor.
Note: When theuspsData indicates an artificial address, the responsefor other properties in the Address Validation API response remain unaffected.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-18 UTC.