Check the Setup
- Python 3.10 or newer
- An internet connection
- The requests Python package
Official Swedish water-shortage information messages from the impact-based warning API, with dated affected-area and validity metadata for local water-risk review.
Report a ProblemFrom Source to Product Signal
The documented SMHI impact-based warning API also publishes official water-shortage information messages. Start with one current warning list, filter by the documented event code, and keep message text and its timing intact; a message without valid time and area context is not a local warning.
Install the packages, then run the notebook cell.
python -m pip install requests
import requests
response = requests.get(
"https://opendata-download-warnings.smhi.se/ibww/api/version/1/warning.json",
timeout=20,
)
response.raise_for_status()
messages = [warning for warning in response.json()
if warning.get("event", {}).get("code") == "WATER_SHORTAGE"]
print(f"{len(messages)} current water-shortage messages")
for message in messages[:3]:
for area in message.get("warningAreas", [])[:2]:
name = area.get("areaName", {})
print(message["id"], name.get("en") or name.get("sv"),
area.get("published"), area.get("approximateStart"))Test a Useful Signal
List a few official messages with their affected areas and publication times.
Swedish Meteorological and Hydrological Institute is a government source. Last verified 2026-09-28. Temporal coverage: current official information messages.