Look up a postal code

Resolve a postal/ZIP code to its place name, administrative regions, and coordinates. Covers ~100 countries (GeoNames). Coordinates are approximate and a few countries have reduced precision.

GET
/postal/{country}/{code}

Resolve a postal/ZIP code to its place name, administrative regions, and coordinates. Covers ~100 countries (GeoNames). Coordinates are approximate and a few countries have reduced precision.

Path Parameters

country*string

ISO 3166-1 alpha-2 country code.

code*string

Postal / ZIP code.

Response Body

application/json

text/plain

curl -X GET "https://example.com/postal/US/10001"
[  {    "countryCode": "US",    "postalCode": "10001",    "placeName": "New York City",    "admin1": {      "name": "New York",      "code": "NY"    },    "admin2": {      "name": "string",      "code": "string"    },    "latitude": 40.7484,    "longitude": -73.9967,    "accuracy": 4  }]
"Country not found"