Reference · built on requestCommons signalTransit, roads & mobility

DB API Marketplace

Planned and changed train arrivals and departures per German station from the Deutsche Bahn Timetables API, plus StaDa station data.

About

Deutsche Bahn publishes its APIs on the DB API Marketplace at developers.deutschebahn.com. The Timetables product serves platform-display data for stations operated by DB Station&Service AG: an hourly slice of the planned timetable, the full set of known changes, and the changes of the last two minutes. StaDa - Station Data adds parking, accessibility, and opening hours per station. Shared Mobility GBFS lists DB Connect bike-sharing stations in GBFS 2.3.

On Fibric, an operator reads the changes for the stations your guests, staff, or shuttles depend on and proposes a shuttle shift, an arrival-time update, or a staffing change for your approval.

This is a reference listing. It documents what Fibric would read from DB API Marketplace and what it could propose, based on the publisher's published interfaces. Fibric builds it under a managed deployment when you request it; selecting it here installs nothing.

Inputs

  • GET /plan/{evaNo}/{date}/{hour}: the planned timetable slice for one station, date as YYMMDD and hour as HH, returned as XML
  • GET /fchg/{evaNo}: all known changes for a station, including changed time, platform, status and path, refreshed every 30 seconds
  • GET /rchg/{evaNo}: only the changes that became known in the last 2 minutes, a subset of the full changes
  • GET /station/{pattern}: station lookup by name prefix, EVA number, DS100/RL100 code, or wildcard
  • StaDa - Station Data: GET /stations and GET /stations/{id} for parking, accessibility, and opening hours; GET /szentralen for the 3-S-Zentralen
  • Shared Mobility GBFS: station geolocations and available bikes, with pedelec battery levels where present, in GBFS version 2.3

Proposed actions

Read-only. This feed informs operators; it changes nothing.

Proposed actions are target capabilities. Every action runs propose-first and needs a validated deployment and the appropriate permissions.

What you can build

  • Move the hotel shuttle when the train is late

    Watch the changes for the station your shuttle serves. When the arrival your guests are on slips past your threshold, the operator proposes a new shuttle departure and records the changed time it acted on.

    With Shuttle Timing

  • Reset room readiness to the real arrival

    Match arriving guests to their train and read the changed arrival time. The operator proposes a later room-ready target and a note to the front desk.

    With Arrival Prep

  • Rebalance the shift when the line stops

    Read the full changes for the stations your staff commute through. When cancellations cluster before a shift start, the operator proposes an intraday cover plan for your approval.

    With Intraday Balance

Requirements

  • A DB Kundenkonto and a marketplace app created under Apps, whose secret key is shown once at creation
  • A subscription to the Free plan of each product you call: Timetables, StaDa, or Shared Mobility GBFS
  • The EVA numbers of the stations you watch, found through GET /station/{pattern}
  • An XML parser for Timetables responses; the base URL is apis.deutschebahn.com/db-api-marketplace/apis/timetables/v1
Authentication
A free DB API Marketplace app registered with a DB Kundenkonto, sending its client id in the DB-Client-ID header and its secret in the DB-Api-Key header.

Limits

  • The Timetables Free plan allows 60 calls per minute, runs 24/7, and carries no service window
  • StaDa is static data: the terms allow one call per API key per day, and each application and customer needs its own key
  • Planned data is generated hours in advance and never changes; changes are only delivered for the future, and drop out once the trip has departed
  • The marketplace pages, terms, and plan descriptions are in German

Access and pricing

Reference listing. Public feed access is separate from Fibric integration. If you request this feed, your quote covers the build, usage, and support.

Request DB API Marketplace ↗

Questions and answers

How do the plan, fchg, and rchg resources fit together?
plan returns the static hourly slice of the planned timetable. fchg returns every known change for the station from now on. rchg returns only changes that became known in the last 2 minutes. The spec advises loading full changes once, then polling recent changes to save bandwidth.
What does the Free plan cost and allow?
Nothing. The Timetables Free plan is described as free use, 24/7 operation, no service time, and 60 calls per minute. StaDa's Free4All plan allows 10 calls per second but the terms restrict each key to one call per day because the data is static.
Under which licence is the data published?
Timetables and StaDa data are published under Creative Commons Attribution 4.0 International (CC BY 4.0). If the data becomes part of the OpenStreetMap database, naming Deutsche Bahn AG in the contributor list is enough. Shared Mobility GBFS follows separate DB Connect service terms that require logos and the app deeplink.
Ask about DB API Marketplace

Ask about the capabilities and requirements in this listing.

For project-specific requirements, contact Fibric.