Get Detailed zip code from city state OR detailed zipcode report.

FREE
By snapCX
Updated 4 months ago
Commerce
6.6/10
Popularity Score
585ms
Latency
-
Success Rate

Get Detailed zip code from city state OR detailed zipcode report. API Documentation

This FREE API has two features. First feature is, "Given City and State (2 char state code), it will get all zipcodes for it". And second feature is "Given zipcode, then it will get city & state for it". It also provides other details like type of zipcode (PO Box or standard or unique). It provides latitude & longitude of zipcode center.

View API Details
GET/zipInfo
GET/zipInfo

This FREE API has two features. First feature is, "Given City and State (2 char state code), it will get all zipcodes for it". And second feature is "Given zipcode, then it will get city & state for it". It also provides other details like type of zipcode (PO Box or standard or unique). It provides latitude & longitude of zipcode center.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Optional Parameters
request_idSTRING
OPTIONALSend unique Request Id. It is returned as part of response.
zipcodeSTRING
OPTIONAL5 Digit zipcode. If entered, then it will get details of this zipcode.
citySTRING
OPTIONALIf zipcode is not present but city & state present, then it will lookup zipcode for it.
stateSTRING
OPTIONALIf zipcode is not present but city & state present, then it will lookup zipcode for it.
Code Snippet
unirest.get("https://snapcx-zipinfo-v1.p.rapidapi.com/zipInfo")
.header("X-RapidAPI-Host", "snapcx-zipinfo-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://snapcx-zipinfo-v1.p.rapidapi.com/zipInfo
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://snapcx-zipinfo-v1.p.rapidapi.com/zipInfo")
.header("X-RapidAPI-Host", "snapcx-zipinfo-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication