Air Quality API
AirNow air quality data enriched with health recommendations, color-coded AQI categories, sensitive group warnings, and dominant pollutant identification.
GET
/api/airquality/current
2 sats
Get current Air Quality Index (AQI) for a location. Returns observations per pollutant with health recommendations, color coding, and an overall summary identifying the dominant pollutant.
| Parameter | Type | Description |
|---|---|---|
latitude | double | Latitude (-90 to 90) |
longitude | double | Longitude (-180 to 180) |
# Direct call (no L402) curl "https://agent-commerce.store/api/airquality/current?latitude=38.89&longitude=-77.03" # Via L402 proxy (paid) curl "https://api.lightningenable.com/l402/proxy/{proxyId}/current?latitude=38.89&longitude=-77.03"
Response includes summary.dominantPollutant, summary.overallCategory, and per-observation sensitiveGroupWarning.
GET
/api/airquality/forecast
2 sats
Get AQI forecast for a location. Returns forecasts grouped by date with the worst forecast day identified.
| Parameter | Type | Description |
|---|---|---|
latitude | double | Latitude (-90 to 90) |
longitude | double | Longitude (-180 to 180) |
# Direct call (no L402) curl "https://agent-commerce.store/api/airquality/forecast?latitude=38.89&longitude=-77.03" # Via L402 proxy (paid) curl "https://api.lightningenable.com/l402/proxy/{proxyId}/forecast?latitude=38.89&longitude=-77.03"
Response includes worstDay with the highest AQI forecast day and forecastDays grouped by date.
AQI Categories
| AQI Range | Category | Color | Health Concern |
|---|---|---|---|
| 0-50 | Good | Green | Air quality is satisfactory |
| 51-100 | Moderate | Yellow | Acceptable; moderate health concern for sensitive people |
| 101-150 | Unhealthy for Sensitive Groups | Orange | Members of sensitive groups may experience health effects |
| 151-200 | Unhealthy | Red | Everyone may begin to experience health effects |
| 201-300 | Very Unhealthy | Purple | Health alert: everyone may experience more serious health effects |
| 301-500 | Hazardous | Maroon | Health warning of emergency conditions |
Usage tips: US locations only. Use decimal coordinates (e.g., 38.89, -77.03 for Washington DC). AQI categories: Good (0-50), Moderate (51-100), Unhealthy for Sensitive Groups (101-150), Unhealthy (151-200). Data updates hourly from AirNow monitoring stations.
Value-Add
- Health recommendations per AQI category
- Sensitive group warnings when AQI exceeds 50
- Color coding for visual dashboard integration
- Dominant pollutant identification in current observations
- Forecast grouped by date with worst-day identification
- Structured JSON instead of raw AirNow response
Upstream Source
AirNow API — U.S. EPA air quality data.