Transport for Germany
APIDeutsche Bahn's official API for train schedules and transportation data
Overview
This official API from Deutsche Bahn provides access to real-time train schedules, route planning, station details, and fare information. Key endpoints include /stations (search by name/code), /journeys (route calculation), /liveboard (arrival/departure data), and /vehicle (train status). Responses are primarily in JSON format. Use cases include building travel apps, integrating transit info into navigation tools, creating custom journey planners for commuters, or adding real-time updates to logistics systems for freight and passenger transit.
Example Integration (JavaScript)
fetch('http://data.deutschebahn.com/dataset/api-fahrplan')
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err)); Key Features
- RESTful API
- JSON Responses
- Real-time Train Data
- Station Search
- Route Planning
- Fare Information
Frequently Asked Questions
? Is Transport for Germany API free to use?
Yes, the API is free for non-commercial use, though registration for an API key is mandatory.
? Does it require an API Key?
Yes, you need to register on the Deutsche Bahn data portal to obtain a valid API key for accessing the endpoints.
? What is the response format?
The API primarily returns data in JSON format; some endpoints may also support XML upon request.
Top Alternatives
People Also Ask about Transport for Germany
Tool Info
Pros
- ⊕ Official Deutsche Bahn Data
- ⊕ Comprehensive Domestic Coverage
- ⊕ Real-time Updates
- ⊕ Well-documented Endpoints
Cons
- ⊖ Requires API Key Registration
- ⊖ Rate Limits Apply
- ⊖ Limited International Coverage
- ⊖ Some Endpoints Have Data Delays