airq
Check air quality from your terminal. Any city in the world, no API key needed.
Two data providers:
- Open-Meteo — global coverage, PM2.5, PM10, CO, NO2 (default)
- Sensor.Community — citizen science sensors, real-time PM2.5/PM10
Install
Homebrew (macOS/Linux):
From crates.io:
From source:
&&
Usage
By city name (geocoding via Open-Meteo)
Any city, town, or village — resolved automatically via Open-Meteo geocoding API:
$ airq --city gazipasa
Resolved city: Gazipaşa, Türkiye
Air Quality for Coordinates: 36.3, 32.3
--------------------------------------------------
PM2.5: 12.8 μg/m³ (green = good)
PM10: 16.6 μg/m³ (green = good)
CO: 160 μg/m³ (green = good)
NO2: 2 μg/m³ (green = good)
By coordinates
Sensor.Community (citizen science sensors)
Real-time data from sensor.community network — 15,000+ sensors worldwide:
# Use specific sensor by ID
# Find nearby sensors
History (last N days)
Gazipaşa, Türkiye — last 7 days
2026-03-07: ██░░░ 7.5 µg/m³ (AQI 31 🟢)
2026-03-08: █░░░░ 3.5 µg/m³ (AQI 15 🟢)
2026-03-09: █░░░░ 4.0 µg/m³ (AQI 16 🟢)
...
Top cities by AQI
# City AQI PM2.5
1 Bursa 132 🟠 48.1
2 Izmir 111 🟠 39.5
3 Ankara 99 🟡 35.1
4 Istanbul 95 🟡 33.0
5 Gazipasa 27 🟢 6.4
Supported countries: turkey, russia, usa, germany, japan.
JSON output
All commands support --json for machine-readable output:
Color coding (WHO thresholds)
Output is color-coded based on WHO Air Quality Guidelines (2021):
| Pollutant | Green (Good) | Yellow (Moderate) | Red (Poor) |
|---|---|---|---|
| PM2.5 | ≤ 15 µg/m³ | 15–35 µg/m³ | > 35 µg/m³ |
| PM10 | ≤ 45 µg/m³ | 45–100 µg/m³ | > 100 µg/m³ |
| CO | ≤ 4 mg/m³ | 4–10 mg/m³ | > 10 mg/m³ |
| NO2 | ≤ 25 µg/m³ | 25–50 µg/m³ | > 50 µg/m³ |
Data sources
- Open-Meteo Air Quality API — free, no key, global coverage
- Open-Meteo Geocoding API — city name → coordinates
- Sensor.Community — citizen science, real-time sensors
Built with
This project was created by rust-code AI agent in autonomous BigHead mode — from cargo init to cargo publish without human edits.
License
MIT