Click here for Swagger - Interactive API explorer
To execute calls the service input your api-key by clicking the "Authorize" button in Swagger
Example: https://dmigw.govcloud.dk/v2/climateData/collections/stationValue/items?api-key=<api-key>
Description: Will return up to 1000 (the default limit) stationValue data elements
Example: https://dmigw.govcloud.dk/v2/climateData/collections/station/items?api-key=<api-key>
Description: Will return up to 1000 (the default limit) stations
Example: https://dmigw.govcloud.dk/v2/climateData/collections/station/items?api-key=<api-key>
Description: Will return up to 1000 (the default limit) stations
The collection endpoints support a number of query parameters to filter or sort data. Make sure to read the query primer to make use of the below query parameters.
{
"type": "FeatureCollection",
"features": [
{
"geometry": {
"coordinates": [
12.6455,
55.614
],
"type": "Point"
},
"id": "00030893-5544-4655-a60c-0f49c58a0a99",
"type": "Feature",
"properties": {
"calculatedAt": "2023-10-26T09:05:16.147000+00:00",
"created": "2023-10-26T09:05:23.250959+00:00",
"from": "2023-10-26T08:00:00+00:00",
"parameterId": "mean_wind_dir",
"qcStatus": "none",
"stationId": "06180",
"timeResolution": "hour",
"to": "2023-10-26T09:00:00+00:00",
"validity": true,
"value": 55.0
}
}
],
"timeStamp": "2023-10-26T09:27:48Z",
"numberReturned": 1,
"links": [
{
"href": "https://dmigw.govcloud.dk/v2/climateData/collections/stationValue/items?sortorder=from,DESC&limit=1",
"rel": "self",
"type": "application/geo+json",
"title": "This document"
},
{
"href": "https://dmigw.govcloud.dk/v2/climateData/collections/stationValue/items?sortorder=from,DESC&limit=1&offset=1",
"rel": "next",
"type": "application/geo+json",
"title": "Next set of results"
}
]
}
Example: https://dmigw.govcloud.dk/v2/climateData/collections
Description: Will return all available collections in the API. Available collections:
limit |
Specify a maximum number of objects (e.g. station values) you want to be returned. If a limit is not specified, the default limit is 1000. If more than 300000 objects are needed then use either the offset to request the next set of observations or download the data. Please be advised that this is a "maximum" and the result size could be less than what is requested Max possible limit: 300000 is the maximum limit you can request Example: Returns a maximum of 100 objects |
offset |
Specify the number of objects that should be skipped before returning matching objects. Default: 0. Max possible offset: 500.000 Using the limit and the offset parameters, a client can page through the objects returned - page size is set by the limit parameter. This will only work up to the maximum possible offset. If datasets larger than maximum limit plus maximum offset are required then data should be retrieved using the download service or by splitting requests by the datetime parameter. Example: Returns a maximum of 100 objects skipping the first 1000 |
stationId |
Narrow the search to a specific station ID. Overview of stations can be found here Example: Returns station values for the station with the id "05185" |
datetime |
Narrow the search to a date range where both ends of the range are inclusive or a specific date. The range can be open on one side. If that is the case simply use ".." (double-dot) in stead of the an actual date for the open side. If only one date is supplied, then only exactly matching dates will be included. If both sides of the range are open, simply omit the datetime parameter. The plus sign "+" must be URL encoded: Danish summer time is UTC+2 (GMT+2) For the collections stationValue, municipalityValue, 10kmGridValue, 20kmGridValue and countryValue, it is the ‘from’ property being filtered by the datetime parameter. You can read more about how to deal with the status and the datetime parameter in the context of station here. Examples: Returns station values within the dates UTC 2018-02-12 at midnight and UTC 2018-03-18 at midnight. Both dates are inclusive.
Returns station values within the dates 2019-01-01 at midnight and 2020-01-01 at midnight in Danish summer timezone. Both dates are inclusive.
Returns station values from the date 2019-01-01 at midnight (Danish summer timezone) and after
Returns station values before or matching the date 2019-01-01 at midnight (Danish summer timezone).
Returns station values matching the date 2019-01-01 at midnight (Danish summer timezone)
Returns stations having the status "Active" at some time in the month of November 2020 (but not necessarily the whole month). |
bbox |
Narrow the search to only include objects within the specified bounding box. A bounding box (usually shortened to bbox) is an area defined by two longitudes and two latitudes, where:
They follow the standard format of: bbox = Southwesterly point (lon,lat) followed by northeasterly point (lon, lat) This bbox tool may be useful. Please use a decimal point as the decimal separator, e.g. 1.99 (and not 1,99) Examples: Returns station values within the bounding box having the Southwesterly point of 7.0, 54.0 and northeasterly point of 16.0, 58.0 (which basically covers the area of Denmark)
Returns station values within the bounding box having the Southwesterly point of 8.351697,55.421038 and northeasterly point of 8.542584,55.511345 (which basically covers the area of the city of Esbjerg in Denmark) |
bbox-crs |
Specifies the coordinate reference system of the bbox parameter. This service only support the CRS84 coordinate reference system. Example: Returns station values within the bounding box having the Southwesterly point of 7.0, 54.0 and northeasterly point of 16.0, 58.0 (which basically covers the area of Denmark) using the CRS84 coordinate reference system |
parameterId |
Narrow the search to a specific parameter id. Overview of available parameters can be found here and here. Examples: Returns station values having the parameter ID "mean_temp" (Mean temperature)
Returns mean wind speed on country level. |
timeResolution |
Narrow the search to a specific time resolution Examples: Returns station values with hourly time resolution. Can also be day, month or year.
Returns municipality values with daily time resolution.
Returns municipality values with 10 years reference data for the 2011-2020 decade.
Returns station values with 30 years reference data for the period 1961-1990 and 1991-2020. |
sortorder |
Sorts returned objects. Asking for results to be sorted should only be done when it is needed - responses are generally faster when asking for results with no sorting. Can only be used for the observation collection Examples: Returns the response from station value sorted by the observed time in descending order
Returns the response from 10km grid values sorted by the observed time in descending order |
qcStatus |
Narrow the search to given qcStatus You can read more about climate data quality control here. See also validity below. Examples: Returns station values that have been manually quality controlled. Station values that have not been quality controlled (yet) will not be returned.
Returns only station values that have been manually quality controlled and are considered valid by DMI's climatologists. |
validity |
Narrow the search to given validity Validity is only used for climate data for Greenland. You can read more about climate data quality control for Greenland here and the validity property documented on this page. Examples: Returns only station values that are considered valid by DMI's climatologists.
Returns only station values that have been manually quality controlled and are considered valid by DMI's climatologists. |
status |
Narrow the search to only allow stations having a specific status Can only be used for the station collection Available status values can be found here You can read more about how to deal with the status and the datetime parameter in the context of stations here. Examples: Returns stations having the status "Active" on the second of November 2020 or after. This could also be considered "the list of all active stations" if the datetime parameter is set to the current date.
Returns stations having the status "Active" at some time. This means that this also returns stations that have been active at some earlier time but no longer are. Also see "validFrom" and "validTo" fields. |
municipalityId |
Narrows the search to a municipality Municipality id's without prefixed "0" can be found here Example: Returns municipality values identified by their municipality id's. The numbers must be a valid danish municipality number prefixed with "0", fx. "0147" for Frederiksberg, which municipality number is 147. |
cellId |
Narrows the search to a specific cellId The 10km cells are based on the Danish national grid (det danske kvadratnet), and so the 10km cell ID's follow this standard. While 20km cells are not part of this standard, they use the same convention, ex. "20km_102_75". Examples: Returns 10km grid values having cellId 10km_635_54
Returns 20km grid values having cellId 20km_612_68 |
Examples: Returns station values within the dates UTC 2018-02-12 at midnight and UTC 2018-03-18 at midnight (both dates are inclusive), and within the bounding box having the Southwesterly point of 7.0, 54.0 and northeasterly point of 16.0, 58.0 (which basically covers the area of Denmark), returning a maximum of a 100 objects skipping the first 1000.
Returns station values within the dates UTC 2018-02-12 at midnight and UTC 2018-03-18 at midnight (both dates are inclusive), and limited to the station having the id "06149" and the parameter having the id "mean_temp", returning a maximum of 20000 objects in total sorted by the "from" time in descending order
Returns stations having the type "Pluvio" and was "Active" sometime in the month of November 2020 (but not necessarily the whole month) and is within the bounding box having the Southwesterly point of 7.0, 54.0 and northeasterly point of 16.0, 58.0 (which basically covers the area of Denmark)
Returns mean_temperature values calculated over the 30 years period 1991-2020 for the months Januar-December, the seasons DecJanFeb, MarAprMay, JunJulAug and SepOctNov and the Annual average over 30 years giving a hit of 17 values.
Returns mean_temperature values calculated over the 10 years period, 1991-2020 for the municipality 0580, 'Abenraa', which can be found here: https://dmidk.github.io/Climate-Data-Grid-Map/ . |
The API is an OGC API - Features API and follows this standard as documented here: http://docs.opengeospatial.org/is/17-069r3/17-069r3.html.
Data is returned in a FeatureCollection object that describes the returned data-set. Data points are found in the features field which contains a number of Feature objects as described below.
Features are wrapped in a GeoJSON FeatureCollection, which include:
Key | Not null | Data Type | Description |
---|---|---|---|
type | yes | String | Always contain FeatureCollection |
timeStamp | yes | String | Timestamp when the response was generated. In RFC3339 5.6 format. |
numberReturned | yes | Number | Number of features returned |
links | yes | List of Link objects |
Links to pages;
|
Key | Not null | Type | Description |
---|---|---|---|
id | yes | String | Internal database ID |
type | yes | String | Always contain Feature |
geometry.coordinates.0 | yes | float | longitude |
geometry.coordinates.1 | yes | float | latitude |
This is a GeoJSON feature and the table below describes the returned data:
Key | Not null | Data Type | Description |
---|---|---|---|
properties.parameterId | yes | String | Parameter ID identifiying the parameter by a name |
properties.stationId | yes | String | Station ID of the station that collected the underlying observations |
properties.created | yes | String | An RFC3339 5.6 formatted string with the timestamp at which the value was created in the API. In case of duplicate station values (station values with the same station ID, from, to, parameterId and time resolution) the station value with the most recent created timestamp is the most up-to-date station value. |
properties.value | yes | Number | Calculated or aggregated value |
properties.from | yes | String | An RFC3339 5.6 formatted string with the start time of the time spanned by the station value |
properties.to | yes | String | An RFC3339 5.6 formatted string with the end time of the time spanned by the station value |
geometry | yes | Object | Position of the observation in GeoJSON format. Derived from the stations location |
properties.cloudCoverMethod | no | String | Only applicable to the "mean_cloud_cover" value of GRL data: whether the value has been observed manually or measured automatically |
properties.noValuesInCalculation | no | Number |
The number of values used to calculate the value of a station value. E.g. the number of hourly values used to calculate the corresponding daily value, or number of daily values used to calculate the corresponding monthly value. Will not be present for station values with timeResolution=hour, because they are not based on station values of a lower resolution. |
properties.qcStatus | yes | String | Whether a value has been quality controlled. Can assume values 'manual', when the value has been manually quality controlled by DMI's climatologists, or 'none' when no quality control has been performed (see also Climate Data). |
properties.timeResolution | yes | String | The type of timespan the station value represents. Will be one of "hour", "day", "month", "year" |
properties.normalOrReference | yes | String | Is either "Climate normal" or "Reference value" (see also Climate Data). |
properties.timePeriod | yes | String |
Only for "Climate normal" and "Reference value". Will be one of "January","February",...,"December", representing monthly average values "DecJanFeb" , "MarAprMay", "JunJulAug", "SepOctNov", representing seasonal average values "Annual", representing yearly average values |
properties.validity | yes | Boolean | Whether or not the value is considered valid by the climatologists. Invalid data is generally not correct |
properties.calculatedAt | yes | String | An RFC3339 5.6 formatted string with the timestamp at which the value was calculated by DMI |
This is a GeoJSON feature and the table below describes the returned data:
Key | Not null | Data Type | Description |
---|---|---|---|
properties.name | yes | String | Name of the station. See station list for a list of names |
properties.owner | yes | String | Owner of the station |
properties.type | yes | String | Station type. See here for available types |
properties.country | yes | String | Country code |
properties.regionId | no | String | Region id |
properties.stationId | yes | String | Station id |
properties.parameterId | yes | List<String> | List of parameterId's as defined in parameters list, which the station observes |
properties.status | yes | String | Indicated whether the station is active or inactive |
properties.wmoContryCode | no | String | WMO country code |
properties.wmoStationId | no | String | WMO station id |
properties.created | yes | String | Creation time in database (in RFC3339 5.6 format, e.g. "2020-07-10T07:59:38Z") |
properties.operationTo | no | String | Last date the station is operational in RFC3339 5.6 format. If station is currently operational this field is null |
properties.operationFrom | yes | String | First date the station is operational in RFC3339 5.6 format |
properties.updated | no | String | Last station update in RFC3339 5.6 format. Update may be new location, changes to instrument parameters etc |
properties.validTo | no | String | Last date the station sends valid data in RFC3339 5.6 format. For now this is the same as timeOperationEnd, but may change in future versions |
properties.validFrom | yes | String | First date the station sends valid data in RFC3339 5.6 format. For now this is the same as timeOperationStart, but may change in future versions |
geometry | yes | Object | Position of the station in GeoJSON format |
properties.barometerHeight | no | Number | The barometer's height above sea level in meters |
properties.stationHeight | no | Number | The station's height above sea level in meters |
This is a GeoJSON feature and the table below describes the returned data:
Key | Not null | Data Type | Description |
---|---|---|---|
properties.parameterId | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.created | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.value | yes | Number | Same as for stationValue - please see schema description for stationValue. |
properties.from | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.to | yes | String | Same as for stationValue - please see schema description for stationValue. |
geometry | yes | Object | A point representing the area. |
properties.qcStatus | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.timeResolution | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.calculatedAt | yes | String | Same as for stationValue - please see schema description for stationValue. |
This is a GeoJSON feature and the table below describes the returned data:
Key | Not null | Data Type | Description |
---|---|---|---|
properties.parameterId | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.created | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.value | yes | Number | Same as for stationValue - please see schema description for stationValue. |
properties.from | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.to | yes | String | Same as for stationValue - please see schema description for stationValue. |
geometry | yes | Object | A point representing the area. |
properties.qcStatus | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.timeResolution | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.normalOrReference | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.calculatedAt | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.municipalityId | yes | String | Id of the municipality that this value is for - see list of municipalities at https://danmarksadresser.dk/adressedata/kodelister/kommunekodeliste |
properties.municipalityName | yes | String | Name of the municipality that this value is for - see list of municipalities at https://danmarksadresser.dk/adressedata/kodelister/kommunekodeliste |
This is a GeoJSON feature and the table below describes the returned data:
Key | Not null | Data Type | Description |
---|---|---|---|
properties.parameterId | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.created | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.value | yes | Number | Same as for stationValue - please see schema description for stationValue. |
properties.from | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.to | yes | String | Same as for stationValue - please see schema description for stationValue. |
geometry | yes | Object | A polygon for the covered area. |
properties.qcStatus | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.timeResolution | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.calculatedAt | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.cellId | yes | String | Id of the grid cell. The naming follows the Danish "kvadratnet" system (https://da.wikipedia.org/wiki/Det_danske_Kvadratnet). Example: 10km_367_81. |
This is a GeoJSON feature and the table below describes the returned data:
Key | Not null | Data Type | Description |
---|---|---|---|
properties.parameterId | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.created | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.value | yes | Number | Same as for stationValue - please see schema description for stationValue. |
properties.from | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.to | yes | String | Same as for stationValue - please see schema description for stationValue. |
geometry | yes | Object | A polygon for the covered area. |
properties.qcStatus | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.timeResolution | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.calculatedAt | yes | String | Same as for stationValue - please see schema description for stationValue. |
properties.cellId | yes | String | Id of the grid cell. Because there is no 20km grid cell definition in the Danish "kvadratnet" system (https://da.wikipedia.org/wiki/Det_danske_Kvadratnet) it is not defined in this system. However the naming is in the same format. Example: 20km_612_66. |