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.

Address Validation (beta)

AddressValidationclass

google.maps.addressValidation.AddressValidationclass

Notice: Available only in thev=beta channel.

Static class for accessing the AddressValidation APIs.

Access by callingconst {AddressValidation} = await google.maps.importLibrary("addressValidation").
SeeLibraries in the Maps JavaScript API.

Static Methods

BetafetchAddressValidation

Notice: Available only in thev=beta channel.

fetchAddressValidation(request)
Parameters: 
Return Value: Promise<AddressValidation>

Properties

Betaaddress

Notice: Available only in thev=beta channel.

Type: Addressoptional
Information about the address itself as opposed to the geocode.
Betageocode

Notice: Available only in thev=beta channel.

Type: Geocodeoptional
Information about the location and place that the address geocoded to.
Betametadata

Notice: Available only in thev=beta channel.

Type: AddressMetadataoptional
Other information relevant to deliverability.metadata is not guaranteed to be fully populated for every address sent to the Address Validation API.
BetaresponseId

Notice: Available only in thev=beta channel.

Type: stringoptional
The UUID that identifies this response. If the address needs to be re-validated, this UUIDmust accompany the new request.
BetauspsData

Notice: Available only in thev=beta channel.

Type: USPSDataoptional
Extra deliverability flags provided by USPS. Only provided in regionUS andPR.
Betaverdict

Notice: Available only in thev=beta channel.

Type: Verdictoptional
Overall verdict flags

Methods

BetatoJSON

Notice: Available only in thev=beta channel.

toJSON()
Parameters:  None
Return Value: Object
Converts the AddressValidation class to a JSON object with the same properties.

AddressValidationRequestinterface

google.maps.addressValidation.AddressValidationRequestinterface

Notice: Available only in thev=beta channel.

Request interface forBetaAddressValidation.fetchAddressValidation.

Properties

Betaaddress

Notice: Available only in thev=beta channel.

The address being validated. Unformatted addresses should be submitted viaPostalAddress.addressLines.
BetapreviousResponseIdoptional

Notice: Available only in thev=beta channel.

Type: stringoptional
This field must not be set for the first address validation request. If more requests are necessary to fully validate a single address (for example if the changes the user makes after the initial validation need to be re-validated), then each followup request must populate this field with theBetaAddressValidation.responseId from the very first response in the validation sequence.
BetauspsCASSEnabledoptional

Notice: Available only in thev=beta channel.

Type: booleanoptional
Enables USPS CASS compatible mode. This affectsonly theBetaAddressValidation.uspsData field ofAddressValidation. Note: for USPS CASS enabled requests for addresses in Puerto Rico, aPostalAddress.regionCode of theaddress must be provided as "PR", or anPostalAddress.administrativeArea of theaddress must be provided as "Puerto Rico" (case-insensitive) or "PR".

Addressclass

google.maps.addressValidation.Addressclass

Notice: Available only in thev=beta channel.

Details of the post-processed address. Post-processing includes correcting misspelled parts of the address, replacing incorrect parts, and inferring missing parts.

Access by callingconst {Address} = await google.maps.importLibrary("addressValidation").
SeeLibraries in the Maps JavaScript API.

Properties

Betacomponents

Notice: Available only in thev=beta channel.

The individual address components of the formatted and corrected address, along with validation information. This provides information on the validation status of the individual components.
BetaformattedAddress

Notice: Available only in thev=beta channel.

Type: stringoptional
The post-processed address, formatted as a single-line address following the address-formatting rules of the region where the address is located.
BetamissingComponentTypes

Notice: Available only in thev=beta channel.

Type: Array<string>
The types of components that were expected to be present in a correctly formatted mailing address but were not found in the input AND could not be inferred. Components of this type are not present informatted_address,postal_address, oraddress_components. An example might be['street_number', 'route'] for an input like "Boulder, Colorado, 80301, USA". The list of possible types can be foundhere.
BetapostalAddress

Notice: Available only in thev=beta channel.

Type: PostalAddressoptional
The post-processed address represented as a postal address.
BetaunconfirmedComponentTypes

Notice: Available only in thev=beta channel.

Type: Array<string>
The types of the components that are present in theaddress_components but could not be confirmed to be correct. This field is provided for the sake of convenience: its contents are equivalent to iterating through theaddress_components to find the types of all the components where theBetaAddressComponent.confirmationLevel is notBetaConfirmationLevel.CONFIRMED or theBetaAddressComponent.inferred flag is not set totrue. The list of possible types can be foundhere.
BetaunresolvedTokens

Notice: Available only in thev=beta channel.

Type: Array<string>
Any tokens in the input that could not be resolved. This might be an input that was not recognized as a valid part of an address (for example in an input like "123235253253 Main St, San Francisco, CA, 94105", the unresolved tokens may look like["123235253253"] since that does not look like a valid street number.

AddressComponentclass

google.maps.addressValidation.AddressComponentclass

Notice: Available only in thev=beta channel.

Represents a single component of an address (ex. street name, city).

Access by callingconst {AddressComponent} = await google.maps.importLibrary("addressValidation").
SeeLibraries in the Maps JavaScript API.

Properties

BetacomponentName

Notice: Available only in thev=beta channel.

Type: stringoptional
The component name text. For example, "5th Avenue" for a street name or "1253" for a street number,
BetacomponentNameLanguageCode

Notice: Available only in thev=beta channel.

Type: stringoptional
The BCP-47 language code. This will not be present if the component name is not associated with a language, such as a street number.
BetacomponentType

Notice: Available only in thev=beta channel.

Type: stringoptional
The type of the address component. SeeTable 2: Additional types returned by the Places service for a list of possible types.
BetaconfirmationLevel

Notice: Available only in thev=beta channel.

Type: ConfirmationLeveloptional
Indicates the level of certainty that the component is correct.
Betainferred

Notice: Available only in thev=beta channel.

Type: boolean
If true, this component was not part of the input, but was inferred for the address location. Including this component is recommended for a complete address.
Betareplaced

Notice: Available only in thev=beta channel.

Type: boolean
Indicates the name of the component was replaced with a completely different one. For example, replacing a wrong postal code being with one that is correct for the address. This is not a cosmetic change; the input component has been changed to a different one.
BetaspellCorrected

Notice: Available only in thev=beta channel.

Type: boolean
Indicates a correction to a misspelling in the component name. The API does not always flag changes from one spelling variant to another, such as "centre" to "center".
Betaunexpected

Notice: Available only in thev=beta channel.

Type: boolean
If true, this component is not expected to be present in a postal address for the given region. It has been retained only because it was part of the input.

AddressMetadataclass

google.maps.addressValidation.AddressMetadataclass

Notice: Available only in thev=beta channel.

The metadata for the address. AddressMetadata is not guaranteed to be fully populated for every address sent to the Address Validation API.

Access by callingconst {AddressMetadata} = await google.maps.importLibrary("addressValidation").
SeeLibraries in the Maps JavaScript API.

Properties

Betabusiness

Notice: Available only in thev=beta channel.

Type: boolean
BetapoBox

Notice: Available only in thev=beta channel.

Type: boolean
Betaresidential

Notice: Available only in thev=beta channel.

Type: boolean

ConfirmationLevelconstants

google.maps.addressValidation.ConfirmationLevelconstants

Notice: Available only in thev=beta channel.

The different possible values indicating the level of certainty that the component is correct.

Access by callingconst {ConfirmationLevel} = await google.maps.importLibrary("addressValidation").
SeeLibraries in the Maps JavaScript API.

Constants

BetaCONFIRMED

Notice: Available only in thev=beta channel.

BetaUNCONFIRMED_AND_SUSPICIOUS

Notice: Available only in thev=beta channel.

BetaUNCONFIRMED_BUT_PLAUSIBLE

Notice: Available only in thev=beta channel.

Geocodeclass

google.maps.addressValidation.Geocodeclass

Notice: Available only in thev=beta channel.

Contains information about the place the input was geocoded to.

Access by callingconst {Geocode} = await google.maps.importLibrary("addressValidation").
SeeLibraries in the Maps JavaScript API.

Properties

Betabounds

Notice: Available only in thev=beta channel.

Type: LatLngBoundsoptional
The bounds of the geocoded place.
BetafeatureSizeMeters

Notice: Available only in thev=beta channel.

Type: numberoptional
The size of the geocoded place, in meters. This is another measure of the coarseness of the geocoded location, but in physical size rather than in semantic meaning.
Betalocation

Notice: Available only in thev=beta channel.

Type: LatLngAltitudeoptional
The geocoded location of the input.
BetaplaceId

Notice: Available only in thev=beta channel.

Type: stringoptional
The Place ID of the geocoded place. Using Place is preferred over using addresses, latitude/longitude coordinates, or plus codes. Using coordinates for routing or calculating driving directions will always result in the point being snapped to the road nearest to those coordinates. This may not be a road that will quickly or safely lead to the destination and may not be near an access point to the property. Additionally, when a location is reverse geocoded, there is no guarantee that the returned address will match the original.
BetaplaceTypes

Notice: Available only in thev=beta channel.

Type: Array<string>
The type(s) of place that the input geocoded to. For example,['locality', 'political']. The full list of types can be found in theGeocoding API documentation.
BetaplusCode

Notice: Available only in thev=beta channel.

Type: PlusCodeoptional
The plus code corresponding to thelocation.

Methods

BetafetchPlace

Notice: Available only in thev=beta channel.

fetchPlace()
Parameters:  None
Return Value:  None
Returns a Place representation of this Geocode. To get full place details, a call to place.fetchFields() should be made.

Granularityconstants

google.maps.addressValidation.Granularityconstants

Notice: Available only in thev=beta channel.

The various granularities that an address or a geocode can have. When used to indicate granularity for anaddress, these values indicate with how fine a granularity the address identifies a mailing destination. For example, an address such as "123 Main Street, Redwood City, CA, 94061" identifies aPREMISE while something like "Redwood City, CA, 94061" identifies aLOCALITY. However, if we are unable to find a geocode for "123 Main Street" in Redwood City, the geocode returned might be ofLOCALITY granularity even though the address is more granular.

Access by callingconst {Granularity} = await google.maps.importLibrary("addressValidation").
SeeLibraries in the Maps JavaScript API.

Constants

BetaBLOCK

Notice: Available only in thev=beta channel.

The address or geocode indicates a block. Only used in regions which have block-level addressing, such as Japan.
BetaOTHER

Notice: Available only in thev=beta channel.

All other granularities, which are bucketed together since they are not deliverable.
BetaPREMISE

Notice: Available only in thev=beta channel.

Building-level result.
BetaPREMISE_PROXIMITY

Notice: Available only in thev=beta channel.

A geocode that approximates the building-level location of the address.
BetaROUTE

Notice: Available only in thev=beta channel.

The geocode or address is granular to route, such as a street, road, or highway.
BetaSUB_PREMISE

Notice: Available only in thev=beta channel.

Below-building level result, such as an apartment.

USPSAddressclass

google.maps.addressValidation.USPSAddressclass

Notice: Available only in thev=beta channel.

USPS representation of a US address.

Access by callingconst {USPSAddress} = await google.maps.importLibrary("addressValidation").
SeeLibraries in the Maps JavaScript API.

Properties

Betacity

Notice: Available only in thev=beta channel.

Type: stringoptional
The city name.
BetacityStateZipAddressLine

Notice: Available only in thev=beta channel.

Type: stringoptional
The address line containing the city, state, and zip code.
Betafirm

Notice: Available only in thev=beta channel.

Type: stringoptional
The name of the firm.
BetafirstAddressLine

Notice: Available only in thev=beta channel.

Type: stringoptional
The first line of the address.
BetasecondAddressLine

Notice: Available only in thev=beta channel.

Type: stringoptional
The second line of the address.
Betastate

Notice: Available only in thev=beta channel.

Type: stringoptional
The 2-letter state code.
Betaurbanization

Notice: Available only in thev=beta channel.

Type: stringoptional
The Puerto Rican urbanization name.
BetazipCode

Notice: Available only in thev=beta channel.

Type: stringoptional
The Postal code, e.g. "10009".
BetazipCodeExtension

Notice: Available only in thev=beta channel.

Type: stringoptional
The 4-digit postal code extension, e.g. "5023".

USPSDataclass

google.maps.addressValidation.USPSDataclass

Notice: Available only in thev=beta channel.

The USPS data for the address. USPSData is not guaranteed to be fully populated for every US or PR address sent to the Address Validation API. It's recommended to integrate the backup address fields in the response if you utilize uspsData as the primary part of the response.

Access by callingconst {USPSData} = await google.maps.importLibrary("addressValidation").
SeeLibraries in the Maps JavaScript API.

Properties

BetaabbreviatedCity

Notice: Available only in thev=beta channel.

Type: stringoptional
Abbreviated city.
BetaaddressRecordType

Notice: Available only in thev=beta channel.

Type: stringoptional
Type of the address record that matches the input address.
BetacarrierRoute

Notice: Available only in thev=beta channel.

Type: stringoptional
The carrier route code. A four character code consisting of a one letter prefix and a three digit route designator.
BetacarrierRouteIndicator

Notice: Available only in thev=beta channel.

Type: stringoptional
Carrier route rate sort indicator.
BetacassProcessed

Notice: Available only in thev=beta channel.

Type: boolean
Indicator that the request has been CASS processed.
Betacounty

Notice: Available only in thev=beta channel.

Type: stringoptional
County name.
BetadeliveryPointCheckDigit

Notice: Available only in thev=beta channel.

Type: stringoptional
The delivery point check digit. This number is added to the end of the delivery_point_barcode for mechanically scanned mail. Adding all the digits of the delivery_point_barcode, delivery_point_check_digit, postal code, and ZIP+4 together should yield a number divisible by 10.
BetadeliveryPointCode

Notice: Available only in thev=beta channel.

Type: stringoptional
The 2-digit delivery point code.
BetadpvCMRA

Notice: Available only in thev=beta channel.

Type: stringoptional
Indicates if the address is a CMRA (Commercial Mail Receiving Agency)--a private business receiving mail for clients. Returns a single character.
BetadpvConfirmation

Notice: Available only in thev=beta channel.

Type: stringoptional
The possible values for DPV confirmation. Returns a single character or returns no value.
BetadpvDoorNotAccessible

Notice: Available only in thev=beta channel.

Type: stringoptional
Flag indicates addresses where USPS cannot knock on a door to deliver mail. Returns a single character.
BetadpvDrop

Notice: Available only in thev=beta channel.

Type: stringoptional
Flag indicates mail is delivered to a single receptable at a site. Returns a single character.
BetadpvEnhancedDeliveryCode

Notice: Available only in thev=beta channel.

Type: stringoptional
Indicates that more than one DPV return code is valid for the address. Returns a single character.
BetadpvFootnote

Notice: Available only in thev=beta channel.

Type: stringoptional
The footnotes from delivery point validation. Multiple footnotes may be strung together in the same string.
BetadpvNonDeliveryDays

Notice: Available only in thev=beta channel.

Type: stringoptional
Flag indicates mail delivery is not performed every day of the week. Returns a single character.
BetadpvNonDeliveryDaysValues

Notice: Available only in thev=beta channel.

Type: numberoptional
Integer identifying non-delivery days. It can be interrogated using bit flags: 0x40 – Sunday is a non-delivery day 0x20 – Monday is a non-delivery day 0x10 – Tuesday is a non-delivery day 0x08 – Wednesday is a non-delivery day 0x04 – Thursday is a non-delivery day 0x02 – Friday is a non-delivery day 0x01 – Saturday is a non-delivery day
BetadpvNoSecureLocation

Notice: Available only in thev=beta channel.

Type: stringoptional
Flag indicates door is accessible, but package will not be left due to security concerns. Returns a single character.
BetadpvNoStat

Notice: Available only in thev=beta channel.

Type: stringoptional
Indicates whether the address is a no stat address or an active address. No stat addresses are ones which are not continuously occupied or addresses that the USPS does not service. Returns a single character.
BetadpvNoStatReasonCode

Notice: Available only in thev=beta channel.

Type: numberoptional
Indicates the NoStat type. Returns a reason code as int.
BetadpvPBSA

Notice: Available only in thev=beta channel.

Type: stringoptional
Indicates the address was matched to PBSA record. Returns a single character.
BetadpvThrowback

Notice: Available only in thev=beta channel.

Type: stringoptional
Indicates that mail is not delivered to the street address. Returns a single character.
BetadpvVacant

Notice: Available only in thev=beta channel.

Type: stringoptional
Indicates whether the address is vacant. Returns a single character.
BetaelotFlag

Notice: Available only in thev=beta channel.

Type: stringoptional
eLOT Ascending/Descending Flag (A/D).
BetaelotNumber

Notice: Available only in thev=beta channel.

Type: stringoptional
Enhanced Line of Travel (eLOT) number.
BetaerrorMessage

Notice: Available only in thev=beta channel.

Type: stringoptional
Error message for USPS data retrieval. This is populated when USPS processing is suspended because of the detection of artificially created addresses.
BetafipsCountyCode

Notice: Available only in thev=beta channel.

Type: stringoptional
FIPS county code.
BetahasDefaultAddress

Notice: Available only in thev=beta channel.

Type: boolean
Indicator that a default address was found, but more specific addresses exist.
BetahasNoEWSMatch

Notice: Available only in thev=beta channel.

Type: boolean
The delivery address is matchable, but the EWS file indicates that an exact match will be available soon.
BetalacsLinkIndicator

Notice: Available only in thev=beta channel.

Type: stringoptional
LACSLink indicator.
BetalacsLinkReturnCode

Notice: Available only in thev=beta channel.

Type: stringoptional
LACSLink return code.
BetapmbDesignator

Notice: Available only in thev=beta channel.

Type: stringoptional
PMB (Private Mail Box) unit designator.
BetapmbNumber

Notice: Available only in thev=beta channel.

Type: stringoptional
PMB (Private Mail Box) number.
BetapoBoxOnlyPostalCode

Notice: Available only in thev=beta channel.

Type: boolean
PO Box only postal code.
BetapostOfficeCity

Notice: Available only in thev=beta channel.

Type: stringoptional
Main post office city.
BetapostOfficeState

Notice: Available only in thev=beta channel.

Type: stringoptional
Main post office state.
BetastandardizedAddress

Notice: Available only in thev=beta channel.

Type: USPSAddressoptional
USPS standardized address.
BetasuiteLinkFootnote

Notice: Available only in thev=beta channel.

Type: stringoptional
Footnotes from matching a street or highrise record to suite information. If business name match is found, the secondary number is returned.

Verdictclass

google.maps.addressValidation.Verdictclass

Notice: Available only in thev=beta channel.

Represents the post-processed address for the supplied address.

Access by callingconst {Verdict} = await google.maps.importLibrary("addressValidation").
SeeLibraries in the Maps JavaScript API.

Properties

BetaaddressComplete

Notice: Available only in thev=beta channel.

Type: boolean
The address is considered complete if there are no unresolved tokens, no unexpected or missing address components. If unset, indicates that the value isfalse. SeeBetaAddress.missingComponentTypes,BetaAddress.unresolvedTokens orBetaAddressComponent.unexpected fields for more details.
BetageocodeGranularity

Notice: Available only in thev=beta channel.

Type: Granularityoptional
Information about the granularity of theGeocode. This can be understood as the semantic meaning of how coarse or fine the geocoded location is.
BetahasInferredComponents

Notice: Available only in thev=beta channel.

Type: boolean
At least one address component was inferred (i.e. added) that wasn't in the input, seeAddressComponent for details.
BetahasReplacedComponents

Notice: Available only in thev=beta channel.

Type: booleanoptional
At least one address component was replaced - seeAddressComponent for details.
BetahasUnconfirmedComponents

Notice: Available only in thev=beta channel.

Type: boolean
At least one address component cannot be categorized or validated, seeAddressComponent for details.
BetainputGranularity

Notice: Available only in thev=beta channel.

Type: Granularityoptional
The granularity of theinput address. This is the result of parsing the input address and does not give any validation signals. For validation signals, refer tovalidationGranularity.
BetavalidationGranularity

Notice: Available only in thev=beta channel.

Type: Granularityoptional
The granularity level that the API can fullyvalidate the address to. For example, avalidationGranularity ofPREMISE indicates all address components at the level ofPREMISE and broader can be validated.

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 2026-02-06 UTC.