0% found this document useful (0 votes)
37 views

Zip Code API Documentation

This document summarizes an API for obtaining geographic distance and location information for US and Canadian zip/postal codes. It provides examples of API endpoints for getting distance between two codes, distance from one code to multiple others, and location details for individual or multiple codes. It notes requirements for supported country codes and formatting Canadian postal codes. Usage is subject to terms of use and limited to 10 free requests per hour.

Uploaded by

Santosh Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Zip Code API Documentation

This document summarizes an API for obtaining geographic distance and location information for US and Canadian zip/postal codes. It provides examples of API endpoints for getting distance between two codes, distance from one code to multiple others, and location details for individual or multiple codes. It notes requirements for supported country codes and formatting Canadian postal codes. Usage is subject to terms of use and limited to 10 free requests per hour.

Uploaded by

Santosh Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Live API

Get Free
Application Key

Register

Low Cost
Upgrades
Upgrade

Set up JavaScript
Access
Use on Your Website

Important! Our API only supports US zip


codes and Canadian postal codes. You must
use the appropriate endpoint for the country
you desire.

When working with CA postal codes in URLs,


you must either remove the space or URL
encode it (e.g. with a plus sign). For example,
A0A 1A0 should appear in the URL as A0A1A0
or A0A+1A0. The data for the Canadian API is
sourced from the GeoNames data sets, which
are licensed under the Creative Commons
Attribution 4.0 License.

US City/State
Auto-Fill

Canadian
City/Province
Auto-Fill

US Zip Code
Distance

US Zip Code
Distance

Use this API to determine the distance


between two US zip codes. Send a GET
request to
https://www.zipcodeapi.com/rest/<ap
i_key>/distance.
<format>/<zip_code1>/<zip_code2>/<u
nits>
.

API Key

DemoOnly00LyoUaByyMsRFx1iz9iU5rFgdagacdb

Format US Zip Code 1


json
Zip Code

US Zip Code 2 Units


km
Zip Code

Make Request

CA Postal Code
Distance

Multiple US Zip
Code Distances

Use this API to determine the distance


between one US zip code and multiple other
US zip codes. Send a GET request to
https://www.zipcodeapi.com/rest/<ap
i_key>/multi-distance.
<format>/<zip_code>/<other_zip_code
s>/<units>
.

Each zip code provided will count as a


separate request. For example, if you send 5
zip codes, you will be charged for 5 requests.
Any zip code not found will not be included in
the response.

API Key

DemoOnly00LyoUaByyMsRFx1iz9iU5rFgdagacdb

Format US Zip Code


json
Zip Code

US Zip Codes 9Comma separated) ; 100 Max

Zip Code 1, Zip Code 2, …

Units
mile

Make Request

US Zip Codes by
Radius

CA Postal Codes
by Radius

Multiple US Zip
Codes by Radius

Find Close US Zip


Codes

US Zip Code to
Location
Information

CA Postal Code to
Location
Information

Multiple US Zip
Codes to Location
Information

US Location to Zip
Codes

CA Location to
Postal Codes

US State to Zip
Codes

Latitude/Longitude
SQL WHERE
Clause for Radius

Use of this API is subject to our Terms of Use.


You must create an account to use the API.
It's simple and 100% free for up to 10
requests per hour. You can view our Usage
Plans for information on usage above 10
requests/hr.

To prevent abuse, the API key on this page is


periodically regenerated. If your request failed
with an error message indicating that the API
key is not found, please reload the page and
try again. We also will intentionally return
incorrect values for this demo if our system
detects abuse.

Error Codes

Error codes are returned via the HTTP


response code.

Status
Reason
Code

400 The request format was not correct.

The API key was not found, was not


401
activated, or has been disabled.

A zip code you provided was not


404
found.

The usage limit for your application has


429 been exceeded for the hour time
period.

Blog

Terms of
Use

RedLine13

You might also like