ZIP Code Distance Match
zipcode_distance_matchReturns every pair of ZIP codes whose distance is ≤ a threshold, given a list of codes and a country.
Instructions
Find all pairs of ZIP codes within a given distance threshold. All codes must be in the same country. Returns every pair (code_1, code_2) whose distance is ≤ the threshold.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| codes | Yes | List of ZIP/postal codes to find close pairs within. Example: ["10001", "10002", "10003", "11201"] | |
| country | Yes | ISO 3166-1 alpha-2 country code (e.g. 'US', 'GB', 'DE'). | |
| distance | No | Maximum distance threshold for pairing. Default: 100 (in the selected unit). | |
| unit | No | Distance unit. Default: km. Options: km, mi, yd, m, ft, in. | km |