Ga naar hoofdinhoud

Open Source Register

KNMI-app - API specificatie

Koninklijk Nederlands Meteorologisch Instituut

Originele specificatie

API documentatie

KNMI OpenAPI specification (28.0.0)

Download OpenAPI specification:Download

KNMI OpenAPI specification

Get the current version number of the API.

Responses

Response samples

Content type
application/json
{
  • "name": "string"
}

postal-codes

Lookup a postal code

query Parameters
code
required
string [ 4 .. 7 ] characters ^[1-9][0-9]{3}( ?(?!SA|SD|SS)[A-Z]{2})?
Example: code=3731 GA

Retrieve information associated with a specific postal code. The postal code should be formatted as four digits, or as four digits, followed by a space and two letters in capitals.

Responses

Response samples

Content type
application/json
{
  • "name": "De Bilt",
  • "disambiguator": "Utrecht",
  • "postalCode": 3731,
  • "geoPoint": {
    }
}

alert

Get alert information

Responses

Response samples

Content type
application/json
{
  • "alertCount": 0,
  • "regionCount": 0,
  • "alerts": [
    ],
  • "weatherTypes": [
    ]
}

Get alert information

Responses

Response samples

Content type
application/json
{
  • "regions": [
    ],
  • "title": "Vandaag en morgen extreme hitte in het hele land",
  • "description": "Vandaag en morgen wordt het tropisch warm. Daarom is het Nationaal hitteplan (RIVM) van kracht. Vanaf vanmiddag tot morgen avond geldt code oranje voor zeer hoge temperaturen, met maximumtemperaturen van 38-39°C.\n",
  • "alerts": [
    ],
  • "advice": []
}

precipitation

Get precipitation radar information

Responses

Response samples

Content type
application/json
{
  • "time": "2024-02-14T07:19:00Z",
  • "frames": [
    ]
}

Get precipitation graph information

query Parameters
location
required
string

The location for which precipitation graph information is requested

time
required
string <date-time>

The date and time for which precipitation graph information is requested, which should be rounded to 5 minutes.

Responses

Response samples

Content type
application/json
{
  • "time": "2024-02-14T07:19:00Z",
  • "precipitation": {
    }
}

weather

Get precipitation radar information

Responses

Response samples

Content type
application/json
{
  • "time": "2024-02-14T07:19:00Z",
  • "frames": [
    ]
}

Get precipitation graph information

query Parameters
location
required
string

The location for which precipitation graph information is requested

time
required
string <date-time>

The date and time for which precipitation graph information is requested, which should be rounded to 5 minutes.

Responses

Response samples

Content type
application/json
{
  • "time": "2024-02-14T07:19:00Z",
  • "precipitation": {
    }
}

Get weather information

query Parameters
location
required
string

The location for which weather information is requested

region
integer

The region for which weather information is requested

Responses

Response samples

Content type
application/json
{
  • "backgrounds": [
    ],
  • "summaries": [
    ],
  • "alerts": [
    ],
  • "hourly": {
    },
  • "daily": {
    },
  • "sun": {
    },
  • "wind": {
    },
  • "uvIndex": {
    }
}

Get detailed weather information

query Parameters
location
required
string

The location for which weather information is requested

region
integer

The region for which weather information is requested

date
required
string <date-time>
Example: date=2024-02-14T00:00:00Z

The date for which weather information is requested

Responses

Response samples

Content type
application/json
{
  • "alerts": [
    ],
  • "hourly": {
    },
  • "daily": {
    },
  • "precipitationChance": {
    },
  • "sunshine": {
    },
  • "wind": {
    },
  • "climate": {
    },
  • "sun": {
    },
  • "uvIndex": {
    }
}

Get weather snapshot

query Parameters
location
required
string

The location for which weather information is requested

region
integer

The region for which weather information is requested

Responses

Response samples

Content type
application/json
{
  • "alertLevel": "red",
  • "temperature": 24,
  • "weatherType": 1372
}

seismic

Get seismic information

Responses

Response samples

Content type
application/json
{
  • "activities": [
    ]
}

measurements

Get wind speed measurements

query Parameters
unit
required
string (MeasurementUnit)
Enum: "beaufort" "kilometerPerHour" "degreeCelsius" "percentage"

The unit in which the measurements on the map and in the legend should be returned. Wind speed is measured in Beaufort.

Responses

Response samples

Content type
application/json
{
  • "time": "2024-02-14T07:19:00Z",
  • "legend": {
    },
  • "links": {
    }
}

Get wind gusts measurements

query Parameters
unit
required
string (MeasurementUnit)
Enum: "beaufort" "kilometerPerHour" "degreeCelsius" "percentage"

The unit in which the measurements on the map and in the legend should be returned. Wind gusts are measured in km/h.

Responses

Response samples

Content type
application/json
{
  • "time": "2024-02-14T07:19:00Z",
  • "legend": {
    },
  • "links": {
    }
}

Get temperature measurements

query Parameters
unit
required
string (MeasurementUnit)
Enum: "beaufort" "kilometerPerHour" "degreeCelsius" "percentage"

The unit in which the measurements on the map and in the legend should be returned. Temperature is measured in degrees Celcius.

Responses

Response samples

Content type
application/json
{
  • "time": "2024-02-14T07:19:00Z",
  • "legend": {
    },
  • "links": {
    }
}

Get relative humidity measurements

query Parameters
unit
required
string (MeasurementUnit)
Enum: "beaufort" "kilometerPerHour" "degreeCelsius" "percentage"

The unit in which the measurements on the map and in the legend should be returned. Relative humidity is measured in percentages.

Responses

Response samples

Content type
application/json
{
  • "time": "2024-02-14T07:19:00Z",
  • "legend": {
    },
  • "links": {
    }
}

subscribers

Subscribe for notifications

Allows users to subscribe for notifications.

path Parameters
subscriberId
required
string <uuid>

A unique user identifier, ideally a UUID >= v5

Request Body schema: application/json
deviceToken
required
string

The globally unique device token

deviceFamily
required
string (DeviceFamily)
Enum: "ios" "android"

Type of the device being subscribed (e.g., ios or android)

locale
string (Locale)

An identifier that represents the subscriber's language, in IETF BCP 47 format. This identifier typically consists of an ISO 639-1 alpha-2 code, followed by an underscore (_), followed by an ISO 3166-1 alpha-2 value. For example, the locale code for the Netherlands is nl_NL.

debug
boolean

When in debug the APNS mode will be set to sandbox (only available on non-prod envs)

Responses

Request samples

Content type
application/json
{
  • "deviceToken": "00fc13adff785122b4ad28809a3420982341241421348097878e577c991de8f0",
  • "deviceFamily": "ios",
  • "locale": "nl_NL",
  • "debug": true
}

Response samples

Content type
application/json
{
  • "status": 0,
  • "title": "string",
  • "correlationId": "string"
}

Unsubscribe from notifications

Allows users to unsubscribe from notifications.

path Parameters
subscriberId
required
string <uuid>

A unique user identifier, ideally a UUID >= v5

Responses

Response samples

Content type
application/json
{
  • "status": 0,
  • "title": "string",
  • "correlationId": "string"
}

Get notification settings

Retrieve the notification settings for a user.

path Parameters
subscriberId
required
string <uuid>

A unique user identifier, ideally a UUID >= v5

Responses

Response samples

Content type
application/json
{
  • "weather": {
    },
  • "seismic": {
    }
}

Update notification settings

Update the notification settings for a user.

path Parameters
subscriberId
required
string <uuid>

A unique user identifier, ideally a UUID >= v5

Request Body schema: application/json
required
object (WeatherNotificationSettings)
required
object (SeismicNotificationSettings)

Responses

Request samples

Content type
application/json
{
  • "weather": {
    },
  • "seismic": {
    }
}

Response samples

Content type
application/json
{
  • "weather": {
    },
  • "seismic": {
    }
}