These APIs with weather and water data for Switzerland are free for public and non-commercial use, lovingly handcrafted by Christian Studer (Bureau für digitale Existenz). These APIs are unofficial. There is no guarantee of availability or top performance. They are actively monitored though.
Additional licencing restrictions may apply by the original data owner (For example MeteoSwiss or the BAFU).
Please don't abuse the APIs offered here. You are welcome to drop me a mail to cstuder@existenz.ch if you find them useful or need help.
For statistical purposes add &app={your app name}
and optionally add &version={your app version}
to all of your requests.
Do you like data to be easily accessible? Consider joining Opendata.ch, the Swiss section of the Open Knowledge Foundation.
Diese APIs mit Wetter- und Wasserdaten für die Schweiz sind frei verfügbar für öffentliche und nicht-kommerzielle Zwecke, handgemacht von Christian Studer (Bureau für digitale Existenz.)
Gemessen werden unter anderem Lufttemperatur, Luftfeuchtigkeit, Sonnenscheindauer, Niederschlag/Regen, Windgeschwindigkeit, Luftdruck, sowie Oberflächen-Wassertemperatur, Wassermenge und Wasserstand, an vielen Messstationen und Flüssen in der Schweiz.
Es gelten zusätzliche Lizenzbestimmungen der Originaldatenbesitzer (zum Beispiel MeteoSchweiz oder das BAFU).
Bitte keinen Missbrauch. Du bist eingeladen mir eine E-Mail an cstuder@existenz.ch zu schreiben, wenn du diese APIs nützlich findest oder Hilfe benötigst.
Für statistische Zwecke füge &app={dein App-Name}
und optional &version={deine App-Version}
zu allen deinen Anfragen hinzu.
Magst du freie Daten? Mach mit bei Opendata.ch, der Schweizer Sektion der Open Knowledge Foundation.
See status.existenz.ch for basic status information.
Subscribe to the (infrequent, german) Existenz.ch & Aare.guru API News.
Alternatively get all the news on the Hymnos blog with the tag newsletter (RSS feed).
Internet of awesome things!
*
.Time series share a common API, consisting of four methods for accessing locations, parameters, the latest values and date ranges for historical values up to 32 days in the past. For older data, see the InfluxDB entry below.
BAFU/FOEN (Bundesamt für Umwelt/Federal Office for the Environment) hydrology data from hydrodaten.admin.ch.
Measures surface water temperature, water flow, height and more of rivers in Switzerland.
BAFU data needs to be credited and linked to the BAFU.
Periodicity: 10 minutes.
Open hydro
API documentation
Example request
Locations
Parameters
MeteoSwiss (Bundesamt für Meteorologie und Klimatologie MeteoSchweiz/Federal Office of Meteorology and Climatology) offers a selection of their SwissMetNet data on the opendata.swiss portal.
Measures air temperatures, rain rate/precipitation, winds, pressure, sunshine duration/global radiation and more.
Note that most stations measure 2 meters above ground, but some tower stations locate their sensors higher in the air. The parameters with suffix _tow
are measured on tower stations.
Periodicity: 10 minutes.
Open smn
API documentation
Example request
Locations
Parameters
Custom sensors installed and maintained by us and friends. Might be experimental, might be down.
Contact me for details if required.
Data provided by the TemperAare App (Android / iOS) by Tobias Oetiker.
Open sensors
API documentation
Example request
Locations
Parameters
A long-term archive of Hydrology and SwissMetNet data is available as an InfluxDB 2 data source. Use the following readonly token to access the data:
URL | https://influx.konzept.space |
Token | 0yLbh-D7RMe1sX1iIudFel8CcqCI8sVfuRTaliUp56MgE6kub8-nSd05_EJ4zTTKt0lUzw8zcO73zL9QhC3jtA== |
Organization | api.existenz.ch |
Bucket | existenzApi |
Precision | s (Seconds) |
There is currently no public visualization available (Mainly due to the lack of a readonly user for the InfluxDB GUI.) But you can use tools such as Grafana to connect this InfluxDB instance as a data source.
The data archive has been augmented with hydrology data from wiewarm.ch and their archive: rc9000/wiewarm-data, starting at 2001. More locations become available in 2003.
Complete BAFU data imports start at 2018.
from(bucket: "existenzApi") |> range(start: -1y) |> filter(fn: (r) => r["_measurement"] == "hydro") |> filter(fn: (r) => r["_field"] == "temperature" or r["_field"] == "flow") |> filter(fn: (r) => r["loc"] == "2135" or r["loc"] == "2030") |> aggregateWindow(every: 1d, fn: max, createEmpty: false) |> yield(name: "daily-max")
Complete archive since MeteoSwiss started publishing SwissMetNet Open Data in 2013.
from(bucket: "existenzApi") |> range(start: -1y) |> filter(fn: (r) => r["_measurement"] == "smn") |> filter(fn: (r) => r["_field"] == "tt") |> filter(fn: (r) => r["loc"] == "BER" or r["loc"] == "THU") |> aggregateWindow(every: 1d, fn: max, createEmpty: false) |> yield(name: "daily-max")
The timeseries metadata (locations and parameters) including a map are additionally stored in a Datasette at the following location:
https://api-datasette.konzept.space
The Datasette offers its own metadata API, CSV export and convenient links to the Existenz.ch API.
Both old and new.
Please refer to aareguru.existenz.ch for the APIs used by the urban swimming website and app Aare.guru.
An old version of the BAFU Hydrology API is running on aare.schwumm.ch/api.
Please use the new BAFU Hydrology API instead.
Inofficial RSS feed for the MeteoSwiss blog.
See rss.existenz.ch for all language options.
This being a hobbyist project, boring technology is good. It's mostly PHP and SQL. Some InfluxDB is sprinkled in, but turns out to be the most finicky part of the project.
More details (In Swiss german) can be found in the recording of the Aare Guru Techstack Webinar (December 2021).
Have some code which was created for this project:
parse-swissmetnet
|
PHP package to parse SwissMetNet Open Data strings |
parse-hydrodaten
|
PHP package to parse Hydrodaten (FOEN/BAFU) Open Data strings |
MyTS
|
PHP package for keeping time series data in relational databases |
temporal-shelf
|
PHP package to shelve files in directory structures according to years/months/days |
api-datasette
|
Python generator for the Datasette containing data related to api.existenz.ch |
rss.existenz.ch
|
An adaptation of RSS-Bridge for the custom MeteoSwiss blog RSS feed. |
Please report any security issue according to the security policy.
(Generated on securitytxt.org.)