{"openapi":"3.1.0","info":{"title":"atmos.today API","version":"1.0.0","description":"Free, public, CC-BY-4.0 licensed JSON API for live global air quality data. No auth required. CORS open. See https://atmos.today/attribution for data sources.","contact":{"name":"atmos.today","url":"https://atmos.today/contact"},"license":{"name":"CC-BY-4.0","url":"https://creativecommons.org/licenses/by/4.0/"}},"servers":[{"url":"https://atmos.today","description":"Production"}],"paths":{"/api/aqi":{"get":{"summary":"List all tracked cities with current AQI","description":"Returns 217 cities with live AQI, pollutant readings, and timestamps. Cached 30 minutes.","responses":{"200":{"description":"List of cities","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CitiesResponse"}}}}}}},"/api/aqi/{country}/{city}":{"get":{"summary":"Get AQI for a single city","parameters":[{"name":"country","in":"path","required":true,"description":"Lowercase country slug, e.g. thailand","schema":{"type":"string"}},{"name":"city","in":"path","required":true,"description":"Lowercase city slug, e.g. bangkok","schema":{"type":"string"}}],"responses":{"200":{"description":"Single city","content":{"application/json":{"schema":{"$ref":"#/components/schemas/City"}}}},"404":{"description":"City not found"}}}}},"components":{"schemas":{"City":{"type":"object","properties":{"name":{"type":"string","example":"Bangkok"},"country":{"type":"string","example":"Thailand"},"countryCode":{"type":"string","example":"TH"},"lat":{"type":"number","example":13.75},"lon":{"type":"number","example":100.52},"aqi":{"type":"integer","example":53},"category":{"type":"string","example":"Moderate"},"pollutants":{"type":"object","properties":{"pm25":{"type":"number","description":"PM2.5 concentration in μg/m³"},"pm10":{"type":"number","description":"PM10 concentration in μg/m³"},"o3":{"type":"number","description":"Ozone in ppb"},"no2":{"type":"number","description":"Nitrogen dioxide in ppb"}}},"updatedAt":{"type":"string","format":"date-time"},"source":{"type":"string","example":"atmos.today"},"attribution":{"type":"string"},"url":{"type":"string","format":"uri"}}},"CitiesResponse":{"type":"object","properties":{"count":{"type":"integer","example":217},"updatedAt":{"type":"string","format":"date-time"},"attribution":{"type":"string"},"cities":{"type":"array","items":{"$ref":"#/components/schemas/City"}}}}}}}