Address Validator
Validate address combinations with confidence scoring.
GET
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
city | string | Optional | City name to validate |
postal | string | Optional | Postal or ZIP code to validate |
country | string | Required | ISO2 country code (required) |
street | string | Optional | Street name to validate |
Request Example
curl "https://api.localityapi.com/v1/validate?city=London&country=GB" \
-H "X-API-Key: lapi_your_key"Response
json
{
"valid": true,
"confidence": 40,
"country": "GB",
"city_normalized": "London",
"latitude": 51.50853,
"longitude": -0.12574,
"issues": [],
"query_ms": 37
}Response Fields
validbooleanWhether the address combination is validconfidenceintegerConfidence score from 0-100countrystringValidated country codecity_normalizedstringCanonical city namelatitudenumberLatitude of validated locationlongitudenumberLongitude of validated locationissuesarrayList of validation issues foundquery_msintegerQuery execution time in milliseconds