Description
The Public Transport Administration offers you access to its OpenAPI for real-time departures.
[API schema definition (XSD)](https://cdt.hafas.de/opendata/apiserver/)
**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 |
|
55 |
|
https://cdt.hafas.de/opendata/apiserver/location.nearbystops?wadl |
|
55 |
|
https://cdt.hafas.de/opendata/apiserver/departureBoard?wadl |
Tags
- depart
- arrets
- transport-public
- transport-mobilite
- api