# KNMI Data Platform

KNMI puts its raw and processed data on one platform: 10-minute observations from all weather stations, radar images, HARMONIE weather forecasts, climate series and satellite data. On 16 October 2026 it held 449 datasets, most under CC BY 4.0. You fetch files (NetCDF, HDF5, GRIB) with the Open Data API; it needs a key, but KNMI publishes an anonymous key to try it out.

- Publisher: Koninklijk Nederlands Meteorologisch Instituut
- Area: Netherlands · Finest detail: file per time step (station or grid cell)
- Period: per dataset (10-minutenwaarnemingen vanaf 2012) · Refreshed: every minute
- Access: Free key · Licence: per dataset; 399 van de 449 CC BY 4.0, 15 gesloten
- Join keys: datasetnaam en versie, bestandsnaam (met tijdstip), stationsnummer
- Status: grijs · Open Data API: gedeelde quota van de anonieme sleutel op (429)
- URL: https://developer.dataplatform.knmi.nl/

## What can you do with it?
- **The weather ten minutes ago.** Every 10 minutes a NetCDF file is added with observations from all automatic stations, including the Caribbean Netherlands. The file for 15 October 2026, 22:30 UTC, was there at 22:33.
- **Count summer days.** For daily values KNMI's daily data service is simpler (no key). The chart on this page comes from there: summer days in De Bilt since 1901.
- **Rain radar of the last shower.** The radar datasets give a precipitation image of the Netherlands every 5 minutes (HDF5). Count how many millimetres fell over your neighbourhood.
- **Your own weather app on the forecast.** HARMONIE-AROME provides the KNMI forecast as GRIB files. With the Notification Service you hear when a new run is ready, instead of asking again and again.

## How to process it
1. **Request a key or use the anonymous one.** The developer page lists an anonymous key (valid until 1 August 2027), shared by everyone: 50 requests per minute, 3,000 per hour. Your own key gives 1,000 per hour for you alone.
   `https://developer.dataplatform.knmi.nl/open-data-api`
2. **List the files of a dataset.** Send the key in the Authorization header. maxKeys, orderBy=created and sorting=desc give the newest files; nextPageToken for the next page.
   `curl -H "Authorization: <sleutel>" "https://api.dataplatform.knmi.nl/open-data/v1/datasets/10-minute-in-situ-meteorological-observations/versions/1.0/files?maxKeys=2&orderBy=created&sorting=desc"`
3. **Download one file.** .../files/<filename>/url returns a temporary download link; fetch that afterwards without a key.
   `curl -H "Authorization: <sleutel>" "https://api.dataplatform.knmi.nl/open-data/v1/datasets/10-minute-in-situ-meteorological-observations/versions/1.0/files/KMDS__OPER_P___10M_OBS_L2_202610152230.nc/url"`
4. **Pick your dataset in the catalogue.** The catalogue on dataplatform.knmi.nl lists per dataset the licence, the period and which APIs exist (Open Data API, EDR, WMS, notifications).
   `https://dataplatform.knmi.nl/dataset`

## Interesting combinations
- How did the hottest day of the year unfold hour by hour? → [knmi-daggegevens](https://www.opendataindex.nl/en/bron/knmi-daggegevens.md) via stationsnummer (06260 in de 10-minutendata, 260 in de daggegevens). Find the day in the daily data and fetch the 10-minute files for that day.
- Smog when there is no wind? → [luchtmeetnet](https://www.opendataindex.nl/en/bron/luchtmeetnet.md) via tijd en plaats. Put the wind speed from the 10-minute observations next to the hourly nitrogen dioxide or particulate values of a nearby station.

## Similar sources
- [knmi-daggegevens](https://www.opendataindex.nl/en/bron/knmi-daggegevens.md): Daily values per station since 1901 with one simple call and no key. Enough for most weather questions.
- [era5](https://www.opendataindex.nl/en/bron/era5.md): Reanalysis of the weather worldwide per hour since 1940, on a grid of about 30 km.
- [knmi-aardbevingen](https://www.opendataindex.nl/en/bron/knmi-aardbevingen.md): Runs on the same server (api.dataplatform.knmi.nl), but the earthquake services need no key.

## What to watch out for
- **Key required, and the anonymous one is shared.** With the anonymous key we got a 200 and a 429 in turn on 16 October 2026 ("Rate Limit Exceeded": the shared quota was used up). For anything that runs regularly: request your own key.
- **EDR and WMS only with your own key.** The EDR API (CoverageJSON per point or area) and the WMS return 403 with the anonymous key: "Access to this API has been disallowed" (tested 16 October 2026).
- **Do not keep polling for new files.** KNMI calls repeated polling of the Open Data API for new files abuse. Use the Notification Service (MQTT) instead.
- **The catalogue API is closed to robots.** robots.txt of dataplatform.knmi.nl excludes /api/ (the CKAN catalogue), with Crawl-Delay 1. That is why we do not harvest the catalogue; the browse pages are allowed.
- **Not everything is open.** 15 datasets are closed, 17 fall under EUMETSAT terms and 5 under a non-commercial or no-derivatives licence. Check per dataset.

## API (REST (JSON, bestanden) + OGC EDR, WMS en MQTT)

- Base: https://api.dataplatform.knmi.nl/open-data/v1
- Access: Key in the Authorization header (without 'Bearer'). Without a key: HTTP 401 {"error": "Authorization field missing"} (tested). Three kinds: anonymous (published on the developer page, shared, valid until 1 August 2027), registered (free account in the Tyk portal) and bulk (by email to opendata@knmi.nl, one full dataset once). Open Data Index uses the anonymous key on the server only. (tested)
- Formats: json, netcdf, hdf5, grib, csv
- Size: 449 dataset versions in the catalogue sitemap (412 with an access page; 16 Oct 2026) (tested)
- Filtering: File level only: sort by name or time and pick a range with begin and end. To filter inside files use the EDR API.; 

### Endpoints
- `GET /datasets/{datasetName}/versions/{versionId}/files`: Files in a dataset, paginated (name, size, created, lastModified). Name and version are in the catalogue, Access tab.
- `GET /datasets/{datasetName}/versions/{versionId}/files/{filename}/url`: Temporary download link for one file (temporaryDownloadUrl); fetch it without a key.

### Parameters
- `maxKeys`: Files per page, default 10, max 1,000. (from the description)
- `orderBy`: Sort field, default filename. (from the description)
- `sorting`: Direction, default asc. orderBy=created&sorting=desc gives the newest file first. (from the description)
- `begin / end`: Range filter on the sort field: a filename with orderBy=filename, a timestamp with lastModified or created. (from the description)
- `nextPageToken`: Next page; returned while isTruncated is true. (from the description)
- `startAfterFilename`: Deprecated; cannot be combined with orderBy, begin, end or sorting. (from the description)

### Fields in the response (per the OpenAPI) (7)
`files[].filename` tekst, `files[].size` integer, `files[].created` datetime, `files[].lastModified` datetime, `isTruncated` boolean, `resultCount / maxResults` integer, `temporaryDownloadUrl` url

### Limits and pitfalls
- Anonymous key: 50 requests per minute and 3,000 per hour, shared by all anonymous users. Registered: 200 per second and 1,000 per hour for you alone. Bulk: 100 per second, once as many as the dataset has files. (from the description)
- The shared anonymous quota is often exhausted: we got HTTP 429 after two calls. Request your own key for anything serious. (experience)
- Pages of at most 1,000 files (maxKeys). (from the description)
- KNMI calls polling for new files abuse. Use the Notification Service (MQTT on mqtt.dataplatform.knmi.nl:443, topic dataplatform/file/v1/<dataset>/<version>/created); it needs a registered key as password. (from the description)
- A header X-KNMI-Deprecation in the response announces that a dataset or API version will be retired. (from the description)
- The catalogue itself is CKAN on dataplatform.knmi.nl, but robots.txt forbids /api/ there. Pick datasets on the website (the Access tab gives the right name and version) or via the sitemap. (tested)
- The EDR API returned HTTP 403 with the anonymous Open Data key: request a key for it in the API catalogue. (experience)
- Files are mostly NetCDF or HDF5 (radar, models); read them with xarray or netCDF4. For daily values per station, KNMI daily data is much simpler. (experience)

### Example
```
https://api.dataplatform.knmi.nl/open-data/v1/datasets/10-minute-in-situ-meteorological-observations/versions/1.0/files?maxKeys=3&orderBy=created&sorting=desc
```

## How to fetch it

### curl
```bash
curl -H "Authorization: <sleutel>" "https://api.dataplatform.knmi.nl/open-data/v1/datasets/10-minute-in-situ-meteorological-observations/versions/1.0/files?maxKeys=1&orderBy=created&sorting=desc"
```

### python
```python
import requests

SLEUTEL = "<anonieme of eigen sleutel van developer.dataplatform.knmi.nl>"
basis = "https://api.dataplatform.knmi.nl/open-data/v1/datasets/10-minute-in-situ-meteorological-observations/versions/1.0/files"
kop = {"Authorization": SLEUTEL}
nieuwste = requests.get(basis, headers=kop, params={"maxKeys": 1, "orderBy": "created", "sorting": "desc"}).json()["files"][0]
link = requests.get(f"{basis}/{nieuwste['filename']}/url", headers=kop).json()["temporaryDownloadUrl"]
open(nieuwste["filename"], "wb").write(requests.get(link).content)
```

## What you can build with it
- [Weather app for your own place: warmer, wetter or sunnier than normal?](https://www.opendataindex.nl/en/bouwen/lokale-weer-app.md): A small app that picks the nearest KNMI station and tells you how the latest day compares with the same time of year in 1991-2020: in degrees, millimetres and hours of sunshine, and as a percentile.


## Examples with real figures (1)

For each example the finding, the reference date and the call that fetches exactly these figures.

- **Summer days (25 °C or warmer) in De Bilt (KNMI measurements): an average of 29 days a year in 1996–2025, 87% more than in 1901–1930** (2025). Table daggegevens. [Example](https://www.opendataindex.nl/en/voorbeeld/knmi-zomerse-dagen-de-bilt)
  - `curl -d "stns=260&vars=TX&start=19010101&end=20251231&fmt=json" https://www.daggegevens.knmi.nl/klimatologie/daggegevens`
