Get started

Welcome to the information page of the KNMI Data Platform (KDP). On this page, you can find basic information on how to get started with the Developer Portal, and you can access data that we provide with our APIs.

Retrieve Data

Data provided by the KNMI Data Platform is accessible using API calls. To access the available data, make sure to follow the following steps:

  • Pick a dataset from the KDP Data Catalog .

  • Copy the API endpoint for the dataset from the Data Catalog from the page of a dataset using the copy button. file_copy .

  • Obtain an API key which authorizes requests to the API. See the Obtain an API key section for more information on what an API key is and how to obtain it.

  • Make an API call to retrieve a list of files. See the Make API calls section for more information on how to make API calls.

  • Make an API call to retrieve a specific file. See the Make API calls section for more information on how to make API calls.

Make API Calls

Currently, there are two API endpoints available:

  • List files in a dataset:
https://api.dataplatform.knmi.nl/open-data/v1/datasets/{datasetName}/versions/{versionId}/files
  • Get a download URL for a file in a dataset:
https://api.dataplatform.knmi.nl/open-data/v1/datasets/{datasetName}/versions/{versionId}/files/{filename}/url

The full documentation of these API endpoints can be found on the API Catalog page. To find the appropriate path parameters for a specific dataset (e.g. the values for {datasetName} and {versionId}), you can make use of the KDP Data Catalog .

Our API endpoints require authentication information that is present in the Authorization header of the HTTP request.

In the subsections below, we reference multiple example scripts that you can use to make API calls. Most examples make use of Actuele10mindataKNMIstations dataset, and are written for the command line or for use with Python 3.

For our API we use a versioning system, where the major version of the API can be found in the path.

As with any software, features naturally evolve over time. Sometimes these changes are so substantial that they may need to be removed. The key X-KNMI-Deprecationin the header of the response notifies the end of this feature, an old API version, or a dataset. This key is only present when the feature is announced for deprecation. Our deprecation policy will explain in further detail. An example script that shows how the use this deprecation header can be found here.

Command Line

Below are a few examples of using the API via a command line utility like curl:

Make sure you replace <API_KEY> with a valid API key. See the Obtain an API key section for information on how to obtain a public or personal API key.

Programming

If a programming language has an HTTP library available, it can be used to access the API. Below are a few examples of calling the API using Python 3:

Make sure you replace API_KEY with a valid API key. See the Obtain an API key section for information on how to obtain a public or personal API key.

Obtain an API Key

An API key grants access to an API. Within the KDP, we have two types of API keys: keys for anonymous, unregistered users and keys for registered users. We describe both key types and their advantages and disadvantages below.

Anonymous Keys

Anonymous keys provide unregistered access to Open Data. To ensure fair usage and to be able to scale the operation costs of the KDP, we limit the number of API calls in a period for API keys. The table below lists the rate limits and quotas for the anonymous keys. Note that you share these limits with all other active users of this anonymous API key.

Each anonymous has a limited lifespan, as indicated by its corresponding expiry date. We update this page once a key is about to expire. Keep an eye out for changes to this page.

Anonymous
Operational API Key Access Rate Limit Quota
Available till 1 July 2024
eyJvcmciOiI1ZTU1NGUxOTI3NGE5NjAwMDEyYTNlYjEiLCJpZCI6ImE1OGI5NGZmMDY5NDRhZDNhZjFkMDBmNDBmNTQyNjBkIiwiaCI6Im11cm11cjEyOCJ9
Open Data 50 requests per minute 3000 requests per hour

Registered Keys

Registered developers in our Developer Portal can request personal API keys. Use of personal API keys has a couple of advantages:

  • Personal API keys have no expiration date. Therefore, applications that use personal API keys are independent of the lifecycle of anonymous API keys.

  • You are the only one in possession of personal API keys associated with your account. Therefore, you do not share limits and quotas for each personal key with other developers.

To obtain a personal API key, follow these steps:

  • Create an account

  • Get an application key: The developer needs to request an API key from the developer portal for selected API from the API Catalog page. Registered API keys belong to your account and should be kept private. You can register for multiple APIs.

  • Check your own usage: You have your own developer dashboard. You can go to the developer dashboard, where you can view quotas and rate limits for all your API keys, including their usage within the last 7 days.

The table below describes the rate limits and quotas for different APIs.

Registered
Access Rate Limit Quota
Open Data API 200 requests per second 1000 requests per hour
EDR API 200 requests per second 1000 requests per hour
Customized user plan: contact us for a temporary personalized rate limit and quota

Complete Dataset Download

Downloading a complete dataset can take quite some time due to the rate limits and quotas associated with regular API keys. Therefore, we recommend you to contact us such that we can request a dedicated bulk-download API key for you account.

Specify the following information in your request:

  • Subject: KDP Complete Dataset Download.
  • Dataset name: <dataset name>

<dataset name> is the name of the dataset that you want to download. For example: EV24/2, where EV24 is the dataset name, and 2 is the dataset version.

A bulk-download API key comes with rate-limits and quotas tailored for the dataset you want to download. This makes it faster and easier to download a complete dataset.

You must use the same email address as the one used to register for our Developer Portal. We use the sender’s email address to request a new bulk-download API key for the Tyk Developer that is registered with that email.

If we approve your dataset download request, you receive a bulk-download API key for the requested dataset. In addition, we send an email on behalf of opendata@knmi.nl that we approved your key request. We send the key to the email you used to register you Tyk Developer account. If you can’t find the key in your inbox, make sure it is not marked as spam.

Because this new API key belongs to your registered account, you must be a registered Tyk Developer before we can request an API key for you.

There is an example Python 3 script that shows you how to download a complete dataset efficiently.

Tips and Tricks

Listing Files

Currently, it is not possible to order or filter the list of files in a dataset. Luckily, the naming convention of the files is predictable. Consequently, you can retrieve the list of files once to determine the naming convention, and then use this convention in your scripts to retrieve the files.

Questions?

If you have questions that are not answered here or have suggestions for missed features, contact us for more information.

Navigation