Validate
The Validate API verifies and corrects incomplete address data.
Request
GET POST https://api.getAddress.io/validate/{unstructured address}?api-key={api-key}
Successful Response
{
"status": 200,
"address": {
"postcode": "SW11 6DF",
"latitude": 51.457751,
"longitude": -0.164772,
"formatted_address": [
"91 Salcott Road",
"",
"",
"London",
""
],
"thoroughfare": "Salcott Road",
"building_name": "",
"sub_building_name": "",
"sub_building_number": "",
"building_number": "91",
"line_1": "91 Salcott Road",
"line_2": "",
"line_3": "",
"line_4": "",
"locality": "",
"town_or_city": "London",
"county": "",
"district": "Wandsworth",
"country": "England",
"residential": true
}
}
Not Found Response
{
"status": 404,
"address": {
"postcode": "",
"latitude": 0,
"longitude": 0,
"formatted_address": [
"",
"",
"",
"",
""
],
"thoroughfare": "",
"building_name": "",
"sub_building_name": "",
"sub_building_number": "",
"building_number": "",
"line_1": "",
"line_2": "",
"line_3": "",
"line_4": "",
"locality": "",
"town_or_city": "",
"county": "",
"district": "",
"country": "",
"residential": false
}
}
Multiple Addresses Found
{
"status": 300,
"address": {
"postcode": "",
"latitude": 0,
"longitude": 0,
"formatted_address": [
"",
"",
"",
"",
""
],
"thoroughfare": "",
"building_name": "",
"sub_building_name": "",
"sub_building_number": "",
"building_number": "",
"line_1": "",
"line_2": "",
"line_3": "",
"line_4": "",
"locality": "",
"town_or_city": "",
"county": "",
"district": "",
"country": "",
"residential": false
}
}
Other Parameters
| Property | Default | Description | Type |
|---|---|---|---|
| strict | true | When true, a status 300 is returned when multiple addresses can be found. When false, the most likely address is returned. | true/false |
| residential | Not set | When true, only residential addresses are searched. When false, only company addresses are searched. | true/false |