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 [email protected] 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=<API-KEY> & 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=<API-KEY> & lang=en & id=200426002 & format=json
“’
Build on reliable and scalable technology
FAQ
Frequently Asked Questions
Some basic informations about API Store ®.
Operation and development of APIs are currently fully funded by company Apitalks and its usage is for free.
Yes, you can.
All important information such as time of last update, license and other information are in response of each API call.
In case of major update that would not be compatible with previous version of API, we keep for 30 days both versions so you will have enough time to transfer to new version. We will inform you about the changes in advance by e-mail.