This service uses the United States Postal Service information but draws a geofence around the primary location with a given radius. The information should be considered "as the crow flies" and not a driving range.
Field | Required | Description |
---|---|---|
zipcode | Yes | 5 Digit U.S. postal code |
distance | Yes | Miles between 1 and 100 |
https://json.theeasyapi.com/{api_key}/?service=zipcoderadius&zipcode=90210&distance=2
{
"zipcodes": [
{
"zipcode": "90210",
"cityname": "Beverly Hills",
"citytype": "Primary",
"countyname": "Los Angeles",
"countyfips": "06037",
"statename": "California",
"stateabbr": "CA",
"statefips": "06",
"msacode": "4480",
"areacode": "310/424",
"timezone": "Pacific",
"utc": "-8.0",
"dst": "Y",
"latitude": " 34.096629",
"longitude": "-118.412426",
"distance": "0"
},
{
"zipcode": "90069",
"cityname": "West Hollywood",
"citytype": "Primary",
"countyname": "Los Angeles",
"countyfips": "06037",
"statename": "California",
"stateabbr": "CA",
"statefips": "06",
"msacode": "4480",
"areacode": "323",
"timezone": "Pacific",
"utc": "-8.0",
"dst": "Y",
"latitude": " 34.091537",
"longitude": "-118.382020",
"distance": "1.7750804012922"
}
]
}
https://json.theeasyapi.com/{api_key}/?service=zipcoderadius&zipcode=00010&distance=2
{
"errors": "1",
"errorcode": "zipcoderadius_1000",
"reason": "Zip Code Radius Result-The zip code you used was invalid. Please check your number and try again."
}
{
"errors": "1",
"errorcode": "1006",
"reason": "Service Problem - Criteria validation failed. Refer to documentation."
}