Validate a postal address
validate_addressChecks postal addresses for validity and deliverability, returns standardized components, and optionally provides coordinates.
Instructions
Validate and standardize a postal address and return its status, standardized address components, and optionally its coordinates.
Result fields:
status (string): VALID: address is correct and deliverable. SUSPECT: address is incorrect and needs corrections to be deliverable, a suggested correction is provided. INVALID: address is incorrect and not deliverable - either there is no match at all in the reference data or the address is ambiguous and there are a lot of different matches. In these cases automatic correction suggestions are not available. DELAYED, NO_COUNTRY, RATE_LIMIT_EXCEEDED, API_KEY_INVALID_OR_DEPLETED, RESTRICTED, INTERNAL_ERROR
formattedaddress (string): full address in standardized format
supplement (string): additional address details (building / unit / apt / suite etc.)
street (string): street address in standardized format
streetnumber (string): street number in standardized format
postalcode (string): zip / postal code in standardized format
city (string): city in standardized format
type (string): address type: S = Street address | P = P.O. Box, Pick-Up or other delivery service
rdi (string): Residential Delivery Indicator (Commercial / Residential)
district (string): district in standardized format
county (string): county in standardized format
state (string): state / province in standardized format
country (string): two-letter ISO 3166-1 country code
latitude (number): latitude (for valid addresses if Geocoding is enabled)
longitude (number): longitude (for valid addresses if Geocoding is enabled)
diagnostics (string): detailed diagnostic hints, indicating errors in the address input
corrections (string): detailed correction hints, indicating which parts of the address input have been fixed
ratelimit_remain (int): number of API requests remaining before the API rate limit is reached (the default API rate limit allows 100 API requests in 300s)
ratelimit_seconds (int): number of seconds remaining in the current rate limit interval
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | No | ||
| code | Yes | Two-letter ISO 3166-1 country code, 'XX' for international | |
| state | No | ||
| locale | No | Output language for countries with multiple postal languages, as an IETF language tag. Use only to translate addresses; always leave empty for address validation | |
| charset | No | Output character set: 'utf-8' or 'us-ascii' | utf-8 |
| timeout | No | Timeout in seconds (min 5, max 300, default 10) | |
| geocoding | No | Return latitude and longitude for valid addresses | |
| street_adr | Yes | Street, house number and building, may include unit/apt etc. May also contain the complete address (leave the other optional fields empty then). Always use ',' to separate address elements where required | |
| street_num | No | House number/building, if it isn't part of street_adr | |
| postal_code | No | ||
| additional_info | No | Building/unit/apt/floor etc. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||