AirMQ Public API
Open air quality, water level and radiation data from the AirMQ sensor network, over GraphQL.
This reference covers the queries anyone can run without signing in. Send a POST with a JSON body {"query": "..."} to the endpoint below. All measurements are calibrated.
Questions are welcome in the AirMQ Telegram channel.
Terms of Service
API Endpoints
https://api.airmq.cc/graphql
Map markers
Every public location with its latest PM2.5 reading. layer is AIR, WATER or RADIOACTIVITY; before is normally the current time.
{
locationsForLayer(layer: AIR, before: "2026-10-17T12:00:00Z") {
_id name latitude longitude value valueTime isOnline
}
}
One location, now
Latest readings of one location, with its air quality indices.
{
location(filter: { _id: "BY050010028" }) {
name city latitude longitude isOnline
currentValue { time PMS25 PMS10 Temp Hum Press IKAV AQI }
}
}
One location, history
Hourly means for one day. Spans longer than 30 days come from the archive.
{
location(filter: { _id: "BY050010028" }) {
timeSeries(filter: {
t_from: "2026-10-16T00:00:00Z", t_to: "2026-10-17T00:00:00Z", interval_h: 1
}) { time PMS25 Temp }
}
}
Cities and city averages
List cities, then average a city's public locations, now or over time.
{
cityList(countryCode: "BY") { _id cityName { en ru be } locationCount }
cityAverageLast(filter: { cityId: "BY050" }) { PMS25 PMS10 Temp Hum Press IKAV AQI }
}
Units and indices
PM in µg/m³, temperature in °C, humidity in %, pressure in hPa. Radiation (Count) is in µR/h — divide by 100 for µSv/h. Water level (wLevel) is in mm.
IKAV is the Belarusian ИКАВ (ЭкоНиП 17.08.06-001-2022) computed from particulates only, and AQI is the US EPA index; both use rolling 24-hour means and are indicative, not official. See the SensorData type for details.
Contact, privacy and licence
The AirMQ team answers at airmq.belarus@gmail.com and in the Telegram channel. Project site: airmq.cc.
The queries documented here return measurements and public location details only — no personal data. How AirMQ handles personal data in its apps and website is described in the AirMQ Privacy Policy.
The data is licensed under CC BY 4.0 as set out in the Terms of Use: reuse it freely, crediting "Data: AirMQ (https://airmq.cc), CC BY 4.0".
Queries
cityAverage
Description
City-wide time series: the mean over the city's public locations of each metric, one row per interval between t_from and t_to.
Response
Returns [SensorData]
Arguments
| Name | Description |
|---|---|
filter - MeanFilter
|
Example
Query
query cityAverage($filter: MeanFilter) {
cityAverage(filter: $filter) {
time
Temp
Temp1
wTemp
Hum
Press
PMS1
PMS25
PMS10
Count
CO2
eCO2
NOx
VOC
Windsp
Windgs
Windir
Rain
wLevel
SolRad
Light
AQI
IKAV
}
}
Variables
{"filter": MeanFilter}
Response
{
"data": {
"cityAverage": [
{
"time": ISODate,
"Temp": 987.65,
"Temp1": 123.45,
"wTemp": 987.65,
"Hum": 987.65,
"Press": 123.45,
"PMS1": 987.65,
"PMS25": 123.45,
"PMS10": 123.45,
"Count": 123.45,
"CO2": 987.65,
"eCO2": 987.65,
"NOx": 123.45,
"VOC": 987.65,
"Windsp": 123.45,
"Windgs": 987.65,
"Windir": 987.65,
"Rain": 123.45,
"wLevel": 987.65,
"SolRad": 987.65,
"Light": 987.65,
"AQI": 123,
"IKAV": 123.45
}
]
}
}
cityAverageLast
Description
City-wide current values: the mean over the city's public locations of each metric over the last interval (default 15 minutes). Select IKAV and AQI here for the city's air quality indices.
Response
Returns a SensorData
Arguments
| Name | Description |
|---|---|
filter - LastFilter
|
Example
Query
query cityAverageLast($filter: LastFilter) {
cityAverageLast(filter: $filter) {
time
Temp
Temp1
wTemp
Hum
Press
PMS1
PMS25
PMS10
Count
CO2
eCO2
NOx
VOC
Windsp
Windgs
Windir
Rain
wLevel
SolRad
Light
AQI
IKAV
}
}
Variables
{"filter": LastFilter}
Response
{
"data": {
"cityAverageLast": {
"time": ISODate,
"Temp": 123.45,
"Temp1": 987.65,
"wTemp": 123.45,
"Hum": 987.65,
"Press": 123.45,
"PMS1": 123.45,
"PMS25": 987.65,
"PMS10": 987.65,
"Count": 987.65,
"CO2": 987.65,
"eCO2": 123.45,
"NOx": 987.65,
"VOC": 123.45,
"Windsp": 987.65,
"Windgs": 123.45,
"Windir": 123.45,
"Rain": 987.65,
"wLevel": 987.65,
"SolRad": 987.65,
"Light": 123.45,
"AQI": 123,
"IKAV": 123.45
}
}
}
cityList
Description
All cities known to the platform, including ones with no locations yet (locationCount: 0). countryCode (ISO 3166-1 alpha-2, e.g. BY, GE) narrows the list. langId is accepted for compatibility and ignored: every city carries all its names in cityName.
Example
Query
query cityList(
$langId: String,
$countryCode: String
) {
cityList(
langId: $langId,
countryCode: $countryCode
) {
_id
countryCode
cityName {
be
ru
en
ge
pl
alt
}
areaId
areaName
latitude
longitude
locationCount
}
}
Variables
{
"langId": "xyz789",
"countryCode": "xyz789"
}
Response
{
"data": {
"cityList": [
{
"_id": "abc123",
"countryCode": "abc123",
"cityName": CityName,
"areaId": "xyz789",
"areaName": "xyz789",
"latitude": 987.65,
"longitude": 123.45,
"locationCount": 123
}
]
}
}
location
Description
One public location by its _id (e.g. BY050010028). Only public, active locations are returned to unauthenticated callers; anything else returns null.
Response
Returns a Location
Arguments
| Name | Description |
|---|---|
filter - LocationFilter
|
Example
Query
query location($filter: LocationFilter) {
location(filter: $filter) {
_id
city
name
initDate
elevation
latitude
longitude
isOnline
publicStatus {
isOnline
lastOnline
onlineSince
uptime
RSSI
vcc
}
model {
_id
name
sensors
}
metricList
sensorList
timeSeries {
time
Temp
Temp1
wTemp
Hum
Press
PMS1
PMS25
PMS10
Count
CO2
eCO2
NOx
VOC
Windsp
Windgs
Windir
Rain
wLevel
SolRad
Light
AQI
IKAV
}
currentValue {
time
Temp
Temp1
wTemp
Hum
Press
PMS1
PMS25
PMS10
Count
CO2
eCO2
NOx
VOC
Windsp
Windgs
Windir
Rain
wLevel
SolRad
Light
AQI
IKAV
}
externalWeatherData {
time
Temp
Temp1
wTemp
Hum
Press
PMS1
PMS25
PMS10
Count
CO2
eCO2
NOx
VOC
Windsp
Windgs
Windir
Rain
wLevel
SolRad
Light
AQI
IKAV
}
}
}
Variables
{"filter": LocationFilter}
Response
{
"data": {
"location": {
"_id": "xyz789",
"city": "xyz789",
"name": "xyz789",
"initDate": ISODate,
"elevation": 987,
"latitude": 987.65,
"longitude": 987.65,
"isOnline": true,
"publicStatus": PublicStatus,
"model": DeviceModel,
"metricList": ["abc123"],
"sensorList": ["abc123"],
"timeSeries": [SensorData],
"currentValue": SensorData,
"externalWeatherData": SensorData
}
}
}
locationsForLayer
Description
Map markers: every public location that reported the layer's metric inside its lookback window before before (AIR: PM2.5, 2 h; WATER: water level, 24 h; RADIOACTIVITY: radiation, 2 h), with the most recent calibrated value. before is an ISO 8601 timestamp, normally now. With includeStale: true, locations with no value in the window are included with value: null.
Response
Returns [LocationMarker!]!
Arguments
| Name | Description |
|---|---|
layer - LayerType!
|
|
before - String!
|
|
includeStale - Boolean
|
Default = false |
Example
Query
query locationsForLayer(
$layer: LayerType!,
$before: String!,
$includeStale: Boolean
) {
locationsForLayer(
layer: $layer,
before: $before,
includeStale: $includeStale
) {
_id
name
latitude
longitude
value
valueTime
isOnline
lastOnline
}
}
Variables
{
"layer": "AIR",
"before": "xyz789",
"includeStale": false
}
Response
{
"data": {
"locationsForLayer": [
{
"_id": "xyz789",
"name": "abc123",
"latitude": 987.65,
"longitude": 987.65,
"value": 987.65,
"valueTime": "abc123",
"isOnline": true,
"lastOnline": "abc123"
}
]
}
}
pois
Description
Public points of interest on one thematic layer, by name.
Example
Query
query pois($layer: String!) {
pois(layer: $layer) {
_id
name
description
layer
latitude
longitude
createdAt
media {
_id
mime
sizeBytes
width
height
order
url
createdAt
}
}
}
Variables
{"layer": "abc123"}
Response
{
"data": {
"pois": [
{
"_id": "xyz789",
"name": "abc123",
"description": "xyz789",
"layer": "xyz789",
"latitude": 987.65,
"longitude": 123.45,
"createdAt": ISODate,
"media": [MediaItem]
}
]
}
}
publicOverlays
Description
Public map overlays (geographic layers such as boundaries or protected areas), newest first.
Response
Returns [Overlay!]!
Example
Query
query publicOverlays {
publicOverlays {
_id
name
description
geometryType
featureCount
bbox
style
layers
dataUrl
createdAt
updatedAt
}
}
Response
{
"data": {
"publicOverlays": [
{
"_id": "abc123",
"name": "xyz789",
"description": "xyz789",
"geometryType": "abc123",
"featureCount": 987,
"bbox": [987.65],
"style": Object,
"layers": ["abc123"],
"dataUrl": "abc123",
"createdAt": ISODate,
"updatedAt": ISODate
}
]
}
}
Types
Boolean
Description
The Boolean scalar type represents true or false.
City
Fields
| Field Name | Description |
|---|---|
_id - String
|
City id; it is the prefix of the ids of the city's locations. |
countryCode - String
|
ISO 3166-1 alpha-2 country code. |
cityName - CityName
|
City name in several languages. |
areaId - String
|
Region id. |
areaName - String
|
Region name. |
latitude - Float
|
WGS84 latitude of the city centre. |
longitude - Float
|
WGS84 longitude of the city centre. |
locationCount - Int
|
Number of locations in the city. |
Example
{
"_id": "abc123",
"countryCode": "xyz789",
"cityName": CityName,
"areaId": "abc123",
"areaName": "xyz789",
"latitude": 987.65,
"longitude": 123.45,
"locationCount": 987
}
CityName
Example
{
"be": "abc123",
"ru": "abc123",
"en": "xyz789",
"ge": "abc123",
"pl": "abc123",
"alt": ["abc123"]
}
DeviceModel
Float
Description
The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.
Example
987.65
ISODate
Description
ISO 8601 date-time string (UTC).
Example
ISODate
Int
Description
The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.
Example
123
LastFilter
Fields
| Input Field | Description |
|---|---|
city - String
|
Same as cityName. |
cityName - String
|
City name, as an alternative to cityId. |
cityId - String
|
City id from cityList (e.g. BY050). |
interval_d - Int
|
Averaging window, days. Default = 0 |
interval_h - Int
|
Averaging window, hours. Default = 0 |
interval_m - Int
|
Averaging window, minutes (default 15). Default = 15 |
Example
{
"city": "xyz789",
"cityName": "abc123",
"cityId": "xyz789",
"interval_d": 987,
"interval_h": 123,
"interval_m": 123
}
LayerType
Values
| Enum Value | Description |
|---|---|
|
|
|
|
|
|
|
|
Example
"AIR"
Location
Fields
| Field Name | Description |
|---|---|
_id - String!
|
Location id: a city prefix plus a sequence number, e.g. BY050010028. |
city - String
|
City name (English). |
name - String!
|
Display name given by the location's owner. |
initDate - ISODate
|
When the location was set up. |
elevation - Int
|
Elevation in metres, when the owner provided it. |
latitude - Float
|
WGS84 latitude. |
longitude - Float
|
WGS84 longitude. |
isOnline - Boolean
|
Whether the location's sensor is currently reporting, judged against its own reporting interval. |
publicStatus - PublicStatus
|
Sensor health that is safe to show anyone: online state, uptime, signal strength and supply voltage. |
model - DeviceModel
|
The kind of sensor installed at this location. |
metricList - [String]
|
Metrics this location measures, as SensorData field names (e.g. PMS25, Temp). |
sensorList - [String]
|
Sensor components installed at this location. |
timeSeries - [SensorData]
|
Calibrated readings between filter.t_from and filter.t_to, averaged per interval (interval_d/interval_h/interval_m, default 15 minutes). Spans longer than 30 days are served from the archive at coarser resolution. |
Arguments
|
|
currentValue - SensorData
|
The latest calibrated reading of every metric, within the lookback window given by filter (default 15 minutes). Select IKAV and AQI for this location's air quality indices. |
Arguments
|
|
externalWeatherData - SensorData
|
Current weather at the location's coordinates from an external weather service, in SensorData shape. |
Example
{
"_id": "xyz789",
"city": "abc123",
"name": "abc123",
"initDate": ISODate,
"elevation": 123,
"latitude": 123.45,
"longitude": 123.45,
"isOnline": false,
"publicStatus": PublicStatus,
"model": DeviceModel,
"metricList": ["abc123"],
"sensorList": ["abc123"],
"timeSeries": [SensorData],
"currentValue": SensorData,
"externalWeatherData": SensorData
}
LocationFilter
Fields
| Input Field | Description |
|---|---|
_id - String
|
Location id. |
Example
{"_id": "xyz789"}
LocationMarker
Fields
| Field Name | Description |
|---|---|
_id - String!
|
Location id. |
name - String!
|
Location name. |
latitude - Float!
|
WGS84 latitude. |
longitude - Float!
|
WGS84 longitude. |
value - Float
|
Most recent calibrated value of the layer's metric inside the lookback window; null only when includeStale is set and there is none. |
valueTime - String
|
When value was measured. |
isOnline - Boolean!
|
Whether the sensor is currently reporting. |
lastOnline - String
|
When the sensor last reported at all, regardless of the lookback window. |
Example
{
"_id": "abc123",
"name": "xyz789",
"latitude": 123.45,
"longitude": 123.45,
"value": 123.45,
"valueTime": "abc123",
"isOnline": false,
"lastOnline": "abc123"
}
MeanFilter
Fields
| Input Field | Description |
|---|---|
city - String
|
Same as cityName. |
cityName - String
|
City name, as an alternative to cityId. |
cityId - String
|
City id from cityList (e.g. BY050). |
t_from - String
|
Start, ISO 8601. |
t_to - String
|
End, ISO 8601. |
interval_d - Int
|
Interval length, days. Default = 0 |
interval_h - Int
|
Interval length, hours. Default = 0 |
interval_m - Int
|
Interval length, minutes. Default = 0 |
Example
{
"city": "xyz789",
"cityName": "xyz789",
"cityId": "abc123",
"t_from": "abc123",
"t_to": "xyz789",
"interval_d": 987,
"interval_h": 987,
"interval_m": 987
}
MediaItem
Fields
| Field Name | Description |
|---|---|
_id - String!
|
Image id. |
mime - String
|
MIME type. |
sizeBytes - Int
|
File size in bytes. |
width - Int
|
Width in pixels, when known. |
height - Int
|
Height in pixels, when known. |
order - Int
|
Position in the point's gallery. |
url - String!
|
Path the image is fetched from, relative to the API origin. |
createdAt - ISODate
|
Example
{
"_id": "xyz789",
"mime": "abc123",
"sizeBytes": 987,
"width": 987,
"height": 987,
"order": 987,
"url": "abc123",
"createdAt": ISODate
}
Object
Description
Generic JSON object or primitive value.
Example
Object
Overlay
Description
A user-uploaded vector layer (shapefile converted to WGS84 GeoJSON). Geometry is fetched separately as static GeoJSON from dataUrl; this type carries only the metadata needed to list, style, and locate a layer.
Fields
| Field Name | Description |
|---|---|
_id - String!
|
Overlay id. |
name - String!
|
Overlay name. |
description - String
|
|
geometryType - String
|
GeoJSON geometry type of the features. |
featureCount - Int
|
Number of features. |
bbox - [Float!]
|
[minLng, minLat, maxLng, maxLat] in WGS84. |
style - Object
|
Leaflet path options (color, weight, fillOpacity, ...). |
layers - [String!]
|
Thematic layers this overlay belongs to. An array because one overlay is often relevant to several. EMPTY or absent means every layer — the pre-assignment default. |
dataUrl - String!
|
Relative URL to fetch the layer's GeoJSON (public layers need no auth). |
createdAt - ISODate
|
|
updatedAt - ISODate
|
Example
{
"_id": "abc123",
"name": "xyz789",
"description": "xyz789",
"geometryType": "abc123",
"featureCount": 123,
"bbox": [987.65],
"style": Object,
"layers": ["abc123"],
"dataUrl": "xyz789",
"createdAt": ISODate,
"updatedAt": ISODate
}
Poi
Fields
| Field Name | Description |
|---|---|
_id - String!
|
Point id. |
name - String!
|
Point name. |
description - String
|
|
layer - String!
|
Thematic layer the point belongs to. |
latitude - Float!
|
WGS84 latitude. |
longitude - Float!
|
WGS84 longitude. |
createdAt - ISODate
|
|
media - [MediaItem!]!
|
Attached images, in display order. |
Example
{
"_id": "abc123",
"name": "xyz789",
"description": "abc123",
"layer": "abc123",
"latitude": 987.65,
"longitude": 123.45,
"createdAt": ISODate,
"media": [MediaItem]
}
PublicStatus
Fields
| Field Name | Description |
|---|---|
isOnline - Boolean
|
Whether the sensor is currently reporting. |
lastOnline - ISODate
|
When the sensor last reported. |
onlineSince - ISODate
|
Start of the current online period. |
uptime - Int
|
Sensor uptime as reported by the device, in minutes. |
RSSI - Int
|
Radio signal strength, dBm. |
vcc - Float
|
Supply voltage, volts. |
Example
{
"isOnline": false,
"lastOnline": ISODate,
"onlineSince": ISODate,
"uptime": 987,
"RSSI": 987,
"vcc": 123.45
}
SensorData
Description
Sensor reading row. All metric fields are optional; only those measured by the device are populated.
Fields
| Field Name | Description |
|---|---|
time - ISODate
|
Timestamp of the reading, or of the start of the averaging interval. |
Temp - Float
|
Air temperature, °C. |
Temp1 - Float
|
Second temperature probe, °C. |
wTemp - Float
|
Water temperature, °C. |
Hum - Float
|
Relative humidity, %. |
Press - Float
|
Atmospheric pressure, hPa. |
PMS1 - Float
|
PM1 particulate matter, µg/m³. |
PMS25 - Float
|
PM2.5 particulate matter, µg/m³. |
PMS10 - Float
|
PM10 particulate matter, µg/m³. |
Count - Float
|
Gamma radiation dose rate, µR/h (divide by 100 for µSv/h). |
CO2 - Float
|
Carbon dioxide, ppm. |
eCO2 - Float
|
Equivalent CO2 estimated by a gas sensor, ppm (an estimate, not a direct CO2 measurement). |
NOx - Float
|
NOx index (dimensionless sensor index, not a concentration). |
VOC - Float
|
VOC index (dimensionless sensor index, not a concentration). |
Windsp - Float
|
Wind speed, m/s. |
Windgs - Float
|
Wind gust, m/s. |
Windir - Float
|
Wind direction, degrees. |
Rain - Float
|
Precipitation, mm. |
wLevel - Float
|
Water level, mm. |
SolRad - Float
|
Solar radiation, W/m². |
Light - Float
|
Illuminance, lx. |
AQI - Int
|
US EPA Air Quality Index (0–500, February 2024 breakpoints) from the rolling 24-hour PM2.5 mean. Filled only in Location.currentValue and cityAverageLast; null with fewer than 18 of the last 24 hours of data. |
IKAV - Float
|
Belarusian air quality index ИКАВ per ЭкоНиП 17.08.06-001-2022, particulate part only: max(PM10/20, PM2.5/12) on rolling 24-hour means. Indicative, not official (the official index also includes gases and is defined for certified monitoring posts). Levels: ≤1 very good, ≤3 good, ≤5 moderate, ≤7 satisfactory, ≤10 poor, >10 dangerous. Filled only in Location.currentValue and cityAverageLast; null with fewer than 18 of the last 24 hours of data. |
Example
{
"time": ISODate,
"Temp": 987.65,
"Temp1": 987.65,
"wTemp": 987.65,
"Hum": 987.65,
"Press": 123.45,
"PMS1": 987.65,
"PMS25": 123.45,
"PMS10": 987.65,
"Count": 123.45,
"CO2": 987.65,
"eCO2": 123.45,
"NOx": 987.65,
"VOC": 123.45,
"Windsp": 123.45,
"Windgs": 123.45,
"Windir": 123.45,
"Rain": 123.45,
"wLevel": 123.45,
"SolRad": 123.45,
"Light": 987.65,
"AQI": 123,
"IKAV": 987.65
}
String
Description
The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.
Example
"xyz789"
TimeSpan
Fields
| Input Field | Description |
|---|---|
t_from - String
|
Start, ISO 8601. Required by timeSeries. |
t_to - String
|
End, ISO 8601. Required by timeSeries. |
interval_d - Int
|
Interval length, days. Default = 0 |
interval_h - Int
|
Interval length, hours. Default = 0 |
interval_m - Int
|
Interval length, minutes. The three parts add up; default 15 minutes. Default = 0 |
Example
{
"t_from": "abc123",
"t_to": "abc123",
"interval_d": 987,
"interval_h": 987,
"interval_m": 123
}