canonical: https://jentic.com/apis/pm25.in/pm25

# PM25.in Air Quality API

PM25.in provides real-time air quality data for cities across China, including AQI, PM2.5, PM10, CO, NO2, O3, and SO2 readings from monitoring stations. Data is available per city (simplified or detailed), per monitoring station, as a national aggregate, or as a city ranking. The API exposes 11 endpoints secured with apiKey authentication.

## For AI agents

Programmatically get simplified city aqi data, get detailed city aqi data. Covers 11 operations with apiKey authentication.

## Scope

Does not handle payments, communications, or crm - use for developer tools only.

## Capabilities

- Get simplified city AQI data
- Access PM25.in Air Quality API resources via REST API
- Access PM25.in Air Quality API resources via REST API

## Use cases

### Developer Tools Operations

Use the PM25.in Air Quality API to perform developer tools operations programmatically. The API provides 11 endpoints covering core functionality including get simplified city aqi data, get detailed city aqi data, get pm2.5 data for a city.

Example prompt: Call GET `/querys/only_aqi.json` to get simplified city aqi data

### Automated City Data Management

Automate city data operations by combining multiple PM25.in Air Quality API endpoints. Agents can get detailed city aqi data and then get pm2.5 data for a city in a single workflow.

Example prompt: Call GET `/querys/aqi_details.json` to get detailed city aqi data, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call PM25.in Air Quality API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle apiKey tokens manually.

Example prompt: Search Jentic for 'get simplified city aqi data', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/querys/only_aqi.json` | Get simplified city AQI data |
| GET | `/querys/aqi_details.json` | Get detailed city AQI data |
| GET | `/querys/pm2_5.json` | Get PM2.5 data for a city |
| GET | `/querys/pm10.json` | Get PM10 data for a city |
| GET | `/querys/co.json` | Get CO data for a city |
| GET | `/querys/no2.json` | Get NO2 data for a city |
| GET | `/querys/o3.json` | Get O3 data for a city |
| GET | `/querys/so2.json` | Get SO2 data for a city |

## Key resources

- **City Data** — Air quality data for all monitoring stations in a city
- **Pollutants** — Individual pollutant readings by city
- **Station** — Data for individual monitoring stations
- **National** — All cities data and rankings

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 48 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 99 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 50 / 100
  - Agent Usability: 94 / 100
  - Security: 15 / 100
  - AI Discoverability: 74 / 100
- **View full report:** https://jentic.com/apis/pm25.in/pm25/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the PM25.in Air Quality API by hand means attaching your API key as a query token on every call to www.pm25.in and selecting the right pollutant endpoint per request. Through Jentic you install once, import the PM25.in Air Quality API from the API Directory, store the API key once, and your agent calls it.
- **Permission scoping:** PM25.in reads take their city and station selection as query parameters rather than pinning a resource in the URL path, so scope the agent to the operations it needs, such as fetching city AQI or a specific pollutant reading. Every endpoint here is read-only, so the agent's allowed set is simply the pollutant queries you grant it.
- **Credential handling:** Your PM25.in API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get simplified city AQI data' or 'read PM2.5 levels', and Jentic returns the matching PM25.in operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Github** — Alternative developer tools API
- **Gitlab** — Alternative developer tools API

## FAQ

### What authentication does the PM25.in Air Quality API use?

The PM25.in Air Quality API uses an API key passed in the `token` query. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I get simplified city aqi data with the PM25.in Air Quality API?

Yes. Use the GET `/querys/only_aqi.json` endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the PM25.in Air Quality API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I get simplified city aqi data through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'get simplified city aqi data'. Jentic returns the matching PM25.in Air Quality API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the PM25.in Air Quality API have?

The PM25.in Air Quality API exposes 11 endpoints covering city data, pollutants, station operations.

### Can I limit what my agent is allowed to do with the PM25.in Air Quality API?

Yes. Because you run Jentic One yourself, your own rules decide which PM25.in operations and credentials the agent may use. Every endpoint here is read-only, so you grant only the queries the agent needs, such as fetching simplified city AQI, detailed city AQI, or a single pollutant reading like PM2.5, PM10, CO, NO2, O3, or SO2. Since the city and station are passed as query parameters rather than pinned in the path, the agent's allowed set is simply the pollutant and AQI queries you approve.
