Air quality API reference

Overview

Public read-only JSON API. Base path: https://airquality.am/{locale}/air-quality-app/v1/ where {locale} is en, ru, or hy. Use GET only. Responses are application/json; charset=utf-8.

Please send a meaningful User-Agent (your app or project name). Examples on this page use docs-example. You may use the API for personal widgets, integrations, and other products. If you publish something publicly, cite airquality.am as the data source. Bulk file exports and licensing are described on the open data page (see also readme.txt and DbCL for files).

Field reference

Provider

Object inside providers[] in stations.json.

FieldTypeDescription
idstringProvider slug used in API (e.g. in Station.provider)
titlestringHuman-readable provider name
urlstringLink to the provider page on this site, or empty string
imagestringURL of icon for light UI
image_darkstringURL of icon for dark UI

Station

Object in stations[] or the sole object from station/{id}.json.

FieldTypeDescription
idintegerStation id
statusstringStatus string (e.g. online, offline)
titlestringAddress or place name in the requested locale
citystring|nullCity name, or null
city_slugstring|nullCity slug for URLs, or null
districtstring|nullDistrict name, or null
district_slugstring|nullDistrict slug, or null
latitudenumberLatitude, decimal degrees (WGS-84)
longitudenumberLongitude, decimal degrees (WGS-84)
is_bad_thpbooleanWhether temperature/humidity/pressure look unreliable
measurement_timestring|nullTime of latest measurement, ISO 8601, or null if offline
temperaturenumber|null°C (hourly average)
humiditynumber|nullRelative humidity %
pressurenumber|nullAtmospheric pressure in pascals (Pa) as an integer; divide by 100 for hectopascals (hPa)
aqiinteger|nullUS EPA AQI from latest hourly average
pm2.5number|nullPM2.5 µg/m³ (corrected where applicable)
pm2.5_rawnumber|nullRaw PM2.5 µg/m³ if available
pm10number|nullPM10 µg/m³
pm1number|nullPM1 µg/m³
wind_speednumber|nullWind speed (m/s)
wind_directionstring|nullCompass direction label (e.g. N, NE)
uvnumber|nullUV index
rainnumber|nullPrecipitation (mm)
no2number|nullNO₂ (ppb)
so2number|nullSO₂ µg/m³
o3number|nullO₃ µg/m³
dustnumber|nullDust (PM) µg/m³
usvhnumber|nullRadiation dose rate (µSv/h)
luxnullReserved; currently always null
providerstringProvider slug (see Provider.id)
urlstringCanonical page URL for this station on airquality.am

Region (city)

Objects in regions[] that represent a city, or the response of region/{slug}.json when slug is a city.

FieldTypeDescription
slugstringCity slug
titlestringCity name in the requested locale
measurement_timestring|nullTime for the digest used (ISO 8601), or null
temperaturenumber|null°C (aggregated)
humiditynumber|nullRelative humidity %
pressurenumber|nullSame as station: pascals (Pa); divide by 100 for hPa
aqiinteger|nullUS EPA AQI
pm2.5number|nullPM2.5 µg/m³
pm10number|nullPM10 µg/m³
no2number|nullNO₂ ppb
urlstringCity page on airquality.am
map_latitudenumberMap center latitude (decimal degrees)
map_longitudenumberMap center longitude (decimal degrees)
map_deltanumberMap zoom/span parameter
is_hiddenbooleanWhether the city is hidden from some listings

Region (district)

Same fields as Region (city) for measurements and map, with these differences: slug is the district slug; title is the district name; extra fields city and city_slug identify the parent city. There is no is_hidden field on districts.

HistoryPoint

One element of the arrays under 24h, 7d, 30d, 1y, 2y in history endpoints. An array may be empty [] if there is no data for that window (e.g. offline station). Keys may be null when there is no value for that bucket.

Station history includes avg_pm25_raw. Region history includes station_count instead (no avg_pm25_raw).

Hourly series (24h, 7d) typically omit min_* / max_* fields; daily buckets in 30d include both range_* arrays and separate min_* / max_* fields for the same quantities.

FieldTypeDescription
timestampstringBucket start time (ISO 8601)
avg_temperaturenumber|null°C
avg_humiditynumber|nullRelative humidity %
avg_pressurenumber|nullSame as current readings: pascals (Pa); divide by 100 for hPa
avg_pm25number|nullPM2.5 µg/m³
avg_pm10number|nullPM10 µg/m³
avg_pm25_rawnumber|nullRaw PM2.5 µg/m³ (station history only)
avg_no2number|nullNO₂ ppb
avg_usvhnumber|nullRadiation µSv/h
avg_dustnumber|nullDust (PM) µg/m³
avg_so2number|nullSO₂ µg/m³
avg_o3number|nullO₃ µg/m³
avg_wind_directionnumber|nullWind direction (degrees clockwise from north)
avg_wind_speednumber|nullWind speed (m/s)
total_rainnumber|nullPrecipitation total for the bucket (mm) when applicable
station_countnumber|nullApproximate number of stations in the average (region history only)
range_temperature[number, number]|null[min, max] °C for daily-or-coarser buckets when present
range_pm25[number, number]|null[min, max] PM2.5 µg/m³
range_pm10[number, number]|null[min, max] PM10 µg/m³
range_dust[number, number]|null[min, max] dust (PM) µg/m³
range_wind_speed[number, number]|null[min, max] wind speed (m/s)
range_aqi[integer, integer]|null[min, max] US EPA AQI for the bucket
aqiinteger|nullUS EPA AQI
min_temperature, max_temperaturenumber|nullDaily (and similar) buckets: extrema °C for the interval; often present in 30d, absent in hourly 24h/7d
min_pm25, max_pm25, min_pm10, max_pm10number|nullSame bucket rules as temperature; values in µg/m³
min_no2, max_no2number|nullSame bucket rules; values in ppb
min_dust, max_dustnumber|nullSame bucket rules; dust (PM) µg/m³
min_wind_speed, max_wind_speednumber|nullSame bucket rules; values in m/s

min_* / max_* duplicate the endpoints of the corresponding range_* array where both are present.

Endpoints

Replace https://airquality.am/en/... with ru or hy as needed. All examples:

curl -sS -H 'User-Agent: docs-example' 'URL'

GET /v1/stations.json

Returns { "providers": [...], "stations": [...], "regions": [...] }. Stations list only visible, non-forced-hidden stations.

curl -sS -H 'User-Agent: docs-example' 'https://airquality.am/en/air-quality-app/v1/stations.json'

GET /v1/station/{id}.json

One Station object. 404 if the id does not exist.

curl -sS -H 'User-Agent: docs-example' 'https://airquality.am/en/air-quality-app/v1/station/1.json'

GET /v1/station/{id}-history.json

Object with five arrays of HistoryPoint: 24h (hourly), 7d (hourly), 30d (daily), 1y (monthly), 2y (monthly). Example uses station 126 (non-empty hourly data at time of writing); an offline station may return empty arrays.

curl -sS -H 'User-Agent: docs-example' 'https://airquality.am/en/air-quality-app/v1/station/126-history.json'

GET /v1/region/{slug}.json

One Region object (city or district). slug is lowercase Latin letters and hyphens (e.g. yerevan). 404 if not found.

curl -sS -H 'User-Agent: docs-example' 'https://airquality.am/en/air-quality-app/v1/region/yerevan.json'

GET /v1/region/{slug}-history.json

Same five keys as station history; each point is a HistoryPoint for the region (includes station_count).

curl -sS -H 'User-Agent: docs-example' 'https://airquality.am/en/air-quality-app/v1/region/yerevan-history.json'