The Zip Code API provides access to resources (data entities) via URI paths. To use a REST API, your application will make an HTTP request and parse the response. By default, the response format is XML. Because the REST API is based on open standards, you can use any web development language to access the API.
Most Comprehensive ZIP Code Data Available: USA 5 digit zip code and Canadian postal code database.
How to use the Zip Code API: With the API, User Authentication is Necessary for every request and hence adding an api key parameter in every request is a must. Another necessary field is country, it's necessary because on the basis of country we can differentiate which database user has sent the request. PageNumber or PostalCode parameter will also be necessary. Page size will be 100 if/where PageNumber parameter will be used.
Country Parameter Abbreviation in URI:
For USA5 database in URI request parameter: country=us5
For Canada database in URI request parameter: country=ca
*Every row returned as result in list-based APIs is counted and considered as a separate API request.
All API query parameters in below examples marked with * are mandatory parameters.
This API can be used to get details about a ZIP code and can filter results with many parameters. Either postalcode or pagenumber paremeter is mandatory along with country parameter.
Response
This API can be used to get details of all possible city names matching supplied substring in parameter with a GET request.
Response
This API can be used to get details of a list of comma separated valid ZIP codes with a GET request. Every zip/postal code will be considered as a separate request.
*Below sample list of 5 zip codes are counted as 5 separate API requests.
Response
This API can be used to get details about a ZIP code and can filter results with many parameters.
Response
This API can be used to determine ZIP codes within specified radius of supplied valid ZIP code with a GET request.
Response
This API can be used to get distances between 2 zipcodes from of a list of comma separated valid ZIP codes with a GET request. Permutation of ZIP code pairs and distances between the 2 ZIP codes calculated. Every zipcode will be considered as a separate request. Leaving "distance" empty/blank will remove the distance filter and return all results.
Response