airq
Check air quality from your terminal. Any city in the world, no API key needed.
By default merges two data sources for more accurate results:
- Open-Meteo — global model (PM2.5, PM10, CO, NO2, O3, SO2, UV)
- Sensor.Community — citizen science sensors (15,000+ real sensors worldwide)
Install
Quick start
Resolved city: Gazipaşa, Türkiye
Sources: Open-Meteo (model) + Sensor.Community (1 sensors, 5km median)
--------------------------------------------------
PM2.5 9.6 avg (12.7 model, 6.5 sensors) μg/m³
PM10 14.7 avg (16.2 model, 13.1 sensors) μg/m³
CO 159.0 μg/m³
NO2 1.9 μg/m³
O3 73.0 μg/m³
SO2 1.1 μg/m³
UV Index: 0 ☀️ (Low)
--------------------------------------------------
🟢 US AQI: 40 | EU AQI: 29 — Good
Commands
Any city in the world
By coordinates
History (sparkline)
Istanbul, Türkiye — last 5 days
2026-03-09: ██░░░ 10.9 µg/m³ (AQI 44 🟢)
2026-03-10: ███░░ 20.7 µg/m³ (AQI 57 🟡)
2026-03-11: ███░░ 21.5 µg/m³ (AQI 68 🟡)
2026-03-12: ███░░ 17.3 µg/m³ (AQI 68 🟡)
2026-03-13: ███░░ 20.3 µg/m³ (AQI 64 🟡)
Top cities by AQI
# City AQI PM2.5
1 Bursa 143 🟠 52.5
2 Izmir 121 🟠 43.6
3 Ankara 99 🟡 34.8
4 Istanbul 98 🟡 34.6
5 Antalya 72 🟡 22.0
Countries: turkey, russia, usa, germany, japan.
Compare providers
Berlin, Germany — Provider Comparison
Sensor.Community: 143 sensors, 5km radius
┌──────────┬───────────┬─────────────────┬─────────┐
│ Metric │ Open-Meteo│ Area Median │ Average │
├──────────┼───────────┼─────────────────┼─────────┤
│ PM2.5 │ 4.2 │ 6.8 │ 5.5 │
│ PM10 │ 5.3 │ 11.1 │ 8.2 │
│ US AQI │ 31 │ 28 (calc) │ 29 │
└──────────┴───────────┴─────────────────┴─────────┘
Single provider
JSON output
All commands support --json:
Find nearby sensors
How it works
By default (--provider all), airq fetches both sources in parallel and averages PM2.5/PM10. Each value shows the breakdown:
PM2.5 4.9 avg (4.2 model, 5.7 sensors) μg/m³
- model = Open-Meteo atmospheric reanalysis (global, ~11km grid)
- sensors = median of all Sensor.Community sensors within 5km (filters outliers)
If no sensors nearby, falls back to model only with a note.
AQI scale
| AQI | Category | Color |
|---|---|---|
| 0–50 | Good | 🟢 |
| 51–100 | Moderate | 🟡 |
| 101–150 | Unhealthy for Sensitive Groups | 🟠 |
| 151–200 | Unhealthy | 🔴 |
| 201–300 | Very Unhealthy | 🟣 |
| 301–500 | Hazardous | 🟤 |
US AQI from Open-Meteo API. EU AQI also shown. For sensor-only data, AQI calculated using EPA formula.
Data sources
- Open-Meteo Air Quality API — free, no key, global
- Open-Meteo Geocoding API — city → coordinates
- Sensor.Community — citizen science, 15,000+ real sensors
Built with
Created by rust-code AI agent in autonomous BigHead mode.
License
MIT