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.
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
ISO 3166-1 alpha-2 country code.
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"Distance between two points GET
Great-circle (haversine) distance between two locations. Pass two city GeoNames ids as `from` and `to`, or raw coordinates as `lat1`, `lng1`, `lat2`, `lng2`. Returns the distance in both kilometres and miles.
Filter countries by region GET
Returns every country in the given region (exact match, case-insensitive).