Skip to content

SENAMHI Peru Rainfall Scraper

Try for free

Get daily and monthly rainfall (mm) of SENAMHI weather stations in Peru: station, department, province, district, date, precipitation, coordinates and altitude, for every month the station page publishes. No login.

🌧️ SENAMHI Peru Rainfall Scraper

Get the rainfall history of SENAMHI weather stations in Peru (senamhi.gob.pe, the station map at ?p=estaciones) as one clean table: one row per station and day with the precipitation in millimetres, plus one row per month with the month's total. Every row carries the station's name, department, province, district, coordinates and altitude. Pick stations by name (for example LA OROYA), code or station page link, choose a month range or take every month the station page publishes, and export to JSON, CSV or Excel. No login needed.

✨ Why use SENAMHI Peru Rainfall Scraper?

  • 📆 Every published month in one run — the station page shows one month at a time; the Actor reads all of them (La Oroya: January 2017 to today).
  • 🔢 Numbers ready for analysis — rainfall as numbers in mm, dates in ISO format, coordinates in decimal degrees.
  • 🗓️ Daily and monthly — daily rows plus a monthly total with the number of days that had data, so gaps are visible.
  • 🛰️ Conventional and automatic stations — conventional stations give the daily table's value; automatic stations publish hourly values, which the Actor adds up per day.
  • 📍 Station facts on every row — department, province, district, latitude, longitude, altitude and station type.

🎯 Use cases

  • 🌾 Agriculture and water — rainfall history of a valley or a basin for crop or irrigation planning.
  • 🏗️ Engineering studies — daily and monthly precipitation series for hydrology and drainage design.
  • 🔬 Research and teaching — compare stations, seasons and years.
  • 📈 Monitoring — run it on a schedule for the current month and keep your own records.

🚀 How to use

  1. Enter one or more Stations: the name as the SENAMHI station map shows it (LA OROYA), the station code (111046) or the station page link.
  2. Optionally set From month and To month (YYYY-MM). Leave both empty for every month the station page offers.
  3. Choose the Rows: daily and monthly, daily only or monthly only.
  4. Click Start and download the results as JSON, CSV, Excel or HTML, or read them through the API.

📥 Input

FieldWhat it does
stationsStation names, codes or station page links (https://www.senamhi.gob.pe/mapas/mapa-estaciones-ms/map_red_graf.php?cod=111046). Names are matched without accents or case; part of a name works when only one station has it.
startMonthFirst month (YYYY-MM); empty = the oldest month the station page offers.
endMonthLast month (YYYY-MM); empty = the newest month (the current month so far).
recordsdaily_and_monthly (default), daily or monthly.
proxyConfigurationProxy settings; the default datacenter proxy works for SENAMHI.
{
  "stations": ["LA OROYA"],
  "startMonth": "2024-01",
  "endMonth": "2024-12",
  "records": "daily_and_monthly"
}

📤 Output

Daily rows in date order for each station, each month followed by its monthly row.

FieldDescription
record_typedaily or monthly
station, station_code, official_codeStation name, its code on the station map (111046) and the Codigo on its page (000604)
department, province, districtDepartamento, provincia and distrito as the station page shows them
latitude, longitudeDecimal degrees (negative = south / west)
latitude_dms, longitude_dmsThe coordinates as the station page writes them
altitude_mAltitude in metres above sea level
station_type, station_statusTipo (e.g. Convencional - Meteorológica) and how the station reports
dateDaily rows: YYYY-MM-DD; monthly rows: YYYY-MM
monthYYYY-MM
precipitation_mmRainfall in mm (daily value, or the month's total)
precipitation_rawConventional daily rows: the value as the table shows it (T = trace, under 0.1 mm, counted as 0)
hours_with_dataAutomatic stations: how many hourly values the day had (of 24)
days_with_data, days_in_monthMonthly rows: days with a rainfall value and days in the month
temp_max_c, temp_min_c, humidity_pctConventional daily rows: the same table row's temperatures and humidity
source, source_urlWhich table the value comes from, and the station page
scraped_atScrape time (UTC)

Example rows:

[
  {
    "record_type": "daily",
    "station": "LA OROYA",
    "station_code": "111046",
    "official_code": "000604",
    "department": "JUNÍN",
    "province": "YAULI",
    "district": "SANTA ROSA DE SACCO",
    "latitude": -11.57177,
    "longitude": -75.95762,
    "altitude_m": 3842,
    "station_type": "Convencional - Meteorológica",
    "date": "2024-01-03",
    "month": "2024-01",
    "precipitation_mm": 18.0,
    "precipitation_raw": "18.0",
    "temp_max_c": 15.2,
    "temp_min_c": 5.5,
    "humidity_pct": 74.5,
    "source": "daily table",
    "source_url": "https://www.senamhi.gob.pe/mapas/mapa-estaciones-ms/map_red_graf.php?cod=111046"
  },
  {
    "record_type": "monthly",
    "station": "LA OROYA",
    "date": "2024-01",
    "month": "2024-01",
    "precipitation_mm": 193.5,
    "days_with_data": 31,
    "days_in_month": 31,
    "source": "sum of the month's daily values"
  }
]

❓ FAQ

Which months are available? The months each station page lists in its month picker. Conventional stations usually go back to 2017, automatic stations often further (for example 2013 or 2015); some stations publish only the last five years.

Which days are included? Days with a rainfall value. Days the table marks S/D (sin datos, no data) or does not list are left out; the monthly row's days_with_data shows how complete the month is.

How is the monthly total made? It is the sum of that month's daily values as returned in the daily rows. A month with missing days gives a lower total than the real one; check days_with_data against days_in_month.

Are the values quality-controlled? SENAMHI marks these tables as "datos sin control de calidad" (not quality-controlled); the Actor returns them exactly as published.

What about river-level stations? Stations whose tables have no rainfall column (river-level stations) are skipped, and the run's status message names them. Hydrological stations that also measure rainfall are included.

How long does a run take? Usually one to two minutes for one station's full history (La Oroya: about 80 seconds); up to three stations run in parallel.

⚠️ Limits

  • Rainfall is taken from SENAMHI's public station tables; months a station page does not list are not available.
  • The station tables open after a visitor check on SENAMHI's site; the Actor completes it once per station, which usually takes seconds but can take a few minutes when the check is slow.

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.