Bayern APIgkd.bayern.de ↗
Access structured groundwater level data from GKD Bayern monitoring stations. Station metadata, current readings, and decades of daily time series for Munich's drinking water regions.
What is the Bayern API?
The GKD Bayern API exposes groundwater monitoring data across 3 endpoints, covering station metadata, current water level readings, and historical daily time series from Bavaria's official hydrological monitoring network. Using get_current_level you can retrieve the latest measured groundwater depth in metres above sea level along with ground surface elevation, while get_time_series delivers up to decades of daily observations for stations in the Mangfalltal and Loisachtal drinking water supply regions.
curl -X GET 'https://api.parse.bot/scraper/445866aa-285e-439c-a630-fbd99bfc607a/get_station_info?station_id=21947' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace gkd-bayern-de-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: MunichWater SDK — bounded, re-runnable; every call capped."""
from parse_apis.gkd_bayern_de_api import MunichWater, Period, StationNotFound
client = MunichWater()
# Fetch station metadata for Vagen/Mangfall (Mangfalltal supply region)
station = client.stations.get(station_id="21947")
print(station.station_name, station.supply_region, station.observation_period)
print(f" HHW={station.historical_max_level_m}, MW={station.historical_mean_level_m}, NNW={station.historical_min_level_m}")
# Get the most recent groundwater level
level = station.current_level()
print(level.station_name, level.groundwater_level_m, level.measurement_datetime)
# Iterate recent time series (last 12 months), capped at 3 measurements
for m in station.time_series(period=Period.RECENT, limit=3):
print(m.date, m.groundwater_level_m)
# Typed error handling: attempt to fetch an unknown station
try:
client.stations.get(station_id="99999")
except StationNotFound as e:
print(f"not found: {e.station_id}")
print("exercised: stations.get / station.current_level / station.time_series")
Retrieves station metadata including location, operator, aquifer type, ground elevation, and historical water level statistics (highest/mean/lowest ever recorded). One request per station.
| Param | Type | Description |
|---|---|---|
| station_idrequired | string | GKD Bayern station number (e.g. 21947, 25707, 25668). |
{
"type": "object",
"fields": {
"river": "string",
"aquifer": "string",
"district": "string",
"operator": "string",
"source_url": "string",
"station_id": "string",
"station_url": "string",
"municipality": "string",
"retrieved_at": "string — ISO 8601 timestamp",
"station_name": "string",
"supply_region": "string — Mangfalltal or Loisachtal",
"ground_elevation_m": "number — metres above sea level",
"observation_period": "string — date range",
"historical_max_level_m": "number — HHW in metres above sea level",
"historical_min_level_m": "number — NNW in metres above sea level",
"historical_mean_level_m": "number — MW in metres above sea level"
},
"sample": {
"data": {
"river": "inn",
"aquifer": "Quartär",
"district": "Rosenheim",
"operator": "Wasserwirtschaftsamt Rosenheim",
"source_url": "https://www.gkd.bayern.de/de/grundwasser/oberesstockwerk/inn/vagen-mangfall-r-35-21947",
"station_id": "21947",
"station_url": "https://www.gkd.bayern.de/de/grundwasser/oberesstockwerk/inn/vagen-mangfall-r-35-21947",
"municipality": "Feldkirchen-Westerham",
"retrieved_at": "2026-07-16T08:53:57.357462+00:00",
"station_name": "VAGEN/MANGFALL R 35",
"supply_region": "Mangfalltal",
"ground_elevation_m": 522.02,
"observation_period": "09.05.1978 bis 23.06.2026",
"historical_max_level_m": 521.54,
"historical_min_level_m": 519.14,
"historical_mean_level_m": 519.92
},
"status": "success"
}
}About the Bayern API
Station Metadata and Coverage
get_station_info returns the identifying and contextual details for a given GKD Bayern station, specified by its numeric station_id (e.g. 21947, 25707, 25668). Response fields include station_name, municipality, district, operator, aquifer, and river, giving you the full administrative and hydrogeological context for a monitoring point. The source_url and station_url fields link directly back to the source record for traceability.
Current Groundwater Readings
get_current_level returns the most recent measurement for a station. The response includes groundwater_level_m (current water table in metres above sea level), ground_elevation_m (surface elevation at the station), and measurement_datetime as an ISO 8601 timestamp indicating exactly when the measurement was taken. The supply_region field classifies the station as either Mangfalltal or Loisachtal — the two primary drinking water catchment zones feeding Munich.
Historical Time Series
get_time_series retrieves daily groundwater level records. The period parameter accepts either 'recent' (last 12 months) or 'full' (complete observation history, potentially spanning several decades). Results are ordered newest-first. The optional limit parameter caps the number of returned records; omitting it returns all available measurements. Each entry in the measurements array contains a date and a groundwater_level_m value. The measurement_count field in the response confirms how many records were returned.
The Bayern API is a managed, monitored endpoint for gkd.bayern.de — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when gkd.bayern.de changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official gkd.bayern.de API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Track seasonal groundwater fluctuations in Munich's Mangfalltal and Loisachtal drinking water supply zones using daily time series data.
- Build long-term trend visualizations by pulling the full observation history via get_time_series with period='full' for multiple station IDs.
- Alert systems that watch get_current_level and notify when groundwater_level_m drops below a defined threshold.
- Compare ground_elevation_m against groundwater_level_m across stations to map depth-to-water-table across the monitoring network.
- Populate a station directory with operator, aquifer type, municipality, and district from get_station_info for internal GIS or reporting tools.
- Academic and environmental research requiring decades of hydrological observations from official Bavarian monitoring infrastructure.
- Water stress dashboards that aggregate current readings across multiple GKD Bayern station IDs to assess regional supply conditions.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.