API Network Exploration: AirVisual

This is part of our blog series on Postman’s API Network – a directory of API publishers running in Postman. We will highlight some member APIs that are part of our API Network and emphasize some key features to help you become familiar with some of these incredibly useful APIs. In this blog, we’ll specifically be looking at the AirVisual API.

The AirVisual API provides the most comprehensive global air quality data available to developers. AirVisual aims to provide accurate historical, real-time, and forecast air quality data for cities around the world.

AirVisual has Postman Collections for each of their three API versions: Community (rree), Startup (paid) and Enterprise (paid). For the course of this post, we will use the most commonly available version: Community (free). You can download all three collections from the Postman API Network, or from within the app.

Run in Postman

To use the service, an API key is required. This can be obtained from the AirVisual website.

AirVisual API Postman Collection
(On importing the AirVisual API, the collection of API requests are available)

The Community version of the AirVisual API allows the users to get air quality data for the available list of countries. This data can then be drilled down to respective states and cities.

(GET request to fetch all the supported countries)
(GET request to fetch all the supported states in country – India)
(GET request to fetch all the supported cities for the given state and country – Karnataka, India)

However, one of the most impressive features available is the ability to get the nearest city’s data using just the IP geolocation. Alternatively, this can be achieved by entering the exact latitude and longitude of the place.

(The API automatically picks the nearest city based on the IP geo-location, without having to add any other markers)
(The API can also fetch data by using the GPS coordinates i.e. Latitude, Longitude)

The key feature of the AirVisual API is that it returns detailed air quality reports for every available location.

(The API returns the current weather and pollution data of the selected city)

This is the output returned when we entered the parameters:
City – Bengaluru
State – Karnataka
Country – India

Note: The community version of the AirVisual API provides only current data. To access historical and forecast data, you’d have to upgrade to the enterprise version.

With the availability of real-time air quality data using the AirVisual API the applications are limitless – be it to update people of the current weather situation or to warn people of unhealthy air.

To play around with this collection, you can download the collection and get the API key and get started building some cool stuff.

Run in Postman

To access this collection directly in the Postman app, click the Create button in the top left corner and select the API Network tab. A pop-up screen will then appear. You can either browse all the published APIs or search for a specific API. To know more, visit the Postman Learning Center.

You can check out the other APIs running in Postman by visiting the API Network or search for them within the Postman app.


Author: Jonathan

Helping developers get more out of Postman