Places by postal code

get
/{country}/{postalcode}

Look up places by postal code and country.

Note: This endpoint will return multiple places where applicable!

In the United States, the place name returned will likely be whatever USPS says is the "Recommended City Name" for that postal code. This often surprises folks, as they may be used to using the name of the city the address is located in. For example, 84341 returns "Logan" as its place name, but folks in North Logan also use this same postal code.

You can verify this by using the USPS tool to lookup a zip code, and see the "Recommended City Name" alongside "Other City Names Recognized".

Path Parameters

Each path parameter is required.

Parameter Description Example
country ISO 3166-1 Alpha-2 country code US
postalcode Postal code to query place 84321

Postal codes by place

get
/{country}/{state}/{place}

Look up postal codes by the name of place.

In the United States, this endpoint will not return any results if there aren't any zip codes associated with the place name. This is a common occurrence in locations where the United States Postal Service services multiple places through the same post office.

Path Parameters

Each path parameter is required.

Parameter Description Example
country ISO 3166-1 Alpha-2 country code US
state Two letter state/province abbreviation UT
place Name of place (city, town, etc.) Logan

Places near postal code

get
/nearby/{country}/{postalcode}

Nearby places by postal code and country

Provided postalCode can be found in country, this endpoint returns other postal codes and their associated places. Like the other endpoints, the places returned are only going to be places that have an associated postal code.

This endpoint is limited to getting the nearest 11 places.

Path Parameters

Each path parameter is required.

Parameter Description Example
country ISO 3166-1 Alpha-2 country code US
postalcode Postal code to query place 84321