Postal Lookup
Look up a postal or ZIP code to get location details.
GET
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Required | Postal or ZIP code |
country | string | Required | ISO2 country code |
Request Example
curl "https://api.localityapi.com/v1/postal?code=SW1A&country=GB" \
-H "X-API-Key: lapi_your_key"Response
json
{
"postal_code": "SW1A",
"place_name": "Westminster Abbey",
"country": "GB",
"lat": 51.5018,
"lng": -0.1277,
"query_ms": 6
}Response Fields
postal_codestringThe postal/ZIP codeplace_namestringPlace or area namecountrystringISO2 country codelatnumberLatitudelngnumberLongitudequery_msintegerQuery execution time in milliseconds