Realtime APIs
Flood Warning API

Flood Warning API Endpoint


Source of Flood Warning Data

The Flood Warning API provides real-time information on water levels and flood warnings at monitoring stations around the country. These data are collected by the Department of Irrigation and Drainage. You can also access all the data from the Flood Warning API on The Official Web of Public Infobanjir (opens in a new tab).

Frequency of data update

The Flood Warning API data is updated every 15 minutes.

Request Query & Response Format

To filter and request data, use the standard filtering operations in the Request Query. For information on how the API responds to your requests, refer to the Response Format section.

Example Query

To fetch data from the Flood Warning API, use the following curl command. Open your terminal and enter this command:

curl --location ''

Understanding the field values

Here is a table of all possible field names returned and the description of them.

KeyTypeDescriptionExample Value
station_idstringUnique identifier for the monitoring station."26167"
station_namestringThe name or description of the monitoring station."Sg. Anak Bukit di Jambatan TAR"
latitudefloatThe latitude coordinate of the monitoring station's location.6.123722
longitudefloatThe longitude coordinate of the monitoring station's location.100.3599
districtstringThe district where the monitoring station is located."Kota Setar"
statestringThe state where the monitoring station is located."KEDAH"
sub_basinstringThe sub-basin associated with the monitoring station."Sg. Anak Bukit"
main_basinstringThe main basin associated with the monitoring station."Sungai Kedah"
station_typestringThe type of the monitoring station, such as rain fall (RF) or water level (WL). Can contain both types."WL"
water_level_currentfloatThe current water level at the station.1.73
water_level_indicatorstringAn indicator of the water level condition, e.g., NORMAL, ALERT, WARNING, DANGER and ERROR."DANGER"
water_level_normal_levelfloatThe normal level for the water level at the station.4.5
water_level_alert_levelfloatThe alert level for the water level at the station.7.5
water_level_danger_levelfloatThe danger level for the water level at the station.4.5
water_level_warning_levelfloatThe warning level for the water level at the station.1.7
water_level_incrementfloatThe increment or change in water level.0.03
water_level_update_datetimedatetimeThe date and time when the water level information was last updated."2023-09-12 13:00:00"
water_level_update_datedateThe date when the water level information was last updated."2023-09-12"
water_level_trendstringThe trend of the water level, e.g., RISING, RECEDING or NO_CHANGE"RISING"
rainfall_cleanfloatThe clean (filtered) rainfall data, if available.1.3
rainfall_latest_1hrfloatThe latest rainfall measurement for the past 1 hour, if available.2.3
rainfall_total_todayfloatThe total rainfall recorded for the current day, if available.3.1
rainfall_indicatorstringAn indicator related to rainfall conditions, if available (e.g., NO_RAINFALL, LIGHT, MODERATE or ERROR)"LIGHT"
rainfall_update_datetimestringThe date and time when the rainfall information was last updated, if available."2023-09-12 13:00:00"
rainfall_update_datestringThe date when the rainfall information was last updated, if available."2023-09-12"
water_level_displaystringThe display value for water level, which may be different from the raw value."1"
rainfall_displaystringThe display value for rainfall, which may be different from the raw value, if available."0"
raw_water_levelfloatThe raw, unprocessed water level measurement.1.73
raw_rainfallfloatThe raw, unprocessed rainfall measurement, if available.1.3
station_statusstringThe status of the monitoring station (e.g., ON or OFF)."ON"
station_codestringA unique code or identifier for the monitoring station."JAMBATANTAR"
water_level_statusstringThe status of the water level monitoring (e.g., ON, OFF or NA)"ON"
rainfall_statusstringThe status of rainfall monitoring, if available. (e.g., ON, OFF or NA)"ON"

Note: A value of -9999 in the numeric fields indicates a service interruption or sensor malfunction at the time of measurement.