Air Quality

FREEMIUM
By weatherbit
Updated 4 months ago
Weather
-/10
Popularity Score
-
Latency
-
Success Rate

Air Quality API Documentation

Retrieve current, forecasted, and historical air quality for any point in the world.

View API Details
GETCurrent Air Quality
GETAir Quality History
GETAir Quality Forecast
GETCurrent Air Quality

Retrieves current air quality conditions for any location in the world, given a lat/lon.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
lonNUMBER
REQUIREDLongitude
latNUMBER
REQUIREDLatitude
Code Snippet
unirest.get("https://air-quality.p.rapidapi.com/current/airquality?lon=-78.63&lat=35.5")
.header("X-RapidAPI-Host", "air-quality.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://air-quality.p.rapidapi.com/current/airquality
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://air-quality.p.rapidapi.com/current/airquality?lon=-78.63&lat=35.5")
.header("X-RapidAPI-Host", "air-quality.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