Stable JSON access to current weather, 7-day forecast, reservoirs, AEMET alerts, lightning, wildfire risk, snow level and named storms. No API key to start, no signup, no card. The only condition: a visible link back to whataweather.com.
Eight REST resources covering the public data on WhatAWeather. All return JSON, all support CORS and all are server-cached.
Four snippets to get started. All calls are GET, no special headers.
Local newspapers, mountain blogs, internal civil protection dashboards, university hydrology simulators. If you integrate, drop us a line.
https://whataweather.com in the UI consuming the data.The WhatAWeather public API is a set of REST endpoints designed specifically for developers, news outlets and public services that need Spanish weather and hydrology data fast, reliably and free. Unlike commercial APIs, we do not require a key to start, do not limit use cases (including commercial ones), and we keep latency low thanks to an in-memory caching layer that refreshes data every 15 to 60 minutes depending on the upstream source.
The design is minimal yet complete. Each endpoint returns a stable JSON object with clearly typed fields (numbers, strings, ISO 8601 dates) and a common metadata block: when the data was generated, how long it will live in cache and what its original source is. The source may be a real provider (Open-Meteo for weather, MITECO for reservoirs, AEMET for alerts) or, for endpoints where no provider has a license that allows redistribution yet, a placeholder explicitly marked as such. The meta.source: "placeholder" mark lets you filter or label them in your UI.
URLs are readable and predictable. /api/v1/weather?city=madrid returns weather for Madrid; /api/v1/reservoirs/alcantara returns the Alcantara reservoir record; /api/v1/alerts?ccaa=valencia returns active AEMET alerts in the Valencian Community. We support queries by city name or lat/lon pair indistinctly, which simplifies integration with interactive maps and other geographic apps. CORS is open to *: you can call the API directly from the browser without a proxy.
If you prefer, we have also published an OpenAPI 3.0 specification at /api/openapi.json with all the schemas, parameters and examples. Generate clients in any language with openapi-generator, import it into Postman or Insomnia, or use Swagger UI to explore the endpoints visually. To visualise the output without writing code, our embeddable widgets consume exactly this API.