# China Air Quality (AQI): 338 Cities & Monitoring Stations (`sinodata/china-air-quality`) Actor

Official China air quality data from the national monitoring centre (CNEMC), no login: hourly and daily AQI for 338 cities, PM2.5, PM10, O3, NO2, SO2 and CO concentrations, 24-hour and 14-day city history, and readings from every monitoring station in a city.

- **URL**: https://apify.com/sinodata/china-air-quality.md
- **Developed by:** [SinoData](https://apify.com/sinodata) (community)
- **Categories:** Other
- **Stats:** 2 total users, 1 monthly users, 5.9% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.27 / 1,000 readings

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## China Air Quality (AQI): 338 Cities & Monitoring Stations

Get **official air quality data for China** as clean JSON, straight from the publishing platform of the **China National Environmental Monitoring Centre (中国环境监测总站, CNEMC)**. No login, no Chinese needed.

- **All 338 cities**: latest hourly AQI and latest daily AQI, with category, primary pollutant and coordinates
- **Pollutant concentrations**: PM2.5, PM10, O3, NO2, SO2 and CO
- **City history**: the last 24 hours (hourly) and the last 14 days (daily) for any city
- **Monitoring stations**: every station in a city (e.g. 23 in Beijing) with current values and 24-hour averages
- **English labels**: AQI categories (Good, Moderate, Lightly polluted...), province names, pollutant codes, UTC and China timestamps

### Use cases

- **ESG, supply chain and factory monitoring**: air quality around plants, suppliers and logistics hubs.
- **Health, travel and weather apps**: an official AQI feed for Chinese cities.
- **Research**: build hourly or daily air pollution time series with a scheduled run.
- **Alerts**: run every hour and trigger an alert when a city's AQI crosses a threshold.

### Example input

All cities, latest hour:

```json
{ "dataTypes": ["citiesNow"] }
```

Several cities with history and stations:

```json
{
  "dataTypes": ["cityLast24Hours", "cityLast14Days", "stations"],
  "cities": ["北京", "上海", "广州", "成都"]
}
```

Cities can be given as Chinese names (北京 or 北京市) or city codes (110000).

### Output

A city reading:

```json
{
  "type": "cityAqi",
  "timeType": "hour",
  "time": "2026-10-08T09:00:00+08:00",
  "timeUtc": "2026-10-08T01:00:00.000Z",
  "city": "北京市",
  "cityCode": "110000",
  "province": "北京",
  "provinceEnglish": "Beijing",
  "aqi": 70,
  "aqiLevel": 2,
  "quality": "良",
  "qualityEnglish": "Moderate",
  "primaryPollutant": "PM10",
  "pollutantLevels": { "pm25": 2, "pm10": 2, "o3": 1, "no2": 1, "so2": 1, "co": 1 },
  "concentrations": { "pm25": 42, "pm10": 77, "o3": 58, "no2": 36, "so2": 4, "co": 0.6 },
  "latitude": 40.059588,
  "longitude": 116.40261
}
```

A station reading:

```json
{
  "type": "stationAqi",
  "time": "2026-10-08T09:00:00+08:00",
  "city": "北京市",
  "station": "万寿西宫",
  "stationCode": "1001A",
  "aqi": 67,
  "qualityEnglish": "Moderate",
  "concentrations": { "pm25": 37, "pm10": 73, "o3": 75, "no2": 37, "so2": 4, "co": 0.5 },
  "averages24h": { "pm25": 38, "pm10": 76, "o3": 75, "no2": 42, "so2": 3, "co": 0.5, "o3_8h": 38 }
}
```

- Concentrations are in **µg/m³**, CO in **mg/m³**. Daily records use 24-hour averages and the daily maximum 8-hour ozone.
- `aqiLevel` follows China's standard (HJ 633-2012): 1 Good (0-50), 2 Moderate (51-100), 3 Lightly polluted (101-150), 4 Moderately polluted (151-200), 5 Heavily polluted (201-300), 6 Severely polluted (>300).
- `primaryPollutant` is null when air quality is good (AQI 50 or less), as in the official data.
- The all-city lists carry pollutant **levels**; turn on **Add concentrations** (with Cities) or use the city history for **concentrations**.

### Pricing

**$0.0003 per record.** All 338 cities for one hour cost about $0.10; an hourly schedule for 10 cities costs about $0.07 a day.

### Notes and limits

- The platform keeps the last 24 hours and 14 days per city; schedule runs to keep a longer history.
- Data is real-time and preliminary, as published by CNEMC; official revised figures may differ slightly.
- Only public data is collected.

### Feedback

Need another field or region? Open an issue on the Issues tab.

# Actor input Schema

## `dataTypes` (type: `array`):

citiesNow = latest hourly AQI for every city; citiesToday = latest daily AQI for every city; cityLast24Hours / cityLast14Days = hourly or daily history with pollutant concentrations for the cities below; stations = every monitoring station in the cities below.

## `cities` (type: `array`):

Chinese city names or codes, e.g. 北京, 上海, 广州市, 510100. Required for history, stations and concentrations; for the all-city lists it limits the output to these cities.

## `provinces` (type: `array`):

Only cities in these provinces, in Chinese or English (e.g. 广东, Guangdong, 新疆). Applies to the all-city lists.

## `includeConcentrations` (type: `boolean`):

For citiesNow: also fetch PM2.5, PM10, O3, NO2, SO2 and CO concentrations for each selected city (one extra request per city). Requires Cities.

## `proxyConfiguration` (type: `object`):

Not needed for normal use.

## Actor input object example

```json
{
  "dataTypes": [
    "citiesNow"
  ],
  "cities": [
    "北京",
    "上海"
  ],
  "includeConcentrations": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "cities": [
        "北京",
        "上海"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("sinodata/china-air-quality").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "cities": [
        "北京",
        "上海",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("sinodata/china-air-quality").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "cities": [
    "北京",
    "上海"
  ]
}' |
apify call sinodata/china-air-quality --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,sinodata/china-air-quality"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/NYpTPimaSyXedUnmj/builds/uF62NbbiL4KKzf80S/openapi.json
