Skip to content

Selangor Rainfall Scraper (InfoBanjir JPS)

Try for free

Scrape live rainfall readings from InfoBanjir JPS Selangor (infobanjirjps.selangor.gov.my): every online rain gauge of a district (Klang, Petaling, Hulu Langat...) with station, district, last reading time, rain since midnight, last hour and six previous days in mm. No login.

🌧️ Selangor Rainfall Scraper (InfoBanjir JPS)

Get the live rainfall readings of the Selangor flood information site, InfoBanjir JPS Selangor (infobanjirjps.selangor.gov.my), as one clean table: every online rain gauge of the districts you pick, with its station name, district, the time of its latest reading, the rain since midnight, the rain of the last hour and the daily rain of the six previous days, all in millimetres. Pick Klang, Petaling, Hulu Langat or any other Selangor district (or all of them), run, and export to JSON, CSV or Excel. No login needed.

✨ Why use Selangor Rainfall Scraper?

  • 📋 The whole table in one run — every station the rainfall page lists for the district, not 10 per page.
  • 🔢 Numbers ready for analysis — rainfall as numbers in mm, and the reading time both as the page shows it and in ISO 8601 with the Malaysia offset.
  • 🗺️ Any district — Klang, Petaling, Hulu Langat, Gombak, Hulu Selangor, Kuala Selangor, Sabak Bernam, Sepang, Kuala Langat, or all of Selangor at once.
  • 📆 A week of rain — rain from midnight today plus the six previous days' totals for each station.
  • ⚡ Fast and light — the Actor reads the same data the page's table is drawn from, so a run takes seconds.

🎯 Use cases

  • 🚨 Flood watch — check which stations in Klang or Petaling had heavy rain in the last hour or since midnight.
  • 📈 Rainfall records — run it on a schedule and keep your own history of the readings.
  • 🧭 Planning and response — feed the readings into a map, dashboard or alert of your own.
  • 🔬 Research — compare districts and stations over the past week.

🚀 How to use

  1. Choose the Districts (Klang is preselected; leave empty for every district of Selangor).
  2. Click Start and download the results as JSON, CSV, Excel or HTML, or read them through the API.

You can also paste a rainfall page link from the site, for example https://infobanjirjps.selangor.gov.my/rainfall-data.html?districtId=6&lang=en (district 6 is Klang), into InfoBanjir rainfall page link; the district or station named in the link is used instead of the Districts field.

📥 Input

FieldWhat it does
districtsKLANG, PETALING, HULU LANGAT, GOMBAK, HULU SELANGOR, KUALA SELANGOR, SABAK BERNAM, SEPANG, KUALA LANGAT; empty = all districts.
pageUrlOptional rainfall page link; its districtId (or stationId) is used instead of the Districts field. districtId=-1 means all districts.
proxyConfigurationProxy settings; the default datacenter proxy works, and a failed request is retried through a Malaysian residential proxy.
{
  "districts": ["KLANG"]
}

📤 Output

One row per station, in the order of the page's table.

FieldDescription
station_nameStation (rain gauge) name
station_idStation Id column as the site shows it (the JPS station number; a few stations share one)
district, district_idDistrict as shown (e.g. KLANG) and its districtId on the site (6)
reading_timeLast Updated, exactly as the page shows it (Malaysia time, DD/MM/YYYY HH:MM:SS)
reading_time_isoThe same time in ISO 8601 with +08:00
rainfall_mmRain from Midnight (mm): today's rain so far
rainfall_dateDate of rainfall_mm as the table header shows it
rainfall_1h_mmTotal 1 Hour now (mm)
daily_rainfall_mmDaily Rain (mm) of the six previous days: date, date_iso, rainfall_mm, oldest first
source_urlThe InfoBanjir rainfall page of the station's district
scraped_atScrape time (UTC)

Example row:

{
  "station_name": "BANDAR KLANG",
  "station_id": "3014080",
  "district": "KLANG",
  "district_id": 6,
  "reading_time": "22/11/2026 20:38:00",
  "reading_time_iso": "2026-11-22T20:38:00+08:00",
  "rainfall_mm": 12,
  "rainfall_date": "22/11/2026",
  "rainfall_1h_mm": 0,
  "daily_rainfall_mm": [
    {"date": "16/11/2026", "date_iso": "2026-11-16", "rainfall_mm": 11.5},
    {"date": "17/11/2026", "date_iso": "2026-11-17", "rainfall_mm": 82.0}
  ],
  "source_url": "https://infobanjirjps.selangor.gov.my/rainfall-data.html?districtId=6&lang=en",
  "scraped_at": "2026-11-22T13:02:14Z"
}

❓ FAQ

Which stations are included? Exactly the stations the public rainfall table lists: the online ones. Stations the site marks as offline are not shown on the page and are not returned; the run's status message says how many there were.

How fresh is the data? As fresh as the site: each station reports every 15 minutes or so, and reading_time shows when its latest reading came in. A station that has not reported for a while keeps its last time, exactly as on the page.

Why is rainfall_1h_mm sometimes larger than rainfall_mm? Rain in the last hour can include rain from before midnight; the Actor returns both values as the site publishes them.

Can I get several districts in one run? Yes, pick several in Districts, or leave it empty for all of Selangor (about 290 online stations). The site's own page shows one district at a time; the Actor reads all of them from the same data in one run.

What if the site is slow or down? The Actor retries through a second proxy route and gives up after about 100 seconds with a clear message, so a run never hangs.

⚠️ Limits

  • Rainfall only (the page's rain gauge table); the site's other pages (water levels, alerts) are not part of this Actor.
  • The site keeps a rolling window of six previous days plus today; older days are not available from the page.

Related actors

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

No credit card. No setup calls.