API
Atmy air quality API
One read-only REST API for city air quality and for single sensors of Sensor.Community, AirGradient and Atmy and government stations. No sign-up and no key.
What the API covers
| Resource | Methods |
|---|---|
| Air quality now | /air-quality/current |
| History | /air-quality/history /air-quality/history/monthly |
| Forecast | /air-quality/forecast |
| Country ranking | /ranking |
| Cities | /cities |
| Networks | /networks |
| Sensors | /sensors /networks/{network}/sensors /sensors/{id} |
| Current readings | /sensors/current /networks/{network}/sensors/current |
| Readings | /sensors/{id}/readings /sensors/readings |
Base URL
Every method answers JSON over HTTPS. The same API is also served from the site itself.
https://api.atmy.ai/v1
https://atmy.ai/api/agent/v1Authentication
None: the API is public and read-only, so plain GET requests are enough.
curl "https://api.atmy.ai/v1/air-quality/current?city=germany/berlin"Rate limits
60 requests a minute from one IP address. Each answer carries X-RateLimit-Limit and X-RateLimit-Remaining; over the limit the answer is 429 with Retry-After.
Errors
An error comes with HTTP status 400, 404 or 429 and a body with error.code and error.message: the code stays the same, the message says how to fix the request.
{
"error": {
"code": "city_not_found",
"message": "No city with this id or slug (country/city, as in https://api.atmy.ai/v1/cities)."
}
}Units and time
PM in µg/m³, temperature in °C, humidity in %, pressure in hPa. Times are ISO 8601 in UTC and days are UTC days. Levels follow the US EPA 2024 PM2.5 breakpoints; the API gives no numeric AQI. A measurement the device did not report, or one outside physical limits (a device fault), is left out of the answer, not set to null. Each answer carries schema_version, the format of the answers, and fields: the units and what the fields mean.
Quality check
Every night Atmy checks the completed day of each sensor. Sensors that fail stay in the API with quality.pm_eligible = false and the reasons, so you decide yourself. City values use only the sensors that pass; on the map the “Data quality” switch in the settings hides or shows the others. Readings are what the device sent, without corrections. quality.status sums up the day: good — rating 8 or more and PM passed, degraded — 4 or more, bad — below 4; select sensors by quality.pm_eligible. Sensors standing indoors (much warmer than the outdoor temperature and not following it) fail the check.
Quality rating
Each sensor has quality.rating from 0 to 10, the score of its last checked day: PM data 50 %, regular transmission 30 %, temperature and humidity 20 %. quality.rating_7d is the mean of the last 7 days and quality.scores shows the parts. To pick the best sensors, add sort=rating or min_rating=8. A sensor that has not been checked yet has rating null.
Terms
Read-only, no key, 60 requests a minute per IP. Values are approximate (low-cost sensors, not official monitoring); attribute them as “Atmy (atmy.ai)”. Data terms: atmy.ai/legal/data/. Weather comes from Atmy's own records of OpenWeatherMap (to 2026-07-08, CC BY-SA 4.0) and Open-Meteo.com (from 2026-07-09, CC BY 4.0); credit them when you use it.
Each sensor names its network and that network’s license: Sensor.Community — ODbL 1.0 / DbCL 1.0, AirGradient — CC BY-SA 4.0. Credit Atmy and the network. PurpleAir sensors are not included: their terms do not allow redistribution.
For agents and code
The OpenAPI description serves code generators, llms.txt serves AI crawlers, and the MCP server gives assistants the same data as tools.