US Weather By Zip Code

FREEMIUM
By interzoid
Updated 9 days ago
Weather
1.9/10
Popularity Score
383ms
Latency
100%
Success Rate

US Weather By Zip Code API Documentation

Provides current weather information for US cities by zip code

View API Details
GETGet Weather By Zip
GETGet Weather By Zip

Retrieves current US weather information

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
zipSTRING
REQUIREDZip code
Code Snippet
unirest.get("https://us-weather-by-zip-code.p.rapidapi.com/getweatherzipcode?zip=94111")
.header("X-RapidAPI-Host", "us-weather-by-zip-code.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://us-weather-by-zip-code.p.rapidapi.com/getweatherzipcode
Request Method: GET
Response Headers
"content-type": "application/json"
"date": "Wed, 10 Jul 2019 22:09:24 GMT"
"server": "RapidAPI-1.0.20"
"x-rapidapi-region": "AWS - us-west-2"
"x-rapidapi-version": "1.0.20"
"content-length": "216"
"connection": "Close"
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://us-weather-by-zip-code.p.rapidapi.com/getweatherzipcode?zip=94111")
.header("X-RapidAPI-Host", "us-weather-by-zip-code.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