CanAirIO fixed stations API for fetch published data
Edit me


The current fixed stations are stored in an InfluxDB database service, each station write a data series time in separated tables. We will change it to different schema soon. For now the next endpoints are enabled.

Data visualization

For now, the shared series time of each stations could be listed in our Grafana dashboard here:

CanAirIO grafana

Mobile track visualization

Data endpoint

Each series time could be fetched via the next endpoint:

the full documentation of InfluxDB query syntax could be consulted here

For example:

curl -G '' --data-urlencode 'q=select * from "PM25_Berlin_CanAirIO_v2" WHERE time >= now() - 12h' > PM25_Berlin_CanAirIO_v2.json

Fixed stations names

For get the complete list of fixed stations names:

curl -G '' --data-urlencode 'q=show measurements'

But the more important stations of CanAirIO with more stable data is listed here.

Python example

In your OS please install before the python3-virtualenv package, then:

create and activate your virtual space:

virtualenv venv && source venv/bin/activate

install the next package for run the test:

pip3 install influxdb ipython


enter to ipython console with the command ipython and execute the next lines for import the influxDb client and instance it:

from influxdb import InfluxDBClient
client = InfluxDBClient(host='', port=8086, database='canairio')

after that, run a query:

client.query('select * from "PM2.5_BOG_FON_Hayuelos_E01" WHERE time >= now() - 10m')

you should have an output similar to next:

python output from fixed station query

Stations names

for get the all names of fixed stations:


All tracks request

For now we don’t have this development, CanAirIO is a opensource initiative and you able to send any pull request for help us in improve our API. For now we have published some backups of last one year, for example:

CanAirIO full snap - fixed stations

Please read the README file in the link for details.

Tags: api