Overview
PM25.in is a Chinese air quality API providing real-time PM2.5, AQI, and related pollution data for cities across China. An API key is required and can be requested through the PM25.in website. The API is particularly useful for applications targeting Chinese users or research on air quality trends in China.
Beginner Tip
The API documentation and service are primarily in Chinese, so a translation tool may be helpful when navigating the docs. Data is returned for specific Chinese city codes, so check the pm25.in city list first to find the correct city parameter for your query.
Available Data
The kind of data this API exposes, based on its documentation. We could not call the endpoint to confirm the exact field names.
Example Response
Illustrative shape only — we were not able to call this endpoint (it requires credentials or exposes no public sample URL), so the fields below show the kind of data this API returns rather than a recorded response.
{
"status": "success",
"data": {
"result": "Data from PM25.in",
"description": "Air quality of China",
"timestamp": "2025-01-15T10:00:00Z"
}
} Field Reference
area Name of the Chinese city or monitoring area where the measurement was taken pm2_5 PM2.5 concentration in micrograms per cubic meter (μg/m³) at the monitoring station quality Air quality category in Chinese (e.g. 优/良/轻度污染) based on the measured AQI value aqi Chinese Air Quality Index value; above 100 indicates pollution, above 200 is severe time_point Timestamp of the measurement in local Chinese time format Implementation Example
Calls a real endpoint of this API. Replace any placeholder credentials with your own key.
const url = "http://www.pm25.in/api/querys/pm2_5.json?token=YOUR_API_KEY&city=beijing";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
headers: {
"X-API-Key": "YOUR_API_KEY"
}
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.
Metadata Score Breakdown
Estimated from metadata — endpoint not independently tested
Metadata estimate · endpoint not independently tested
Technical Specifications
Related Tags
Similar APIs
View All →BreezoMeter Pollen
BreezoMeter Pollen API (now part of Google Maps Platform) provides daily pollen forecast data including pollen type, index values, and risk levels for a specific geographic location.
Carbon Interface
Carbon Interface API calculates estimated CO2 emissions for common activities such as electricity usage, flights, vehicle travel, and shipping.
Climatiq
Climatiq is an API for calculating carbon emissions and environmental footprint across a wide range of activities including travel, energy use, and shipping.
IQAir
⭐ Beginner's PickIQAir API provides real-time air quality index (AQI) data and weather conditions for cities and stations worldwide, powered by the IQAir sensor network.
GrünstromIndex
⭐ Beginner's PickGrünstromIndex (Green Power Index) provides real-time and forecast data about the proportion of renewable energy in the German electricity grid.