For Agents
Pull official Spanish weather observations, forecasts, climatology, fire risk, radar, and CAP warnings across 62 REST endpoints from the national met agency.
Get started with AEMET OpenData in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"get the weather forecast for a spanish municipality"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with AEMET OpenData API.
Retrieve current observations from AEMET's network of conventional weather stations
Pull municipal, provincial, regional, and national forecasts for today, tomorrow, and medium-range
Access maritime forecasts for coastal zones and high seas around the Iberian peninsula
Get mountain and snow-condition forecasts for ski and outdoor planning
GET STARTED
Use for: Get the weather forecast for Madrid for tomorrow, Retrieve current observations from a specific AEMET weather station, Find active CAP weather warnings for the Catalonia area, Pull the maritime forecast for the Balearic coastal zone
Not supported: Does not cover non-Spanish locations, commercial weather routing, or aviation METAR/TAF feeds — use for AEMET-published Spanish weather, climatology, and warnings only.
Jentic publishes the only available OpenAPI specification for AEMET OpenData, keeping it validated and agent-ready.
Jentic publishes the only available OpenAPI specification for AEMET OpenData, keeping it validated and agent-ready. AEMET OpenData is the open data REST API operated by Spain's national meteorological agency (Agencia Estatal de Meteorología). It exposes 62 endpoints covering current observations, short and medium-range forecasts at municipal, provincial, autonomous-community and national level, maritime and mountain forecasts, climatological products, fire-risk maps, lightning networks, radar imagery, and weather warnings. Authentication uses an api_key passed in the api_key header obtained free of charge from the AEMET portal.
Read CAP-formatted weather warnings and historical warning archives
Pull climatological products including monthly summaries, water balance, and station shapefiles
Access fire-risk maps, lightning network data, ozone profiles, and national radar imagery
Patterns agents use AEMET OpenData API for, with concrete tasks.
★ Spain-Specific Weather Application
Build a Spanish-language weather product using authoritative national-agency data instead of third-party aggregators. AEMET OpenData covers municipal forecasts via /api/prediccion/especifica/municipio/diaria/{municipio}, station-level observations via /api/observacion/convencional/datos/estacion/{idema}, and the master list of Spanish municipalities via /api/maestro/municipios. All responses are referenced to AEMET station identifiers and INE municipality codes.
Call GET /api/maestro/municipios to find the code for Sevilla, then call /api/prediccion/especifica/municipio/diaria/{municipio} to get the 7-day forecast
Emergency and Warning Monitoring
Subscribe to AEMET CAP warnings for civil-protection or operational alerting in Spain. The /api/avisos_cap/ultimoelaborado/area/{area} endpoint returns the most recent warning bundle for a meteorological area, while /api/avisos_cap/archivo/fechaini/{fechaIniStr}/fechafin/{fechaFinStr} returns historical warnings for incident review and audit trails. Pair with the radar and fire-risk endpoints for an operational picture during severe weather.
Call GET /api/avisos_cap/ultimoelaborado/area/61 to fetch the latest warnings for the Comunidad Valenciana area and parse the CAP XML for active alerts
Climatology and Research Datasets
Pull long-running climatological products for research, sustainability reporting, or insurance modelling. /api/productos/climatologicos/resumenclimatologico/nacional/{anio}/{mes} returns the national monthly summary, /api/productos/climatologicos/balancehidrico/{anio}/{decena} returns the water balance for a 10-day period, and the network endpoints expose ozone, radiation, and background-pollution series.
Call GET /api/productos/climatologicos/resumenclimatologico/nacional/2025/05 to retrieve the May 2025 national climatological summary
AI Agent Spanish Weather Tool
Equip an AI agent with authoritative Spanish weather data through Jentic. The agent searches by intent for the right AEMET endpoint — municipal forecast, station observation, or active warning — loads its schema, and executes with the api_key isolated in the Jentic vault. Useful for travel, logistics, or safety assistants whose users ask in Spanish or about Spanish locations.
Search Jentic for 'spanish municipal weather forecast', load /api/prediccion/especifica/municipio/diaria/{municipio} schema, and execute with municipio=28079 for Madrid
62 endpoints — jentic publishes the only available openapi specification for aemet opendata, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/api/prediccion/especifica/municipio/diaria/{municipio}
Daily forecast for a Spanish municipality
/api/observacion/convencional/datos/estacion/{idema}
Observations from a specific weather station
/api/avisos_cap/ultimoelaborado/area/{area}
Latest CAP weather warnings for an area
/api/prediccion/maritima/costera/costa/{costa}
Coastal maritime forecast
/api/maestro/municipios
List all supported Spanish municipalities
/api/productos/climatologicos/resumenclimatologico/nacional/{anio}/{mes}
National monthly climatological summary
/api/red/radar/nacional
Latest national radar imagery
/api/prediccion/especifica/municipio/diaria/{municipio}
Daily forecast for a Spanish municipality
/api/observacion/convencional/datos/estacion/{idema}
Observations from a specific weather station
/api/avisos_cap/ultimoelaborado/area/{area}
Latest CAP weather warnings for an area
/api/prediccion/maritima/costera/costa/{costa}
Coastal maritime forecast
/api/maestro/municipios
List all supported Spanish municipalities
Three things that make agents converge on Jentic-routed access.
Credential isolation
Your AEMET api_key is stored encrypted in the Jentic vault and injected as the api_key header at execution time, so agents never see the raw key.
Intent-based discovery
Agents search by intent (e.g. 'spanish municipal weather forecast') and Jentic narrows the 62 endpoints to the matching operation, surfacing the path parameters and codes the agent needs.
Time to first call
Direct AEMET integration: 1-2 days to navigate the Spanish documentation, two-step data-URL pattern, and area/municipality code mappings. Through Jentic: under an hour — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
OpenWeatherMap
Global weather and forecast API with broad coverage outside Spain
Choose OpenWeatherMap when you need worldwide coverage; choose AEMET when authoritative Spanish national-agency data is required
WeatherAPI.com
Commercial global weather and astronomy data API
Pick WeatherAPI for global coverage with a single key; pick AEMET for official Spain-specific forecasts and CAP warnings
Open-Meteo
Free, no-auth weather API combining multiple national models
Use Open-Meteo for free global access with no API key; use AEMET when you specifically need Spanish-government provenance and CAP warnings
Meteostat
Historical weather observations from stations worldwide
Use Meteostat for long historical series across countries; pair with AEMET for current Spanish observations and forecasts
Specific to using AEMET OpenData API through Jentic.
Why is there no official OpenAPI spec for AEMET OpenData?
AEMET does not publish a downloadable OpenAPI 3 specification — only an interactive Swagger UI. Jentic generates and maintains this spec so that AI agents and developers can call AEMET OpenData via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the AEMET OpenData API use?
AEMET uses an api_key passed in a header named api_key, obtained free of charge from https://opendata.aemet.es/centrodedescargas/altaUsuario after agreeing to the reuse conditions. Through Jentic the key is stored in the vault and injected at execution time.
Which Spanish locations does AEMET OpenData cover?
AEMET covers all Spanish municipalities (call GET /api/maestro/municipios for the master list using INE codes), every autonomous community and province for regional forecasts, the coastal areas and high seas around Iberia and the Canaries, and the conventional observation network for station-level data.
How do I get active weather warnings for a region in Spain?
Call GET /api/avisos_cap/ultimoelaborado/area/{area} with the AEMET area code; the response contains a CAP-formatted XML bundle of every active warning for that area. For historical review use /api/avisos_cap/archivo/fechaini/{fechaIniStr}/fechafin/{fechaFinStr} with date range parameters.
What are the rate limits for the AEMET OpenData API?
AEMET applies a per-key throttle but does not document a fixed quota in the spec; HTTP 429 responses are returned when the limit is exceeded. Jentic surfaces the 429 response so agents can back off and retry.
How do I retrieve a municipal forecast through Jentic?
Run pip install jentic, search Jentic with 'spanish municipal weather forecast', load the /api/prediccion/especifica/municipio/diaria/{municipio} schema, and execute with the 5-digit INE municipality code. Jentic returns the parsed forecast without exposing your api_key.
/api/productos/climatologicos/resumenclimatologico/nacional/{anio}/{mes}
National monthly climatological summary
/api/red/radar/nacional
Latest national radar imagery