Description
The Public Transport Administration offers you access to its OpenAPI for real-time departures.
Please contact opendata-api@verkeiersverbond.lu to get your personal key.
I) Public transport stops (rental.nearbystops)
(A) You must indicate the geographical coordinates x, y (in WGS84 system):
originCoordLat=
originCoordLong=
B) According to your needs, you may specify:
Maxno= max. number of returned stops
R= radius around coordinates (in metres)
Example query
“’
https://cdt.hafas.de/opendata/apiserver/location.nearbystops?accessId= & originCoordLong=6.09528 & originCoordLat=49.77723 & Maxno=5000 & r=100000 & format=json
“’
(Note: If you want to receive all existing stops use the values in the example)
II) Real-time departures (departureBoard)
Use the result above. This list tells you the identifier of each stop. You need this identifier to generate the real-time departures of the desired stop.
ID=
Example query
“’
https://cdt.hafas.de/opendata/apiserver/departureBoard?accessId= & lang=en & id=200426002 & format=json
“’
Resources
| Name | Format | Description | Link |
|---|---|---|---|
| departureBoard | XML | Open resource | |
| rental.nearbystops | XML | Open resource |