Index
AddressValidation
(interface)Address
(message)AddressComponent
(message)AddressComponent.ConfirmationLevel
(enum)AddressMetadata
(message)ComponentName
(message)Geocode
(message)LanguageOptions
(message)PlusCode
(message)ProvideValidationFeedbackRequest
(message)ProvideValidationFeedbackRequest.ValidationConclusion
(enum)ProvideValidationFeedbackResponse
(message)UspsAddress
(message)UspsData
(message)ValidateAddressRequest
(message)ValidateAddressResponse
(message)ValidationResult
(message)Verdict
(message)Verdict.Granularity
(enum)
AddressValidation
The service for validating addresses.
ProvideValidationFeedback |
---|
Feedback about the outcome of the sequence of validation attempts. This should be the last call made after a sequence of validation calls for the same address, and should be called once the transaction is concluded. This should only be sent once for the sequence of |
ValidateAddress |
---|
Validates an address. |
Address
Details of the post-processed address. Post-processing includes correcting misspelled parts of the address, replacing incorrect parts, and inferring missing parts.
Fields | |
---|---|
formatted_ |
The post-processed address, formatted as a single-line address following the address formatting rules of the region where the address is located. Note: the format of this address may not match the format of the address in the |
postal_ |
The post-processed address represented as a postal address. |
address_ |
Unordered list. 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. Address components are not ordered in a particular way. Do not make any assumptions on the ordering of the address components in the list. |
missing_ |
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 in |
unconfirmed_ |
The types of the components that are present in the |
unresolved_ |
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, for an input such as "Parcel 0000123123 & 0000456456 Str # Guthrie Center IA 50115 US", the unresolved tokens might look like |
AddressComponent
Represents an address component, such as a street, city, or state.
Fields | |
---|---|
component_ |
The name for this component. |
component_ |
The type of the address component. See Table 2: Additional types returned by the Places service for a list of possible types. |
confirmation_ |
Indicates the level of certainty that we have that the component is correct. |
inferred |
Indicates that the component was not part of the input, but we inferred it for the address location and believe it should be provided for a complete address. |
spell_ |
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 when changing "centre" to "center". It also does not always flag common misspellings, such as when changing "Amphitheater Pkwy" to "Amphitheatre Pkwy". |
replaced |
Indicates the name of the component was replaced with a completely different one, for example a wrong postal code being replaced with one that is correct for the address. This is not a cosmetic change, the input component has been changed to a different one. |
unexpected |
Indicates an address component that is not expected to be present in a postal address for the given region. We have retained it only because it was part of the input. |
ConfirmationLevel
The different possible values for confirmation levels.
Enums | |
---|---|
CONFIRMATION_LEVEL_UNSPECIFIED |
Default value. This value is unused. |
CONFIRMED |
We were able to verify that this component exists and makes sense in the context of the rest of the address. |
UNCONFIRMED_BUT_PLAUSIBLE |
This component could not be confirmed, but it is plausible that it exists. For example, a street number within a known valid range of numbers on a street where specific house numbers are not known. |
UNCONFIRMED_AND_SUSPICIOUS |
This component was not confirmed and is likely to be wrong. For example, a neighborhood that does not fit the rest of the address. |
AddressMetadata
The metadata for the address. metadata
is not guaranteed to be fully populated for every address sent to the Address Validation API.
Fields | |
---|---|
business |
Indicates that this is the address of a business. If unset, indicates that the value is unknown. |
po_ |
Indicates that the address of a PO box. If unset, indicates that the value is unknown. |
residential |
Indicates that this is the address of a residence. If unset, indicates that the value is unknown. |
ComponentName
A wrapper for the name of the component.
Fields | |
---|---|
text |
The name text. For example, "5th Avenue" for a street name or "1253" for a street number. |
language_ |
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. |
Geocode
Contains information about the place the input was geocoded to.
Fields | |
---|---|
location |
The geocoded location of the input. Using place IDs is preferred over using addresses, latitude/longitude coordinates, or plus codes. Using coordinates when 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. |
plus_ |
The plus code corresponding to the |
bounds |
The bounds of the geocoded place. |
feature_ |
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. |
place_ |
The PlaceID of the place this input geocodes to. For more information about Place IDs see here. |
place_ |
The type(s) of place that the input geocoded to. For example, |
LanguageOptions
Preview: This feature is in Preview (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the Google Maps Platform Service Specific Terms. For more information, see the launch stage descriptions.
Enables the Address Validation API to include additional information in the response.
Fields | |
---|---|
return_ |
Preview: Return a |
PlusCode
Plus code (http://plus.codes) is a location reference with two formats: global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and compound code, replacing the prefix with a reference location.
Fields | |
---|---|
global_ |
Place's global (full) code, such as "9FWM33GV+HQ", representing an 1/8000 by 1/8000 degree area (~14 by 14 meters). |
compound_ |
Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing the suffix of the global code and replacing the prefix with a formatted name of a reference entity. |
ProvideValidationFeedbackRequest
The request for sending validation feedback.
Fields | |
---|---|
conclusion |
Required. The outcome of the sequence of validation attempts. If this field is set to |
response_ |
Required. The ID of the response that this feedback is for. This should be the [response_id][google.maps.addressvalidation.v1.ValidateAddressRequest.response_id] from the first response in a series of address validation attempts. |
ValidationConclusion
The possible final outcomes of the sequence of address validation requests needed to validate an address.
Enums | |
---|---|
VALIDATION_CONCLUSION_UNSPECIFIED |
This value is unused. If the ProvideValidationFeedbackRequest.conclusion field is set to VALIDATION_CONCLUSION_UNSPECIFIED , an INVALID_ARGUMENT error will be returned. |
VALIDATED_VERSION_USED |
The version of the address returned by the Address Validation API was used for the transaction. |
USER_VERSION_USED |
The version of the address provided by the user was used for the transaction |
UNVALIDATED_VERSION_USED |
A version of the address that was entered after the last validation attempt but that was not re-validated was used for the transaction. |
UNUSED |
The transaction was abandoned and the address was not used. |
ProvideValidationFeedbackResponse
This type has no fields.
The response for validation feedback.
The response is empty if the feedback is sent successfully.
UspsAddress
USPS representation of a US address.
Fields | |
---|---|
first_ |
First address line. |
firm |
Firm name. |
second_ |
Second address line. |
urbanization |
Puerto Rican urbanization name. |
city_ |
City + state + postal code. |
city |
City name. |
state |
2 letter state code. |
zip_ |
Postal code e.g. 10009. |
zip_ |
4-digit postal code extension e.g. 5023. |
UspsData
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.
Fields | |
---|---|
standardized_ |
USPS standardized address. |
delivery_ |
2 digit delivery point code |
delivery_ |
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. |
dpv_ |
The possible values for DPV confirmation. Returns a single character or returns no value.
|
dpv_ |
The footnotes from delivery point validation. Multiple footnotes may be strung together in the same string.
|
dpv_ |
Indicates if the address is a CMRA (Commercial Mail Receiving Agency)--a private business receiving mail for clients. Returns a single character.
|
dpv_ |
Is this place vacant? Returns a single character.
|
dpv_ |
Is this 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.
|
dpv_ |
Indicates the NoStat type. Returns a reason code as int.
|
dpv_ |
Flag indicates mail is delivered to a single receptable at a site. Returns a single character.
|
dpv_ |
Indicates that mail is not delivered to the street address. Returns a single character.
|
dpv_ |
Flag indicates mail delivery is not performed every day of the week. Returns a single character.
|
dpv_ |
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 |
dpv_ |
Flag indicates door is accessible, but package will not be left due to security concerns. Returns a single character.
|
dpv_ |
Indicates the address was matched to PBSA record. Returns a single character.
|
dpv_ |
Flag indicates addresses where USPS cannot knock on a door to deliver mail. Returns a single character.
|
dpv_ |
Indicates that more than one DPV return code is valid for the address. Returns a single character.
|
carrier_ |
The carrier route code. A four character code consisting of a one letter prefix and a three digit route designator. Prefixes:
|
carrier_ |
Carrier route rate sort indicator. |
ews_ |
The delivery address is matchable, but the EWS file indicates that an exact match will be available soon. |
post_ |
Main post office city. |
post_ |
Main post office state. |
abbreviated_ |
Abbreviated city. |
fips_ |
FIPS county code. |
county |
County name. |
elot_ |
Enhanced Line of Travel (eLOT) number. |
elot_ |
eLOT Ascending/Descending Flag (A/D). |
lacs_ |
LACSLink return code. |
lacs_ |
LACSLink indicator. |
po_ |
PO Box only postal code. |
suitelink_ |
Footnotes from matching a street or highrise record to suite information. If business name match is found, the secondary number is returned.
|
pmb_ |
PMB (Private Mail Box) unit designator. |
pmb_ |
PMB (Private Mail Box) number; |
address_ |
Type of the address record that matches the input address.
|
default_ |
Indicator that a default address was found, but more specific addresses exists. |
error_ |
Error message for USPS data retrieval. This is populated when USPS processing is suspended because of the detection of artificially created addresses. The USPS data fields might not be populated when this error is present. |
cass_ |
Indicator that the request has been CASS processed. |
ValidateAddressRequest
The request for validating an address.
Fields | |
---|---|
address |
Required. The address being validated. Unformatted addresses should be submitted via The total length of the fields in this input must not exceed 280 characters. Supported regions can be found here. The The Address Validation API ignores the values in |
previous_ |
This field must be empty 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 the |
enable_ |
Enables USPS CASS compatible mode. This affects only the It's recommended to use a componentized |
language_ |
Optional. Preview: This feature is in Preview (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the Google Maps Platform Service Specific Terms. For more information, see the launch stage descriptions. Enables the Address Validation API to include additional information in the response. |
session_ |
Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned. The session begins when the user makes an Autocomplete query, and concludes when they select a place and a call to Place Details or Address Validation is made. Each session can have multiple Autocomplete queries, followed by one Place Details or Address Validation request. The credentials used for each request within a session must belong to the same Google Cloud Console project. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session. If the Note: Address Validation can only be used in sessions with the Autocomplete (New) API, not the Autocomplete API. See https://developers.google.com/maps/documentation/places/web-service/session-pricing for more details. |
ValidateAddressResponse
The response to an address validation request.
Fields | |
---|---|
result |
The result of the address validation. |
response_ |
The UUID that identifies this response. If the address needs to be re-validated, this UUID must accompany the new request. |
ValidationResult
The result of validating an address.
Fields | |
---|---|
verdict |
Overall verdict flags |
address |
Information about the address itself as opposed to the geocode. |
geocode |
Information about the location and place that the address geocoded to. |
metadata |
Other information relevant to deliverability. |
usps_ |
Extra deliverability flags provided by USPS. Only provided in region |
english_ |
Preview: This feature is in Preview (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the Google Maps Platform Service Specific Terms. For more information, see the launch stage descriptions. The address translated to English. Translated addresses are not reusable as API input. The service provides them so that the user can use their native language to confirm or deny the validation of the originally-provided address. If part of the address doesn't have an English translation, the service returns that part in an alternate language that uses a Latin script. See here for an explanation of how the alternate language is selected. If part of the address doesn't have any translations or transliterations in a language that uses a Latin script, the service returns that part in the local language associated with the address. Enable this output by using the Note: the |
Verdict
High level overview of the address validation result and geocode.
Fields | |
---|---|
input_ |
The granularity of the input address. This is the result of parsing the input address and does not give any validation signals. For validation signals, refer to For example, if the input address includes a specific apartment number, then the |
validation_ |
The granularity level that the API can fully validate the address to. For example, an Per address component validation result can be found in |
geocode_ |
Information about the granularity of the This can differ from the |
address_ |
The address is considered complete if there are no unresolved tokens, no unexpected or missing address components. If unset, indicates that the value is |
has_ |
At least one address component cannot be categorized or validated, see |
has_ |
At least one address component was inferred (added) that wasn't in the input, see |
has_ |
At least one address component was replaced, see |
Granularity
The various granularities that an address or a geocode can have. When used to indicate granularity for an address, 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 a PREMISE
while something like "Redwood City, CA, 94061" identifies a LOCALITY
. However, if we are unable to find a geocode for "123 Main Street" in Redwood City, the geocode returned might be of LOCALITY
granularity even though the address is more granular.
Enums | |
---|---|
GRANULARITY_UNSPECIFIED |
Default value. This value is unused. |
SUB_PREMISE |
Below-building level result, such as an apartment. |
PREMISE |
Building-level result. |
PREMISE_PROXIMITY |
A geocode that approximates the building-level location of the address. |
BLOCK |
The address or geocode indicates a block. Only used in regions which have block-level addressing, such as Japan. |
ROUTE |
The geocode or address is granular to route, such as a street, road, or highway. |
OTHER |
All other granularities, which are bucketed together since they are not deliverable. |