Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.climatifai.com/llms.txt

Use this file to discover all available pages before exploring further.

The alerts system gives you a single query that simultaneously monitors eight critical agricultural zones across Latin America for four types of agroclimatic events: active fires, heat waves, drought, and heavy rainfall. Instead of polling each zone and event type separately, you send one GraphQL request and receive a consolidated, severity-ranked list of current conditions. The system runs all zone checks in parallel, so response time stays low regardless of the number of zones.

The eight monitored zones

The API monitors the following zones, which were chosen to cover the most agriculturally significant and climate-sensitive regions of LATAM (excluding Brazil):
#ZoneCountry/RegionCoordinates
1OrinoquíaColombia / Venezuelalat 6.5, lon −68.0
2ChacoParaguay / Argentinalat −22.0, lon −60.0
3BajíoMéxicolat 20.5, lon −101.0
4CentroaméricaGuatemala–Nicaragua corridorlat 14.0, lon −87.0
5Llanos OrientalesColombialat 4.0, lon −72.5
6Pampa HúmedaArgentinalat −34.0, lon −61.0
7Valle CentralChilelat −34.5, lon −71.0
8Sierra PeruanaPerulat −13.0, lon −75.0

Alert types and thresholds

Each zone is evaluated independently against the following rules. Alerts are only generated when a threshold is crossed.
Alert typeSeverityThresholdData source
firealta≥ 10 hotspots within 150 km in the last 48 hoursNASA FIRMS VIIRS_SNPP_NRT
firemedia3–9 hotspots within 150 km in the last 48 hoursNASA FIRMS VIIRS_SNPP_NRT
heataltaMaximum 2 m temperature ≥ 38 °C forecast in the next 72 hoursOpen-Meteo forecast
heatmediaMaximum 2 m temperature ≥ 34 °C forecast in the next 72 hoursOpen-Meteo forecast
droughtmedia0 mm precipitation forecast over 3 daysOpen-Meteo forecast
rainmedia≥ 50 mm total precipitation forecast over 72 hoursOpen-Meteo forecast
Severity levels are alta (highest), media, and baja. Currently, fire and heat events can reach alta; drought and rain alerts are capped at media unless the API is extended in a future release.

Querying alerts via GraphQL

The alerts feature is available exclusively through the GraphQL endpoint (/graphql). There is no REST equivalent.
1

Send the GraphQL query

Send the following query to the GraphQL endpoint. No variables are required — the zones are fixed server-side.
query GetAlerts {
  alerts {
    generatedAt
    zonesChecked
    alerts {
      region
      alertType
      severity
      title
      message
      generatedAt
    }
  }
}
Using curl:
curl -X POST "https://api.climatifai.com/graphql" \
  -H "Content-Type: application/json" \
  -d '{"query":"{ alerts { generatedAt zonesChecked alerts { region alertType severity title message generatedAt } } }"}'
A sample response when two alerts are active:
{
  "data": {
    "alerts": {
      "generatedAt": "2026-05-18T14:32:07.841Z",
      "zonesChecked": 8,
      "alerts": [
        {
          "region": "Chaco (Paraguay/Argentina)",
          "alertType": "fire",
          "severity": "alta",
          "title": "Incendios activos",
          "message": "12 focos de calor detectados en Chaco (Paraguay/Argentina) (últimas 48h, radio 150km). Riesgo crítico para cultivos y suelo.",
          "generatedAt": "2026-05-18T14:32:05.210Z"
        },
        {
          "region": "Bajío (México)",
          "alertType": "heat",
          "severity": "alta",
          "title": "Ola de calor",
          "message": "Temperatura máxima de 39.4°C prevista en Bajío (México) (próximas 72h). Adelanta riego y protege cultivos sensibles.",
          "generatedAt": "2026-05-18T14:32:06.003Z"
        },
        {
          "region": "Valle Central (Chile)",
          "alertType": "drought",
          "severity": "media",
          "title": "Déficit hídrico",
          "message": "Sin precipitación prevista en Valle Central (Chile) por 3 días. Activa riego si el cultivo está en etapa crítica.",
          "generatedAt": "2026-05-18T14:32:06.441Z"
        }
      ]
    }
  }
}
The alerts array is sorted by severity — alta first, then media, then baja — so the most critical conditions always appear at the top.
2

Filter by severity

The API returns all alerts for all zones in a single response. To focus on critical events only, filter the alerts array on the client side:
const critical = data.alerts.alerts.filter(a => a.severity === "alta");
If you want to send push notifications only for alta severity, apply this filter before dispatching.
3

Filter by alert type

To monitor only a specific hazard category — for example, fire events for a fire-insurance dashboard — filter by the alertType field:
// Fire events only
const fireAlerts = data.alerts.alerts.filter(a => a.alertType === "fire");

// Heat and drought together
const climateStress = data.alerts.alerts.filter(
  a => a.alertType === "heat" || a.alertType === "drought"
);
Valid alertType values: fire, heat, drought, rain.