JUHE API Marketplace
API Service

Air Quality Index

Delivers the current Air Quality Index (AQI) and specific pollutant levels for any geographical location.

99.9%
Uptime
32ms
Avg Response
10K+
Daily Requests
Air Quality Index Response
1{
2 "code": "string",
3 "msg": "string",
4 "data": {
5 "city": "string",
6 "aqi": "string",
7 "co": "string",
8 "no2": "string",
9 "o3": "string",
10 "pm10": "string",
11 "pm25": "string",
12 "so2": "string",
13 "geo": {
14 "lat": "string",
15 "lon": "string"
16 }
17 }
18}
JSON18 lines

API Introduction

About this API

The Air Quality Index (AQI) API is a service focused on providing global air quality data. It can return the real-time Air Quality Index (AQI) and specific concentration values of several major pollutants for thousands of cities and monitoring stations worldwide. These pollutants include PM2.5, PM10, ozone (O3), nitrogen dioxide (NO2), sulfur dioxide (SO2), and carbon monoxide (CO). The data is sourced from environmental protection agencies (EPAs) and monitoring networks around the world, ensuring its authority and accuracy. By integrating this API, developers can easily add real-time air quality monitoring and warning functions to their applications (such as weather, health, smart travel, or smart city apps), helping users understand their surrounding environmental conditions and make healthy decisions.

Key Features

  • Global Coverage: Data covers over 1000 major cities and 9000 monitoring stations worldwide, providing extensive geographical coverage.
  • Real-time AQI Index: Provides a comprehensive Air Quality Index (AQI) based on standards such as the US EPA, along with textual descriptions of health impacts (e.g., "Good," "Moderately Polluted").
  • Major Pollutant Concentrations: Reports the real-time concentration values of key air pollutants such as PM2.5, PM10, O3, NO2, SO2, and CO (units are typically µg/m³).
  • Geographic Location Query: Supports querying air quality data for a specific location by city name, automatic IP address location, or precise latitude and longitude coordinates.
  • Air Quality Forecast: Advanced versions can provide air quality trend forecasts for the next few days, helping users plan activities in advance.

Use Cases

Scenario 1: Integrate an Air Quality Module into a Weather Application

Situation: A weather app wants to add air quality information to provide users with more comprehensive environmental data. Implementation: When a user queries the weather for a certain city, the application backend calls the AQI API at the same time as the weather API to query the air quality data for the same location. The front-end interface can display the current AQI index with a colored dashboard or card next to the temperature and humidity (e.g., AQI of 155, displayed as red "Unhealthy"). When the user clicks on it, they can expand to see the specific values of various pollutants such as PM2.5, O3, and health advice, such as "Sensitive groups should avoid outdoor activities".

Scenario 2: Provide Automated Operation Strategies for a Smart Air Purifier

Situation: A smart home company's smart air purifier wants to automatically adjust its operating mode based on outdoor air quality. Implementation: The purifier's firmware is connected to a cloud service. The cloud service regularly calls the AQI API to obtain real-time outdoor air quality based on the device's geographical location. When the outdoor PM2.5 concentration returned by the API exceeds a certain threshold (e.g., > 75 µg/m³), even if the indoor sensor has not yet detected pollution, the cloud can send a command to the purifier to turn on the powerful purification mode to prevent outdoor pollutants from seeping in through door and window gaps in advance. When the outdoor air quality improves, it automatically switches back to the energy-saving mode, achieving true intelligence and automated management.

Scenario 3: Develop a Health Travel Advisor App for Sensitive Groups

Situation: A health app designed for people with asthma or respiratory sensitivities. Implementation: The app allows users to set their home and work addresses. The app's backend continuously monitors the AQI data for these locations. When the AQI index or the concentration of a specific pollutant (such as O3) at any location exceeds the "unhealthy for sensitive groups" level, the app immediately sends a push notification to the user, reminding them that "Today's air quality is poor, please wear a mask when you go out." In addition, when users plan to do outdoor sports, they can query the real-time AQI of their destination to help them choose a time or place with better air quality for their activities.

How it Works: Endpoints & Response

This API returns the air quality data for a location by receiving a geographical identifier (such as a city name or IP).

Endpoint Example: https://hub.juheapi.com/aqi/v1/city

The JSON object of the response intuitively presents all key information. The city field indicates the city corresponding to the data. The aqi field is the core comprehensive index. The following co, no2, o3, pm10, pm25, so2 fields provide the specific concentration values of each major pollutant. The geo object provides the latitude and longitude of the monitoring station, which is convenient for visual display on a map. This concise and comprehensive data structure makes it easy for developers to build information-rich air quality display interfaces.

Quick Actions

Pricing

$0.00
for 10K requests
Ultra-low cost per request
Rate limit:100 req/min
Response time:~32ms

API Explorer

Test API calls directly in your browser with our interactive explorer tool.