Overview
Breeze uses the Open-Meteo Air Quality API to provide real-time air quality information for any location worldwide. This API returns the US Air Quality Index (AQI) along with detailed measurements of specific pollutants.Base URL
Endpoints Used
Get Current Air Quality
Fetches current air quality data for a specific location. Query Parameters:
Pollutants Requested:
us_aqi- US Air Quality Indexpm10- Particulate Matter < 10 μmpm2_5- Particulate Matter < 2.5 μmcarbon_monoxide- CO concentrationnitrogen_dioxide- NO₂ concentrationsulphur_dioxide- SO₂ concentrationozone- O₃ concentration
Response Format
The API returns a JSON response with the following structure:Response Model
Breeze decodes the response into these Swift models:Usage Example
Here’s how Breeze fetches air quality data:Multiple Location Queries
The API supports querying multiple locations simultaneously by passing comma-separated coordinates:AQI Levels
Breeze interprets AQI values according to US EPA standards:Rate Limits
Open-Meteo APIs are free and do not require an API key. They have generous rate limits suitable for most applications.Reference
- Open-Meteo Air Quality API Documentation
- Service Implementation:
BreezeApp/Services/AirQualityService.swift - Data Models:
BreezeApp/Models/AirQuality.swift