Traffic signs download API

API description

This API provides operations for the retrieval of traffic sign events. The API consists out of two services:

  1. A service to retrieve all traffic sign events in the system, per chunk of maximum 100 events.
  2. A service to retrieve the current state. The current state is updated every month.

API version

1.0.2

Change on 26-04-2021, to add “current-state” as endpoint.

1.0.1

Change on 09-12-2020, to add “town-code” as query parameter

Services

Service GET traffic signs events chunk

Summary

Retrieve a chunk of traffic sign events.

Description

This API endpoint provides a way to obtain all the published traffic sign events in chunks, which are specified by the limit and offset query parameters. The returned traffic sign events are ordered by their publication_timestamp, oldest first.
So, the publication_timestamp of the last received event can be used to obtain the subsequent chunk of events using the offset parameter. This provides an easy way of stopping the retrieval of traffic sign events and continuing it at a later point in time.

Because the publication_timestamp of events is potentially not unique, subsequent requests will include events of the given offset timestamp, to prevent potential events misses. Note that this will result in duplicate events being retrieved which nods to be handled at the client side properly.

HTTP methode

GET

URL

https://data.ndw.nu/api/rest/static-road-data/traffic-signs/v1/events

Query parameters

Fieldname Description Datatype with example

offset

Timestamp indicating the publication moment from which to retrieve the traffic sign events.
This operation will also include events with a matching publication_timestamp.
Required: false

Datetime:
Format:
yyyy-MM-ddTHH:mm:ss.SSSZ
Example:
2020-04-27T12:34:56.123Z
Default value:
1970-01-01T00:00:00.000Z

limit

Maximum number of traffic sign events returned (chunk size).
Must be inclusive between 1 and 100
Required: false

Integer
Example: 1
Default value: 100

town-code

Town code that can be used to limit the area from which traffic signs are returned.
Only traffic signs that have the exact matching town code will be returned. Also see: CBS Municipal Classifcation (Dutch)
Required: false

String
Format: GM0000
Example: GM0321
Default value: ''

Examples

GET https://data.ndw.nu/api/rest/static-road-data/traffic-signs/v1/events?offset= 2020-04-27T12:34:56.123Z&limit=100

GET https://data.ndw.nu/api/rest/static-road-data/traffic-signs/v1/events - dit zal de standaard queryparameterwaarden gebruiken

Response – 200 OK

Successfully retrieved the traffic sign events since and including the given offset timestamp maxed to given limit number. The returned traffic sign events are ordered by their publication_timestamp, oldest first.
The response body is in content-type application/json and is a JSON-array of below JSON object description.

Fieldname Description Datatype with example

id

Identifier uniquely indicating a traffic sign over events

Integer
23

type

Event type indicating the type of change on the traffic sign data

Type-field, possible values: created, updated, deleted

schema_version

Version indicator of the data schema applied to the event

<major>.<minor> e.g. 1.0

publication_timestamp

The moment the traffic sign event was published in UTC (ISO8601)

Datetime:
2020-04-27T12:34:56.123Z

validated

Indicator if the data is validated or not

Alphanumeric
n, j

validated_on

Date on which the data is validated

Date
01/12/2020

user_id

Installer/Maintainer ID

Integer
38

organisation_id

Installer/Maintainer organisation ID

Integer
143

rvv_code

Alphanumeric
A1, A1(Zone), A2

text_signs

Text from signs under the traffic sign

Array met Alphanumerice waardes
[“300m”, “8-19h”]

location.wgs84.latitude

Float
52.279

location.wgs84.longitude

Float
4.77898

location.rd.x

Float
113493

location.rd.y

Float
476951

location.placement

At the side of the road (L) or above the road (B)

Alphanumeric
L, B

location.side

Left or right when applicable for the road section, otherwise the compass of the traffic sign

Alphanumeric
L, R, N Z, O, W

location.road.name

Alphanumeric
Waterwolftunnel

location.road.type

Alphanumeric
1 (A-wegen) or 2 (N-wegen)

location.road.number

Integer
201

location.road.wvk_id

Road section ID

Integer
226354035

location.county.name

Alphanumeric
Aalsmeer

location.county.code

Alphanumeric
GM0358

location.county.townname

Alphanumeric
Aalsmeer

details.image

Link to the image of the traffic sign

Alphanumeric
https://...

details.first_seen

First time the traffic sign has been seen

Date
02/01/2020

details.last_seen

Last time the traffic sign has been seen so far

Date
03/01/2020

details.removed

Date when the traffic sign has been removed

Date
01/01/2020

Response – 400 Bad Request

The client sent a request that is not conforming to the specification.
The body of the response will hold information on the nature of the error.
Typically, this response is due to an error at the client side.
Error case examples:

  • offset parameter not conforming to the format
  • limit parameter not conforming the minimum or maximum size
  • town-code parameter is bigger then the desired format, example: GM12345 instead of GM1234

Response – 500 Internal Server Error

The request is not successfully processed due to a technical issue or constraint.
The body of the request may hold information on the nature of the error.

If you have any questions about this API and the use of it, you can contact the NDW servicedesk (mail@servicedeskndw.nu)
If you have any questions about the content of the downloaded files we would like to point you to the supllier of this data. The contact details can be found in Toelichting open data verkeersborden en FAQ (Dutch).

2- Service GET traffic signs current state

Description

Retrieve the newest current state of traffic signs. For every traffic sign the latest event is returned, except if the latest event has the event type 'deleted'.

The current state can be retrieved in two formats. By default the current state will be in JSON format. By setting the Accept header with “text/csv” or the content-type query parameter with “csv” onto the request, the current state will be returned in CSV format.

The current state is updated every month. Between every update the current state can be manually updated by using the “GET traffic signs events chunk” service.

HTTP methode

GET

URL

https://data.ndw.nu/api/rest/static-road-data/traffic-signs/v1/current-state

Query parameters

Veldnaam Beschrijving Datatype

town-code

Town code that can be used to limit the area to which the current state applies.
Only traffic signs that have the exact matching town code will be returned.
Also see: CBS Municipal Classification (Dutch)
Required: no

String
Format: GM0000
Example: GM0321
Default value: empty

rvv-code

RVV code that can be used to filter the current state based on the RVV code of the traffic signs.
All traffic signs that contain the given RVV code in (a part of) their RVV code will be returned.
Also see: Traffic rules and traffic signs regulations 1990 (RVV 1990) Appendix 1. Traffic signs (Dutch)
Required: no

String
Example: A1
Default value: empty
Maximum length: 50

road-section-ids

List of road section ids to filter on in the current state. The list has no limit for the amount of road section ids that can be put in. Road section ids are also known as 'NWB wegvakids' or 'wvk_id'.
Only traffic signs with a matching road section id will be returned.: https://nationaalwegenbestand.nl/documenten
- Download ‘Gebruikershandleiding_NWB_Wegen’
- Search for 'Wegvak-ID' for a Dutch explanation on road section ids
Required: no

String
Format: list of integers
Example: 234252051,234252052
Default value: empty

content-type

Fill with "csv" to receive the current-state in CSV format instead of JSON. Note the Accept header on the request can also be used for this with value "text/csv".
If left empty or with an incorrect value, the service will respond with the default JSON format.
Required: no

String
Example: csv
Default value: empty
Maximum length: 3

Exampleen

GET https://data.ndw.nu/api/rest/static-road-data/traffic-signs/v1/current-state?rvv-code=A1&town-code=GM0321
Retrieves the latest events of A1 traffic signs in the township 0321 in JSON format

GET https://data.ndw.nu/api/rest/static-road-data/traffic-signs/v1/current-state?rvv-code=A1&road-section-ids=234252051,234252052&content-type=csv
Retrieves the latest events of A1 traffic signs on the road sections from the roadsectionlist in CSV format

GET https://data.ndw.nu/api/rest/static-road-data/traffic-signs/v1/current-state?rvv-code=A1&town-code=GM0321 --header'Accept: text/csv'
Set the Accept header to retrieve the response in CSV format

GET https://data.ndw.nu/api/rest/static-road-data/traffic-signs/v1/current-state?rvv-code=A1&town-code=GM0321 --header'Accept-Encoding: gzip' --output current-state.gz
Set the Accept-Encoding header to save the response in zip format and point towards a location to save it.

GET https://data.ndw.nu/api/rest/static-road-data/traffic-signs/v1/current-state
This will use the default query parameter values

Response – 200 OK

Succesfully retrieved the current state of traffic signs.
The response body has content-type application/json and is a JSON-array of the JSON object description that can be found under “Request GET verkeersborden events blok - Response – 200 OK”.
If the content-type queryparamet is filled with “csv” or the Accept header is filled with “text-csv” the JSON will be flattened and returned in CSV format.

Response – 400 Bad Request

The client sent a request that is not conforming to the specification.
The body of the response will hold information on the nature of the error. Typically, this response is due to an error at the client side.
Error case examples:

  • town-code parameter exceeds character limit of 6 characters
  • rvv-code parameter exceeds character limit of 50 characters
  • road-section-ids parameter contains non numeric values
  • content-type parameter exceeds character limit of 3 characters

Response – 500 Internal Server Error

The request is not successfully processed due to a technical issue or constraint.
The body of the request may hold information on the nature of the error.

If you have any questions about this API and the use of it, you can contact the NDW servicedesk (mail@servicedeskndw.nu)
If you have any questions about the content of the downloaded files we would like to point you to the supllier of this data. The contact details can be found in Toelichting open data verkeersborden en FAQ (Dutch).