For Agents
Look up Deutsche Bahn stations, retrieve live departure and arrival boards, and fetch detail for a specific train journey across Germany's rail network.
Get started with DB Fahrplan API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"next train departures from a German station"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with DB Fahrplan API API.
Resolve a free-text station name to a structured DB station record with coordinates
Pull the live departure board for a station with platform and delay information
Pull the live arrival board for a station with origin and arrival-time data
Fetch the detailed stop list for a specific train journey between two stations
GET STARTED
Use for: Find the DB station id for 'Berlin Hauptbahnhof', List the next departures from Munich main station, Show me arrivals into Frankfurt Hbf in the next hour, Get the stop list for a specific ICE journey
Not supported: Does not sell tickets, calculate fares, or book reservations — use for German rail station, departure-board, arrival-board, and journey-detail lookups only.
Jentic publishes the only available OpenAPI document for DB Fahrplan API, keeping it validated and agent-ready.
Jentic publishes the only available OpenAPI specification for DB Fahrplan API, keeping it validated and agent-ready. Deutsche Bahn's Fahrplan (timetable) API exposes train and station data for Germany and connecting European routes. The four endpoints cover station search by name, departure and arrival boards for a station, and detail lookups for a specific journey leg. It is the canonical agent-readable view of DB schedule data and is suitable for travel-assistance, journey-planning, and station-monitor use cases.
Build journey-planning prompts that resolve a station name and immediately read its board
Patterns agents use DB Fahrplan API API for, with concrete tasks.
★ Live Station Departure Board
Render an up-to-date list of trains leaving a German station, including platform, scheduled time, and any delay. GET /departureBoard takes a station id resolved from /location.name and returns a structured board that an agent can summarise back to a traveller in plain language.
Resolve 'Berlin Hbf' via GET /location.name, then call GET /departureBoard for that station id and return the next 10 departures with platform and delay.
Arrival Tracking for Pickups
Track when a train will arrive at a station so a connecting traveller or a meet-and-greet agent knows when to be there. GET /arrivalBoard returns the inbound board for a station with origin and live arrival time, suitable for a station-monitor display or a notification flow.
Call GET /arrivalBoard for station 8011160 (Berlin Hbf) and return arrivals from origin 'Hamburg Hbf' in the next hour.
Journey Detail Drill-Down
Expand a single departure into its full stop list to show a traveller every station on the line, the dwell times, and the platform at each stop. GET /journeyDetail accepts the journey reference returned from a board and returns the complete leg, which is the canonical input for an itinerary-rendering agent.
After picking a departure, call GET /journeyDetail with that journey reference and return the ordered list of stations and platforms for the trip.
AI Agent Travel Assistant
Let a Jentic-orchestrated travel agent answer 'when is the next train' questions about German rail without holding the DB API key. The agent resolves the station name, reads the board, and returns a natural-language summary, all without seeing the raw authKey query parameter.
Search Jentic for 'next train departures from a German station', load the GET /departureBoard schema, and execute it for 'Frankfurt Hbf' returning the next 5 departures.
4 endpoints — jentic publishes the only available openapi specification for db fahrplan api, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/location.name
Resolve a station name to a station id and coordinates
/departureBoard
Live departures for a station
/arrivalBoard
Live arrivals for a station
/journeyDetail
Full stop list for a specific journey
/location.name
Resolve a station name to a station id and coordinates
/departureBoard
Live departures for a station
/arrivalBoard
Live arrivals for a station
/journeyDetail
Full stop list for a specific journey
Three things that make agents converge on Jentic-routed access.
Credential isolation
The DB authKey is stored encrypted in the Jentic vault (MAXsystem). Agents receive a scoped execution token; the authKey query parameter is appended at execution time so the raw key never appears in agent prompts or URL logs.
Intent-based discovery
Agents search Jentic with intents such as 'next train departures from a German station' and receive the GET /departureBoard operation paired with GET /location.name for station resolution, with full input schemas.
Time to first call
Direct DB Fahrplan integration: 1-2 days to handle station resolution, the XML-style response shape, and authKey rotation. Through Jentic: under 1 hour — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
Transit App API
Multi-modal public-transit data covering many cities globally.
Pick Transit when the agent needs cross-city public-transport coverage rather than only DB rail in Germany.
Navitia API
Open-data multi-modal journey-planning API covering European networks.
Choose Navitia when full origin-to-destination journey planning across operators is required, beyond what the DB board endpoints provide.
Transport for London Unified API
London transit data with similar station, board, and journey concepts.
Pair with DB when a travel agent needs both German rail and London transit in the same itinerary.
Specific to using DB Fahrplan API API through Jentic.
Why is there no official OpenAPI spec for DB Fahrplan API?
Deutsche Bahn publishes the Fahrplan API documentation on developer pages and a SwaggerHub mirror but does not maintain a canonical OpenAPI document on its own developer site. Jentic generates and maintains this spec so AI agents and developers can call DB Fahrplan API via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the DB Fahrplan API use?
The Fahrplan API authenticates with an authKey query parameter on every request. Through Jentic the authKey is held in the vault and appended at execution time so the agent never sees the raw key in URLs or logs.
Can I plan a multi-leg journey with this API?
The four endpoints in this spec do not include a journey-planner that takes an origin and destination and returns a routed trip. Use GET /location.name to resolve stations and GET /departureBoard plus GET /journeyDetail to assemble a leg. For full route planning, combine with a routing API.
What are the rate limits for the DB Fahrplan API?
Deutsche Bahn does not document a single rate-limit value in this spec; access is governed per developer key. Plan for throttling, cache board results that change at most once per minute, and back off on 429 responses.
How do I look up the next train from a station through Jentic?
Run pip install jentic and search for 'next train departures from a German station'. Jentic returns the GET /departureBoard operation; resolve the station id first with GET /location.name and then load and execute the board schema with that id.
Does this API cover regional and S-Bahn services?
The Fahrplan dataset includes long-distance, regional, and many S-Bahn services that DB operates, returned through the same departure and arrival boards. Operator coverage outside DB depends on the agreements behind the dataset and is not guaranteed for every regional network.