LocalityAPI
Get API Key

Address Validator

Validate address combinations with confidence scoring.

GET

Parameters

ParameterTypeRequiredDescription
citystringOptionalCity name to validate
postalstringOptionalPostal or ZIP code to validate
countrystringRequiredISO2 country code (required)
streetstringOptionalStreet 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 valid
confidenceintegerConfidence score from 0-100
countrystringValidated country code
city_normalizedstringCanonical city name
latitudenumberLatitude of validated location
longitudenumberLongitude of validated location
issuesarrayList of validation issues found
query_msintegerQuery execution time in milliseconds