Microproduct Data GuideBeginner

SMHI Water Shortage Messages

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 Problem

At a Glance

Difficulty
Beginner — comfortable for a first prototype
Size
Tiny · ≤0.001 GB
Formats
JSON
Access
API
API Key
Not Required
Provider
Swedish Meteorological and Hydrological Institute
Updates
Near Real Time
Last Verified
Sep 28, 2026
Source Type
Government Source
  • Python Syntax Checked
  • Runnable Notebook

From Source to Product Signal

Test a Product Idea in Four Steps

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.

1

Check the Setup

  • Python 3.10 or newer
  • An internet connection
  • The requests Python package
2

Access the Data

  1. 1.Review the official API entry and the special warning and message terms.
  2. 2.Request the current warning JSON once and select WATER_SHORTAGE events.
  3. 3.Check affected areas and validity before displaying an unchanged message.
Open Official Source
3

Run the Python Example

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"))
4

Review Current Water Shortage Information

List a few official messages with their affected areas and publication times.

  1. 01Preserve the source message and event code without changing its wording.
  2. 02Show affected areas and validity alongside every message.
  3. 03Cite SMHI and refresh before presenting current conditions.

Dataset Details

Swedish Meteorological and Hydrological Institute is a government source. Last verified 2026-09-28. Temporal coverage: current official information messages.

Geography

Formats

Provider

Swedish Meteorological and Hydrological Institute

Data Terms

SMHI warnings and messages may be used for commercial or noncommercial purposes, but their information must not be altered; always attribute SMHI and heed all validity times. These special warning terms override the general CC BY data terms.

Send Feedback