Home/API docs

Free air quality JSON API

Free, no signup, CC-BY-4.0 licensed JSON API for live global air quality. 217 cities, refreshed every 30 minutes, CORS open.

Endpoints

Quick start

List all cities:

curl https://atmos.today/api/aqi

Single city:

curl https://atmos.today/api/aqi/thailand/bangkok

JavaScript

const res = await fetch("https://atmos.today/api/aqi/thailand/bangkok");
const data = await res.json();
console.log(`AQI in ${data.name}: ${data.aqi} (${data.category})`);

Python

import requests
r = requests.get("https://atmos.today/api/aqi/thailand/bangkok")
data = r.json()
print(f"AQI in {data['name']}: {data['aqi']} ({data['category']})")

Response shape (single city)

{
  "name": "Bangkok",
  "country": "Thailand",
  "countryCode": "TH",
  "lat": 13.75,
  "lon": 100.52,
  "aqi": 53,
  "category": "Moderate",
  "pollutants": {
    "pm25": 11.3,
    "pm10": 13.9,
    "o3": 64.0,
    "no2": 4.6
  },
  "updatedAt": "2026-04-29T03:00:00Z",
  "source": "atmos.today",
  "attribution": "Air quality data via atmos.today (CC-BY-4.0).",
  "url": "https://atmos.today/thailand/bangkok"
}

Rate limits

No hard rate limit. Responses are cached at the edge for 30 minutes (s-maxage=1800) with stale-while-revalidate=3600. Don’t poll faster than every minute per origin or your IP may get throttled by the upstream CDN.

Attribution

Data is licensed under CC-BY-4.0. Required attribution: “Air quality data via atmos.today (CC-BY-4.0).” Link to the source URL where possible. Full data chain: /attribution.

Use cases

See methodology for data sourcing and limitations. Issues / suggestions: contact form. OpenAPI spec: /api/openapi.json.