IMGW-PIB data - how to download and use it in water monitoring
Many of your own measurements only make sense in the context of weather and hydrology - and in Poland this data is publicly available, free of charge, thanks to IMGW-PIB (the Institute of Meteorology and Water Management - National Research Institute). It is worth knowing what you will find there and how to use it.
What IMGW-PIB provides
- Meteorological data - including air temperature, rainfall, wind, pressure, humidity.
- Hydrological data - including water levels and flows at gauging stations.
- Warnings and information on the hydrological-meteorological situation.
How to download it - a worked example
The Polish service IMGW-PIB is used here as a case study: the pattern repeats across most national hydrometeorological services, so it is worth learning the mechanism rather than a list of addresses. Everything starts at danepubliczne.imgw.pl, which has two parts - a file archive and an API serving current data.
| Address | What it returns | Update |
|---|---|---|
danepubliczne.imgw.pl/api/data/synop | synoptic stations: air temperature, rainfall, wind, pressure, humidity | hourly |
danepubliczne.imgw.pl/api/data/hydro | water levels, discharge and water temperature at gauging stations | hourly |
danepubliczne.imgw.pl/api/data/hydro2 | extended hydrological set (daily levels) | daily |
danepubliczne.imgw.pl/api/data/meteo | climatological stations (incl. ground temperature) | hourly |
Two parameters cover most needs: one station instead of all -
…/api/data/hydro/id/152210040 (you append /id/<code>), and a different format -
…/api/data/synop/format/csv (JSON by default; html and xml also exist).
The response is flat JSON - one object per station, no nesting. A fragment of a real response for the Vistula gauge at Warsaw-Nadwilanówka:
{
"id_stacji": "152210040",
"stacja": "Warszawa - Nadwilanówka",
"rzeka": "Wisła",
"stan_alarmowy": "800",
"stan_ostrzegawczy": "750",
"stan_wody": "44",
"stan_wody_data_pomiaru": "2026-08-12 16:50:00",
"temperatura_wody": null,
"przeplyw": "181",
"przeplyw_data": "2026-08-12 16:50:00"
}
Three things that are easy to trip over - and that you will meet in most public APIs:
- Values arrive as text, not numbers (
"stan_wody": "44") - cast them before any arithmetic. nullis normal. Water temperature is often empty when a sensor is down - that is a missing measurement, not a failed download. Skip such records; never replace them with zero.- Each field has its own timestamp (
stan_wody_data_pomiaru,przeplyw_data) - one record can carry measurements taken at different hours.
A bonus for monitoring: the hydrological record contains the warning and alarm levels for the gauge - ready-made thresholds to compare your own readings against.
Archival data
The live API returns only the latest measurement. Historical series (daily and monthly, decades back) are in the file archive: danepubliczne.imgw.pl/datastore - directories of CSV/ZIP files for meteorological and hydrological data.
Terms of use
The data are free of charge, but the terms require attribution: publications based on them must state that the data come from IMGW-PIB, and if the data were processed - add a note about the processing. Full text: terms of provision. Check the equivalent rule for your own national service - free almost never means “no conditions”.
What to use it for
IMGW data is ready-made context for your measurements:
- rainfall explains changes in water level and turbidity (run-off after rain),
- temperature helps you understand fluctuations in oxygen, the risk of cyanobacterial blooms, and even bark-beetle swarming,
- levels and flows upstream help interpret what is happening at your point.
In practice
📊 See a working example: Vistula - Warsaw (Nadwilanówka) - a public dashboard fed by exactly this API, the address
…/api/data/hydro/id/152210040from the example above. Water level and discharge pulled automatically every hour, with no login and no manual stitching of files. (Source of the data: Institute of Meteorology and Water Management - National Research Institute.)
You can connect your own gauge in the same way: in LimnoLog connectors query public APIs at a chosen rhythm and save the results next to your own measurements, on a shared timeline. More on combining data in How to combine your own measurements with public data.
See it in the LimnoLog app
Explore LimnoLog features