TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/elenacarino-max/mas-climapp/llms.txt
Use this file to discover all available pages before exploring further.
/api/clima endpoint queries the AEMET observation network for the weather station nearest to the supplied coordinates. Raw AEMET data is normalized into a consistent schema — field names are standardized, numeric types are enforced, and trace-precipitation values (ip) are converted to 0.0. Before the response is returned, the alert engine evaluates the record and appends a list of active alert codes. The record is also persisted automatically so it appears in historical queries.
Request
Latitude of the target location in decimal degrees. Example:
40.4168 for Madrid.Longitude of the target location in decimal degrees. Example:
-3.7038 for Madrid.Example request
Response
Success — 200 OK
Human-readable place name sourced from the AEMET
ubi field. Falls back to "Ubicación Detectada" when the field is absent.AEMET station name. Identical to
ciudad in the current normalization schema.Observation timestamp in ISO 8601 format as returned by AEMET (
fint field). Example: "2026-05-07T14:00:00".Air temperature in degrees Celsius, sourced from the AEMET
ta field.Relative humidity as a percentage (0–100), sourced from the AEMET
hr field.Wind speed in km/h, sourced from the AEMET
vv field.Atmospheric pressure in hPa, sourced from the AEMET
pres field.Precipitation in mm. Trace values (
ip) are normalized to 0.0, sourced from the AEMET prec field.List of active alert codes produced by the ClimApp alert engine. Returns
["VERDE"] when no thresholds are exceeded. Possible codes:| Code | Condition |
|---|---|
VERDE | No active alerts |
NARANJA_CALOR | Temperature ≥ 35 °C |
ROJA_CALOR | Temperature ≥ 40 °C |
NARANJA_FRIO | Temperature ≤ 0 °C |
ROJA_FRIO | Temperature ≤ −5 °C |
NARANJA_VIENTO | Wind speed > 40 km/h |
ROJA_VIENTO | Wind speed > 70 km/h |
NARANJA_LLUVIA | Precipitation > 10 mm |
ROJA_LLUVIA | Precipitation > 30 mm |
NARANJA_HUMEDAD | Relative humidity ≥ 90 % |
Data source identifier. Always
"aemet" for responses from this endpoint.Example response
Error responses
400 Bad Request — returned when lat or lon are missing from the query string.
500 Internal Server Error — returned when the AEMET connection fails or data cannot be normalized.