Skip to main content

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 Index
  • pm10 - Particulate Matter < 10 μm
  • pm2_5 - Particulate Matter < 2.5 μm
  • carbon_monoxide - CO concentration
  • nitrogen_dioxide - NO₂ concentration
  • sulphur_dioxide - SO₂ concentration
  • ozone - 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:
See AirQualityService.swift:10

Multiple Location Queries

The API supports querying multiple locations simultaneously by passing comma-separated coordinates:
See AirQualityService.swift:42

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