Postcodez Zip Code APIThe Postcodez.com API is a RESTful service that provides United States postal data and zip codes in various formats. Because the service is free and doesn't require registration, we've mitaged the potential for abuse by rate limiting unreasonable requests and we truncate various types of output.
LimitationsWhen searching zip codes as a distance from another zip code we'll return 100 results. If searching for zipcodes as a distance from a geographic point (lat/long) then, again, we'll limit results to 100. If you're searching multiple zip codes, we'll only accept 25 - regardless of whether they're valid or not.
Need Something More?If you feel that our limits don't meet the needs of your service, get in touch and we'll white-list your application.
zipAPI.netThe
Postcodez service is in 'beta' but will always be available and will always be free. Our full featured (registration based) API will become available at some point in the future at
zipAPI.net.
API Usage
Distance Between two United States Zip Codes
http://www.postcodez.com/api/distance/<zipcode>/<zipcode>/api.xml ▶
Result:
Search Multiple Zip Codes
The format to search mutiple Zip Codes is as follows:
http://www.postcodez.com/api/zip/<zipcode>,<zipcode>,<zipcode>/api.xml ▶
To retrieve details of a
single Zip Code, simply use the following:
http://www.postcodez.com/api/zip/<zipcode>/api.xml ▶
Result:
Search Zip Codes Within a Radius of Another Zip Code
http://www.postcodez.com/api/nearby/<zipcode>/<Distance><Unit>/api.xml ▶
Result:
Search Zip Codes Within a Radius of GeoGraphic Coordinates
http://www.postcodez.com/api/geo/<latitude>/<longitude>/<Distance><Unit>/api.xml ▶
Result:
Error Codes
200 | OK |
404 | No results found |
405 | Zip codes must be 5 characters in length |
406 | One zip code is invalid |
420 | Rate Limited |
421 | Input is invalid |
423 | API Unavailable |
424 | Source zipcode does not exist |
Example XML Error:
Rate Limiting Rules (General)
▶ 5 requests in 5 seconds results in a 15 second block time. ▶ 10 requests in 30 seconds results in a 20 second block time. ▶ 100 requests in 3600 seconds results in a 600 second block time. 100 requests in a single hour is a general limit. We will increase this after the load to the server is known. ▶ 10 requests in 1 seconds results in a 86400 second block time. 10 requests in a single hour is a general limit. We will increase this after the load to the server is known. ▶ 25 requests in 3 seconds results in a 259200 second block time. 25 requests in three seconds results in a three-day block. These limits WILL increase. |
Terms of Use
By using the Postcodez.com API, you agree to these simple terms of use. You may use the API as-is for any purpose. You alone are responsible for any damage that you or your users encounter from using services from this API. The data provided may be cached locally for performance, but for no longer than 7 days. We accept no responsibility for any downtime, damage or errors, invalid/incorrect data or the consequences of information we provide. These terms are subject to change without notice and will be updated on this page.