Skip to content

Climate Endpoints

Endpoints for accessing historical climate data at daily, monthly, and climatology resolutions, plus derived indicators.

Climate Historical Daily

Prefix: /historical-daily

By date range (all measures)

GET /historical-daily/by-date-range-all-measures?location_ids=<ids>&start_date=<date>&end_date=<date>
Parameter Type Description
location_ids string Comma-separated location IDs, e.g. '1,2,3'
start_date date Start date (YYYY-MM-DD)
end_date date End date (YYYY-MM-DD)

Response:

[
  {
    "id": 1,
    "location_id": 103,
    "location_name": "LACHORRERA",
    "measure_id": 7,
    "measure_name": "Minimum temperature",
    "measure_short_name": "tmin",
    "measure_unit": "\u00b0C",
    "date": "1996-11-01",
    "value": 23.0
  }
]

Min/Max by location

GET /historical-daily/minmax-by-location?location_id=<id>

Climate Historical Monthly

Prefix: /historical-monthly

By date range (all measures)

GET /historical-monthly/by-date-range-all-measures?location_ids=<ids>&start_date=<date>&end_date=<date>

Response:

[
  {
    "id": 1,
    "location_id": 114,
    "location_name": "SOPROCOM LA CONCORDIA",
    "measure_id": 4,
    "measure_name": "Humedad relativa calculada m\u00e1xima diaria",
    "measure_short_name": "hrmax",
    "measure_unit": "% (porcentaje)",
    "date": "2024-01-01",
    "value": 90.16
  }
]

Min/Max by location

GET /historical-monthly/minmax-by-location?location_id=<id>

Climate Historical Climatology

Prefix: /climatology

By month range (all measures)

GET /climatology/by-month-range-location-ids-all-measures?location_ids=<ids>&start_month=<month>&end_month=<month>
Parameter Type Description
location_ids string Comma-separated location IDs
start_month integer Start month (1-12)
end_month integer End month (1-12)

Response:

[
  {
    "id": 1,
    "location_id": 114,
    "location_name": "SOPROCOM LA CONCORDIA",
    "measure_id": 4,
    "measure_name": "Humedad relativa calculada m\u00e1xima diaria",
    "measure_short_name": "hrmax",
    "measure_unit": "% (porcentaje)",
    "month": 1,
    "value": 90.16
  }
]

Min/Max by location

GET /climatology/minmax-by-location?location_id=<id>

Climate Historical Indicator

Prefix: /indicator

By location ID

GET /indicator/by-location-id?location_id=<id>

By location, date range, and period

GET /indicator/by-location-date-period?location_id=<id>&start_date=<date>&end_date=<date>&period=<period>
Parameter Type Description
location_id integer Location ID
start_date date Start date (YYYY-MM-DD)
end_date date End date (YYYY-MM-DD)
period string Period type: monthly, yearly, etc.

Response:

[
  {
    "id": 1,
    "indicator_id": 2,
    "indicator_name": "consecutive_rainy_days",
    "indicator_short_name": "crd",
    "indicator_unit": "days",
    "location_id": 10,
    "location_name": "Palmira",
    "value": 5.0,
    "period": "monthly",
    "start_date": "2024-01-01T00:00:00Z",
    "end_date": "2024-01-31T00:00:00Z"
  }
]

Min/Max by location

GET /indicator/minmax-by-location?location_id=<id>