Loading
Loading
Find all pairs of ZIP or postal codes from a provided list that fall within a specified distance threshold of each other. Returns every matched pair with their calculated distance.
Send a list of up to 100 ZIP codes and a maximum distance threshold. The API evaluates all combinations and returns pairs that are within the threshold. Useful for proximity-based filtering and delivery zone analysis.
Pass your API key as the apiKey parameter in every request.
This is version v1.0 of the API.
Send a JSON body with a codes array of postal codes to compare. Use distance to set the maximum threshold and unit to set the distance unit.
codesrequiredarrayList of ZIP or postal codes to find pairs within the specified distance. Max 100.
countryrequiredstringCountry of the ZIP/postal codes in ISO 3166-1 alpha-2 format.
distanceoptionalfloatdefault: 100Maximum distance threshold. All pairs within this distance are returned.
unitoptionalstringdefault: kmDistance measuring unit. Allowed: 'km', 'mi', 'yd', 'm', 'ft', 'in'. Default: km.
The request body must be a JSON object containing a codes array of postal codes, an optional distance threshold, an optional country, and an optional unit for the distance unit.
{
"codes": [
"10001",
"11201",
"10301"
],
"country": "US",
"distance": 50,
"unit": "km"
}Returns 200 OK with result_count and a results array of matched pairs, each with two codes and their distance.
result_countTotal number of postal code pairs returned.
resultsArray of matched postal code pairs with distance.
results[].code_1The first postal code in the matched pair.
results[].code_2The second postal code in the matched pair.
results[].distanceDistance between the two postal codes in the requested unit.
The API uses standard HTTP status codes to indicate the success or failure of requests. For common status codes like 429 (Too Many Requests), refer to the general API documentation.
The provided unit symbol is invalid. Please refer to the documentation for supported units.
Only ISO 3166-1 alpha-2 codes country codes are supported.
A maximum of 100 postal/zip codes can be processed per request.
None of the provided postal/zip codes were found in our database.