Response address
object
![Address](/assets/images/address-eda9f35621541b435e9232197d6934fe.png)
The input address (which may be loosely structured) will be geocoded and coerced into a structured address format.
The address
result object will be available if an address
is provided in the input object.
If the lookup is unsuccessful, success
will be false
. If the address can't be geocoded (i.e. a reasonably certain match found for it), valid
will be false
. The success
and valid
properties are always present, but other properties only exist where success
and valid
are true.
Examples
Unsuccessful:
{
...
"address": {
"success": false,
"valid": null
},
...
}
Successful but not valid:
{
...
"address": {
"success": true,
"valid": false
},
...
}
Valid:
{
...
"address": {
"success": true,
"valid": true,
"in_country": true,
"postal_code_match": true,
"address1": "35 Lodgeville Rd",
"address2": "",
"city": "Minneapolis",
"state": "Minnesota",
"country_name": "United States",
"country_code": "US",
"postal_code": "55480",
"latitude": 44.9255,
"longitude": -93.3034,
"seen_hour": 1,
"seen_day": 1,
"seen_month": 1,
"seen_quarter": 1
},
...
}
Properties
Property | Description | Type |
---|---|---|
success | Set to true only if the lookup is successful. | boolean |
valid | Set to true if a match is found (i.e. the address is successfully geocoded), or null if the lookup is not successful. | boolean or null |
in_country | Set to true if the address is found to be in the site's country. | boolean |
postal_code_match | If the postal code provided in the input address matches the geocoded address, set to true . Set to null where the input or matched address postal codes are not known or ambiguous. | boolean or null |
address1 | First line of address. | string or null |
address2 | Second line of address. | string or null |
city | Address city. | string or null |
state | Address state. | string or null |
country_name | Full name of the address country. | string or null |
country_code | Two-letter ISO 3166-1 alpha-2 country code. | string or null |
postal_code | Address postal code. | string or null |
latitude | Address coordinates latitude to 4 decimal places. | decimal or null |
longitude | Address coordinates longitude to 4 decimal places. | decimal or null |
seen_hour | Number of times events have been seen with this postal code since the start of the previous hour. Or null if the postal code is not present. | integer or null |
seen_day | Number of times events have been seen with this postal code since yesterday. Or null if the postal code is not present. | integer or null |
seen_month | Number of times events have been seen with this postal code since the start of last month. Or null if the postal code is not present. | integer or null |
seen_quarter | Number of times events have been seen with this postal code since the start of the last calendar quarter. Or null if the postal code is not present. | integer or null |