Back to top

ΑQ Data Hub

In-situ data hub is a collection of various free to use data APIs

  • In every API request you are expected to pass the following headers parameters.
    • key: You can obtain this authentication key from draxis
    • X-Consumer-Groups: standard

Air Quality: Sensors

Air Quality is a simple API allowing consumers to view various Air Quality measurements from different sources

Sensors

Sensors is a collection of low cost sensors around the world. This API retrieves the basic info of them. We have added various query URI template parameters

Get the collection
GET/v2/sensors{?limit_records,sensor_state,access_key,bbox}

Example URI

GET /v2/sensors?limit_records=&sensor_state=&access_key=&bbox=
URI Parameters
HideShow
limit_records
number (optional) Default: unlimited 

The maximum number of results to return.

sensor_state
text (optional) Default: "active" 

Select active / inactive or all sensors.

access_key
string (optional) Default: none 

unique string with identifier of a sensor.

bbox
array (optional) Default: "No bounding box" 

bounding box in left,bottom,right,top defines the area where the sensors are located.

Request  Sensors
HideShow
Headers
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
X-My-Message-Header: 42
Body
{
  "status": "success",
  "message": "",
  "data": [
    {
      "id": 2,
      "access_key": "3133443bea0d7f71171706ceb7541a97",
      "name": "DriveIt Sensor 1",
      "project": "driveit-sensor",
      "created_at": "2019-07-26 13:10:57",
      "updated_at": "2019-07-26 13:10:57",
      "deleted_at": null,
      "lng": "22.894333",
      "lat": "40.655102"
    },
    {
      "id": 10,
      "access_key": "test-1002",
      "name": "Test sensor",
      "project": "sympnia-sensor",
      "created_at": "2019-08-30 11:32:22",
      "updated_at": "2019-08-30 11:35:48",
      "deleted_at": "2019-08-30 11:35:48",
      "lng": "23.727539",
      "lat": "37.98381"
    },
    {
      "id": 13,
      "access_key": "83ee72848e5be03a9c78cdfa91b5aa9e",
      "name": "Aek",
      "project": "sympnia-sensor",
      "created_at": "2019-08-30 14:09:37",
      "updated_at": "2019-08-30 14:09:54",
      "deleted_at": "2019-08-30 14:09:54",
      "lng": "18.798452489848",
      "lat": "25.968551630399"
    }
  ]
}

Last measurements

Gets the last measurements of the low cost sensors. We have added various query URI template parameters

Get the last measurements
GET/v2/sensors/last_measurements{?limit_records,sensor_state,limit_days_old,measurement_types,access_key,bbox,summarize,measurement_types_required}

Example URI

GET /v2/sensors/last_measurements?limit_records=&sensor_state=&limit_days_old=&measurement_types=&access_key=&bbox=&summarize=&measurement_types_required=
URI Parameters
HideShow
limit_records
number (optional) Default: "unlimited" 

The maximum number of results to return.

sensor_state
text (optional) Default: "active" 

Select active / inactive or all sensors

limit_days_old
number (optional) Default: none 

Do not show measurements older than that many days

measurement_types
string (optional) Default: none 

Type of measurements from the sensor eg. NO2, PM10 etc.

access_key
string (optional) Default: none 

unique string with identifier of a sensor.

bbox
array (optional) Default: "No bounding box" 

bounding box in left,bottom,right,top defines the area where the sensors are located.

summarize
string (optional) Default: none 

Summarize hourly and daily the sensor measurements.

measurement_types_required
number (optional) Default: none 

It will return only the measurements that has all the (requested) measurement_types. Otherwise it will return null values

Request  Sensors
HideShow
Headers
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
X-My-Message-Header: 42
Body
{
  "status": "success",
  "message": "",
  "data": [
    {
      "id": 15424,
      "access_key": "LUF30010-14-SDS011",
      "name": "SDS011 - Nova Fitness",
      "project": "luftdaten-sensor",
      "last_measurement_at": "2020-02-27 09:34:15",
      "lng": "8.112",
      "lat": "53.564",
      "aq_index": "30",
      "euro_aq_index": "19.97",
      "CO": null,
      "CO2": null,
      "NO": null,
      "NO2": null,
      "O3": null,
      "PM1": null,
      "PM10": "19.97",
      "PM25": "9.29",
      "SO2": null,
      "TEMP": null,
      "HUM": null,
      "envi_index": 1
    },
    {
      "id": 11303,
      "access_key": "LUF22250-14-SDS011",
      "name": "SDS011 - Nova Fitness",
      "project": "luftdaten-sensor",
      "last_measurement_at": "2020-02-27 09:33:15",
      "lng": "5.772",
      "lat": "52.184",
      "aq_index": "41",
      "euro_aq_index": "26.71",
      "CO": null,
      "CO2": null,
      "NO": null,
      "NO2": null,
      "O3": null,
      "PM1": null,
      "PM10": "26.71",
      "PM25": "12.5",
      "SO2": null,
      "TEMP": null,
      "HUM": null,
      "envi_index": 1
    },
    {
      "id": 3488,
      "access_key": "LUF7545-14-SDS011",
      "name": "SDS011 - Nova Fitness",
      "project": "luftdaten-sensor",
      "last_measurement_at": "2020-02-27 09:34:26",
      "lng": "12.616",
      "lat": "51.454",
      "aq_index": "131",
      "euro_aq_index": "25.98",
      "CO": null,
      "CO2": null,
      "NO": null,
      "NO2": null,
      "O3": null,
      "PM1": null,
      "PM10": "25.98",
      "PM25": "24.64",
      "SO2": null,
      "TEMP": null,
      "HUM": null,
      "envi_index": 1
    }
  ]
}

Sensor Details

Gets all details for a specific sensor.

GET sensor details
GET/v2/sensors/{id}{?sensor_state,access_key,bbox}

Example URI

GET /v2/sensors/1?sensor_state=&access_key=&bbox=
URI Parameters
HideShow
id
number (required) Example: 1

A unique identifier of the sensor.

sensor_state
text (optional) Default: "active" 

Select active / inactive or all sensors

access_key
string (optional) Default: none 

unique string with identifier of a sensor.

bbox
array (optional) Default: "No bounding box" 

bounding box in left,bottom,right,top defines the area where the sensors are located.

Request  Sensors
HideShow
Headers
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
X-My-Message-Header: 42
Body
{
  "status": "success",
  "message": "",
  "data": [
    {
      "id": 1,
      "access_key": "SYMDC4F2266CC34_OLD34",
      "name": "Sympnia sensor",
      "project": "sympnia-sensor",
      "created_at": "2019-07-26 13:09:30",
      "updated_at": "2020-01-20 10:06:22",
      "deleted_at": "2020-01-27 14:58:00",
      "lng": "23.6782178",
      "lat": "37.9431788"
    }
  ]
}

Last Measurements of a Sensor

Gets last measurements for a specific sensor.

GET last measurements of a sensor
GET/v2/sensors/{id}/last_measurements{?sensor_state,access_key,limit_records,bbox}

Example URI

GET /v2/sensors/44/last_measurements?sensor_state=&access_key=&limit_records=&bbox=
URI Parameters
HideShow
id
number (required) Example: 44

A unique identifier of the sensor.

sensor_state
text (optional) Default: "active" 

Select active / inactive or all sensors

access_key
string (optional) Default: none 

unique string with identifier of a sensor.

limit_records
number (optional) Default: "unlimited" 

The maximum number of results to return.

bbox
array (optional) Default: "No bounding box" 

bounding box in left,bottom,right,top defines the area where the sensors are located.

Request  Sensors
HideShow
Headers
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
X-My-Message-Header: 42
Body
{
  "status": "success",
  "message": "",
  "data": [
    {
      "id": 44,
      "access_key": "PUR84F3EB7BC99F",
      "name": "Δημαρχείο",
      "project": "purpleair-sensor",
      "last_measurement_at": "2020-03-05 07:38:38",
      "lng": "21.7664616",
      "lat": "39.5530845",
      "aq_index": "13",
      "euro_aq_index": "4.17",
      "CO": null,
      "CO2": null,
      "NO": null,
      "NO2": null,
      "O3": null,
      "PM1": "2.53",
      "PM10": "4.17",
      "PM25": "4",
      "SO2": null,
      "TEMP": "16.666666666667",
      "HUM": "42",
      "envi_index": 1
    }
  ]
}

Historical measurements

Gets all measurements for a specific sensor.

Get the historical measurements of a sensor
GET/v2/sensors/{id}/measurements{?sensor_state,measurement_types,start_date,end_date,summarize,measurement_types_required}

Example URI

GET /v2/sensors/44/measurements?sensor_state=&measurement_types=&start_date=&end_date=&summarize=&measurement_types_required=
URI Parameters
HideShow
id
number (required) Example: 44

A unique identifier of the sensor.

sensor_state
text (optional) Default: "active" 

Select active / inactive or all sensors

measurement_types
string (optional) Default: none 

Type of measurements from the sensor eg. NO2, PM10 etc.

start_date
date (optional) Default: none 

Start date for a sensor which measurements are available. Also combine with end date for range results.

end_date
date (optional) Default: none 

End date for a sensor which measurements are available. Also combine with start date for range results.

summarize
string (optional) Default: none 

Summarize hourly and daily the sensor measurements.

measurement_types_required
number (optional) Default: none 

It will return only the measurements that has all the (requested) measurement_types. Otherwise it will return null values

Request  Sensors
HideShow
Headers
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
X-My-Message-Header: 42
Body
{
  "status": "success",
  "message": "",
  "data": [
    {
      "t": "2019-11-06 09:01:13",
      "PM1": "18.94",
      "PM10": "29.96",
      "PM25": "28.16",
      "TEMP": null,
      "HUM": null
    },
    {
      "t": "2019-11-06 10:01:15",
      "PM1": "15.17",
      "PM10": "24.58",
      "PM25": "22.91",
      "TEMP": null,
      "HUM": null
    },
    {
      "t": "2019-11-06 11:01:12",
      "PM1": "13.74",
      "PM10": "21.97",
      "PM25": "20.68",
      "TEMP": null,
      "HUM": null
    }
  ]
}

Capabilities

Gets the capabilities of a certain sensor based on the known measurements

Get the capabilities of a sensor
GET/v2/sensors/{id}/capabilities

Example URI

GET /v2/sensors/44/capabilities
URI Parameters
HideShow
id
number (required) Example: 44

A unique identifier of the sensor.

Request  Sensors
HideShow
Headers
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
X-My-Message-Header: 42
Body
{
  "status": "success",
  "message": "",
  "data": [
    {
      "capability": "HUM"
    },
    {
      "capability": "PM1"
    },
    {
      "capability": "PM10"
    },
    {
      "capability": "PM25"
    },
    {
      "capability": "TEMP"
    }
  ]
}

Air Quality: Stations

Stations

Stations is a collection of accurate sensors around the world. This API retrieves the basic info of them. We have added various query URI template parameters

Get the stations collection
GET/v2/stations{?limit_records,bbox,name}

Example URI

GET /v2/stations?limit_records=&bbox=&name=
URI Parameters
HideShow
limit_records
number (optional) Default: unlimited 

The maximum number of results to return.

bbox
array (optional) Default: "No bounding box" 

bounding box in left,bottom,right,top defines the area where the sensors are located.

name
string (optional) Default: none 

The name of the station where the sesnor located.

Request  GET
HideShow
Headers
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
X-My-Message-Header: 42
Body
{
  "status": "success",
  "message": "",
  "data": [
    {
      "id": 10674,
      "key": "68f48170-5e42-11ea-8c09-03510b3f7710",
      "is_forecast": true,
      "lng": "-80.03071",
      "lat": "33.183018",
      "region_name": "BERKELEY",
      "name": "Moncks Corner",
      "refresh_interval": "daily",
      "country": "",
      "station_source": "test",
      "created_at": "2020-03-04 18:03:10",
      "updated_at": "2020-03-04 18:03:10"
    },
    {
      "id": 10673,
      "key": "4943e4d0-5e42-11ea-8530-25e77f503311",
      "is_forecast": true,
      "lng": "-82.81067",
      "lat": "34.63596",
      "region_name": "ANDERSON",
      "name": "Garrison Arena",
      "refresh_interval": "daily",
      "country": "",
      "station_source": "test",
      "created_at": "2020-03-04 18:02:17",
      "updated_at": "2020-03-04 21:02:21"
    },
    {
      "id": 10672,
      "key": "ff363070-5dcc-11ea-b185-9d87bfa90fbd",
      "is_forecast": true,
      "lng": "-123.19847",
      "lat": "39.11239",
      "region_name": "CA8 - ARB",
      "name": "MMCA81037",
      "refresh_interval": "daily",
      "country": "",
      "station_source": "test",
      "created_at": "2020-03-04 04:02:42",
      "updated_at": "2020-03-04 22:03:35"
    }
  ]
}

station details

Gets all details for a specific station.

Get the details of a station
GET/v2/stations/{id}

Example URI

GET /v2/stations/1
URI Parameters
HideShow
id
number (required) Example: 1

A unique identifier of the station.

Request  GET
HideShow
Headers
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
X-My-Message-Header: 42
Body
{
  "status": "success",
  "message": "",
  "data": [
    {
      "id": 1,
      "key": "915a6ef0-a8d9-4bfb-b719-78e31249d962",
      "is_forecast": true,
      "lng": "22.954063",
      "lat": "40.623742",
      "region_name": "Thessaloniki",
      "name": "New City Hall",
      "refresh_interval": "daily",
      "country": "Greece",
      "station_source": null,
      "created_at": null,
      "updated_at": "2020-02-07 10:30:02"
    }
  ]
}

Last measurements of stations

Gets the last measurements of the stations. We have added various query URI template parameters

Get the last measurements of stations
GET/v2/stations/last_measurements{?limit_records,bbox,name,measurement_types_required,measurement_types,limit_days_old}

Example URI

GET /v2/stations/last_measurements?limit_records=&bbox=&name=&measurement_types_required=&measurement_types=&limit_days_old=
URI Parameters
HideShow
limit_records
number (optional) Default: none 

The maximum number of results to return.

bbox
array (optional) Default: "No bounding box" 

bounding box in left,bottom,right,top defines the area where the sensors are located.

name
string (optional) Default: none 

The name of the station where the sesnor located.

measurement_types_required
number (optional) Default: none 

It will return only the measurements that has all the (requested) measurement_types. Otherwise it will return null values

measurement_types
string (optional) Default: none 

Type of measurements from the sensor eg. NO2, PM10 etc.

limit_days_old
number (optional) Default: none 

Do not show measurements older than that many days

Request  GET
HideShow
Headers
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
X-My-Message-Header: 42
Body
{
  "status": "success",
  "message": "",
  "data": [
    {
      "id": 10674,
      "key": "68f48170-5e42-11ea-8c09-03510b3f7710",
      "is_forecast": true,
      "lng": "-80.03071",
      "lat": "33.183018",
      "region_name": "BERKELEY",
      "name": "Moncks Corner",
      "refresh_interval": "daily",
      "country": "",
      "station_source": "test",
      "created_at": "2020-03-04 18:03:10",
      "last_measurement_at": "2020-03-05 08:07:16",
      "aq_index": null,
      "euro_aq_index": "52.92",
      "CO": null,
      "CO2": null,
      "NO": null,
      "NO2": null,
      "O3": "52.92",
      "PM1": null,
      "PM10": null,
      "PM25": null,
      "SO2": null,
      "TEMP": null,
      "HUM": null,
      "envi_index": 1
    },
    {
      "id": 10673,
      "key": "4943e4d0-5e42-11ea-8530-25e77f503311",
      "is_forecast": true,
      "lng": "-82.81067",
      "lat": "34.63596",
      "region_name": "ANDERSON",
      "name": "Garrison Arena",
      "refresh_interval": "daily",
      "country": "",
      "station_source": "test",
      "created_at": "2020-03-04 18:02:17",
      "last_measurement_at": "2020-03-05 08:07:01",
      "aq_index": null,
      "euro_aq_index": "37.24",
      "CO": null,
      "CO2": null,
      "NO": null,
      "NO2": null,
      "O3": "37.24",
      "PM1": null,
      "PM10": null,
      "PM25": null,
      "SO2": null,
      "TEMP": null,
      "HUM": null,
      "envi_index": 1
    },
    {
      "id": 10672,
      "key": "ff363070-5dcc-11ea-b185-9d87bfa90fbd",
      "is_forecast": true,
      "lng": "-123.19847",
      "lat": "39.11239",
      "region_name": "CA8 - ARB",
      "name": "MMCA81037",
      "refresh_interval": "daily",
      "country": "",
      "station_source": "test",
      "created_at": "2020-03-04 04:02:42",
      "last_measurement_at": "2020-03-05 08:07:13",
      "aq_index": "13",
      "euro_aq_index": "4.2",
      "CO": null,
      "CO2": null,
      "NO": null,
      "NO2": null,
      "O3": null,
      "PM1": null,
      "PM10": null,
      "PM25": "4.2",
      "SO2": null,
      "TEMP": null,
      "HUM": null,
      "envi_index": 1
    }
  ]
}

Last measurements of a station

Gets the last measurements of a station.

Get the last measurements of a station
GET/v2/stations/{id}/last_measurements{?limit_records,bbox,name}

Gets the last measurements of a station.

Example URI

GET /v2/stations/1/last_measurements?limit_records=&bbox=&name=
URI Parameters
HideShow
id
number (required) Example: 1

A unique identifier of the station.

limit_records
number (optional) Default: none 

The maximum number of results to return.

bbox
array (optional) Default: "No bounding box" 

bounding box in left,bottom,right,top defines the area where the sensors are located.

name
string (optional) Default: none 

The name of the station where the sesnor located.

Request  GET
HideShow
Headers
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
X-My-Message-Header: 42
Body
{
  "status": "success",
  "message": "",
  "data": [
    {
      "id": 1,
      "key": "915a6ef0-a8d9-4bfb-b719-78e31249d962",
      "is_forecast": true,
      "lng": "22.954063",
      "lat": "40.623742",
      "region_name": "Thessaloniki",
      "name": "New City Hall",
      "refresh_interval": "daily",
      "country": "Greece",
      "station_source": null,
      "created_at": null,
      "last_measurement_at": "2020-03-05 10:30:03",
      "aq_index": "11",
      "euro_aq_index": "45",
      "CO": null,
      "CO2": null,
      "NO": null,
      "NO2": "28",
      "O3": "45",
      "PM1": null,
      "PM10": "12",
      "PM25": null,
      "SO2": null,
      "TEMP": null,
      "HUM": null,
      "envi_index": 1
    }
  ]
}

Historical measurements

Gets all historical measurements of a station.

Get the historical measurements of a station
GET/v2/stations/{id}/measurements{?limit_records,measurement_types,start_date,end_date,summarize,measurement_types_required}

Example URI

GET /v2/stations/44/measurements?limit_records=&measurement_types=&start_date=&end_date=&summarize=&measurement_types_required=
URI Parameters
HideShow
id
number (required) Example: 44

A unique identifier of the station.

limit_records
number (optional) Default: none 

The maximum number of results to return.

measurement_types
string (optional) Default: none 

Type of measurements from the sensor eg. NO2, PM10 etc.

start_date
date (optional) Default: none 

Start date for a station which measurements are available. Also combine with end date for range results.

end_date
date (optional) Default: none 

End date for a station which measurements are available. Also combine with start date for range results.

summarize
string (optional) Default: none 

Summarize hourly and daily the sensor measurements.

measurement_types_required
number (optional) Default: none 

It will return only the measurements that has all the (requested) measurement_types. Otherwise it will return null values

Request  measurements
HideShow
Headers
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
X-My-Message-Header: 42
Body
{
  "status": "success",
  "message": "",
  "data": [
    {
      "t": "2019-08-02 09:30:02",
      "CO": null,
      "NO2": "45.8344",
      "O3": "50.9796",
      "PM10": "42",
      "PM25": null,
      "SO2": null
    },
    {
      "t": "2019-09-09 09:30:20",
      "CO": null,
      "NO2": "47.8272",
      "O3": "72.9708",
      "PM10": null,
      "PM25": null,
      "SO2": null
    },
    {
      "t": "2019-09-30 09:30:03",
      "CO": null,
      "NO2": "51.8128",
      "O3": "9.996",
      "PM10": null,
      "PM25": null,
      "SO2": null
    }
  ]
}

Capabilities

Gets the capabilities of a certain station based on the known measurements

Get the capabilities of a station
GET/v2/stations/{id}/capabilities

Example URI

GET /v2/stations/1/capabilities
URI Parameters
HideShow
id
number (required) Example: 1

A unique identifier of the station.

Request  GET
HideShow
Headers
Accept: application/json
Response  200
HideShow
Headers
Content-Type: application/json
X-My-Message-Header: 42
Body
{
  "status": "success",
  "message": "",
  "data": [
    {
      "capability": "CO"
    },
    {
      "capability": "NO2"
    },
    {
      "capability": "O3"
    },
    {
      "capability": "PM10"
    },
    {
      "capability": "PM25"
    },
    {
      "capability": "SO2"
    }
  ]
}

Generated by aglio on 04 Jun 2020