Pollen data API in Madrid
PolenMadrid provides a REST API to query pollen levels, historical data, stations and pollen types in JSON format.
Authentication
All requests require an access token. Send the token in the Authorization: Bearer <token> header or as a ?token=<token> query parameter.
The ?token= parameter still works, but we recommend the Authorization header: a URL containing the token may end up in server, proxy and browser history logs. Responses to requests using ?token= include a Deprecation header.
To request API access, contact [email protected].
Available endpoints
| Endpoint | Parameters | Description |
|---|---|---|
GET /api/niveles | fecha, estacion, tipo | Current pollen levels by station and type. |
GET /api/historico | estacion, tipo, desde, hasta, page, per_page | Historical data with pagination. |
GET /api/estaciones | — | List of stations with current level. |
GET /api/estaciones/{code} | — | Station detail. |
GET /api/tipos | — | List of pollen types with current level. |
GET /api/tipos/{code} | — | Pollen type detail. |
GET /api/estadisticas | estacion, tipo, agrupacion, desde, hasta | Aggregated statistics (daily, weekly, monthly, yearly). |
Usage example
curl -H "Authorization: Bearer YOUR_TOKEN" https://polenmadrid.com/api/niveles curl "https://polenmadrid.com/api/niveles?token=YOUR_TOKEN" Rate limit
Maximum 60 requests per minute per IP. The X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers indicate the limit status.
Heavy queries —without ?estacion= and spanning more than a year (or no range), or paging beyond the first 10,000 rows— also have a quota of 60 every 10 minutes per token, reported in the X-Heavy-Limit, X-Heavy-Remaining and X-Heavy-Reset headers. Cached responses do not count. For large downloads, request data per station or per year.
Response format
{
"ok": true,
"data": [...],
"meta": {
"total": 150,
"last_updated": "2026-02-18"
}
}