Transport for Germany

API

Deutsche Bahn's official API for train schedules and transportation data

Visit Website

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)

script.js JS

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

SNCF Open Data API Search Google
Transport for London (TfL) API Search Google
Eurostar API Search Google

People Also Ask about Transport for Germany

Transport for Germany vs SNCF Open Data APITransport for Germany vs Transport for London (TfL) APITransport for Germany vs Eurostar API Transport for Germany 2025 review

Tool Info

Pricing Free
Category Transportation
Platform Public API

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

More Transportation Tools