DMI Open Data consists of a number of API services. Each service exposes a dataset through a REST API.
Some APIs serve data as JSON and some serve JSON that provides download links for binary data files:
JSON serving APIs (using the OGC API - Features API standard):
APIs providing download links to binary data (using the STAC API standard):
JSON serving APIs (using the OGC API - EDR API standard):
See the page for each API for details about its use.
Forecast data can be accessed through two different services - Forecast Data STAC-API and Forecast Data EDR API. The data is exactly the same but the STAC-API is for downloading the forecast files and parsing them yourself and the EDR API is for getting smaller parts (by time or number of parameters) of the forecast.
Because the APIs use open standards it is possible to use the APIs with clients that support these standards. One such example is QGIS as shown on the OGC API-Features Import page.
Each API requires its own api-key when calling it. To get an api-key subscribe to the API using the guide at Authentication.
The API key should then be attached to each API request either using by using the api-key query parameter or using the X-Gravitee-Api-Key HTTP Header.
Example with query parameter:
https://dmigw.govcloud.dk/v2/metObs/collections/observation/items?api-key=INSERT_YOUR_API_KEY_HERE
Example with HTTP Header:
https://dmigw.govcloud.dk/v2/metObs/collections/observation/items
X-Gravitee-Api-Key: INSERT_YOUR_API_KEY_HERE
There is a fair use limit to allow only 500 requests per 5 seconds. If more requests are received a HTTP 429 error is returned. We continuously monitor the use of the API’s and will adjust this limit to ensure, that all users have fair access.
For all APIs except forecast EDR API the limit and offset parameters can be used to page through the result set - page size is set by the limit parameter.
The default limit is 1000 and you should actively adjust it if you need more or less data.
If datasets larger than maximum limit plus maximum offset are required then data should be retrieved using the bulk download service or by splitting requests by the datetime parameter.
This is a "maximum" and the result size could be less than what is requested.
This will only work up to the maximum possible offset - this is 500.000.
Time fields are in RFC3339 format. Example: 2023-10-25T15:10:00Z
Usually the timezone is UTC but in climadata API there are exceptions due to the nature of the source data being in local timezones.
All services return GeoJSON response objects as data objects in the REST interface. The STAC APIs also have endpoints for downloading the binary files and the EDR API also supports CoverageJSON.
All APIs document their interface in an OpenAPI specification and is browsable (and callable) through a Swagger client. See the individual API's documentation for a link to the Swagger client for the given API.
The OpenAPI document itself can be retrieved directly by requesting /api and setting the HTTP Accept Header to "application/json". Example:
curl -H "Accept: application/json" "https://dmigw.govcloud.dk/v2/climateData/api"
If the Accept header is not set, the API will redirect to Swagger.