canonical: https://jentic.com/apis/deutschebahn.com/deutschebahn

# Deutschebahn Timetables

The Deutsche Bahn Timetables API returns planned and changed train schedules for German rail stations. You resolve a station by a name pattern to get its EVA station number, pull the planned timetable for that station for a given date and hour, and read the full and recent change feeds that carry delays, platform changes, and cancellations. Combining the plan with the change feeds gives an up-to-date picture of departures and arrivals at a station.

## For AI agents

Resolve German rail stations by name, read Deutsche Bahn planned timetables by date and hour, and pull the full and recent change feeds for delays and cancellations. Covers station lookup and timetable data.

## Scope

Does not sell tickets, plan door-to-door journeys, or cover non-DB operators. Use for Deutsche Bahn station lookup and timetable data only.

## Capabilities

- Look up stations by a name pattern to find their EVA station numbers
- Fetch the planned timetable for a station for a given date and hour
- Get the full set of known changes for a station
- Get the recent changes for a station
- Combine planned and changed data for a current departures view

## Use cases

### Agent-Driven Departures Board

An AI agent builds a live departures view for a German station by resolving the station name to its EVA number, pulling the planned timetable for the current hour, and merging in the recent changes so delays and platform moves are reflected. A travel assistant can then answer 'when is the next train' with up-to-date times.

Example prompt: Resolve a station by name to its EVA number, fetch the planned timetable for the current hour, and apply the recent changes

### Station Resolution

Turn a free-text station name into the EVA station number the timetable endpoints require. A trip tool uses the station pattern search as its first step so later timetable calls always target a valid station.

Example prompt: Search stations matching a name pattern and return the EVA number of the best match

### Disruption Monitoring

Track delays and cancellations at a station by polling its full and recent change feeds. An operations dashboard can surface which trains are affected without re-reading the whole planned timetable each time.

Example prompt: Read the recent changes for a station and list the trains with delays or cancellations

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/station/{pattern}` | Search stations by name pattern |
| GET | `/plan/{evaNo}/{date}/{hour}` | Planned timetable for a station, date, and hour |
| GET | `/fchg/{evaNo}` | Full known changes for a station |
| GET | `/rchg/{evaNo}` | Recent changes for a station |

## Key resources

- **Stations** — Station search by name pattern, returning EVA station numbers
- **Planned Timetable** — The planned schedule for a station by date and hour
- **Changes** — Full and recent change feeds carrying delays, platform changes, and cancellations

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 56 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 67 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 35 / 100
  - Agent Usability: 94 / 100
  - Security: 50 / 100
  - AI Discoverability: 78 / 100
- **View full report:** https://jentic.com/apis/deutschebahn.com/deutschebahn/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** By hand you register on the DB API Marketplace, obtain both the DB-Api-Key and the DB-Client-Id, send them on every request, and resolve EVA station numbers before a timetable call works. Through Jentic you connect once from the API Directory and your agent calls the operations by intent.
- **Permission scoping:** All four operations are read-only GETs, so you choose exactly which your agent may call, such as station search and the timetable lookup while leaving out the change feeds. The EVA number travels in the URL path, so a rule can bind the agent to specific path operations.
- **Credential handling:** Your DB-Api-Key and DB-Client-Id are stored encrypted on your own Jentic One instance and injected into the request headers at execution time, never placed in the agent's prompt, logs, or context. You rotate them in one place.
- **Discovery method:** Agents search Jentic by intent such as 'planned timetable for a station' or 'find a station by name', and Jentic returns the matching Deutsche Bahn operation with its input schema so the agent calls the right endpoint without reading the reference docs.

## Related APIs

- **OpenCage Geocoding API** — Geocode a place to find the nearest rail station to search for.
- **HERE Maps** — Routing and maps for the walking and connecting legs around a DB rail trip.
- **TomTom Search API** — Search points of interest to anchor a rail query to a real destination.
- **Mapbox** — A general mapping and navigation platform for geospatial work beyond rail timetables.

## FAQ

### What authentication does the Deutsche Bahn Timetables API use?

It uses two apiKey headers together: a DB-Api-Key and a DB-Client-Id, both sent on every request through the DB API Marketplace. When you connect it through Jentic, your own Jentic One instance stores both values encrypted and attaches them to each call for you.

### How do I get the EVA station number for a station?

Use the station search endpoint with a name pattern: it returns the matching stations and their EVA station numbers. You then pass that EVA number to the planned-timetable and change endpoints, which identify a station by its EVA number rather than its name.

### What are the rate limits for the Deutsche Bahn Timetables API?

The OpenAPI spec does not state rate limits, and quotas are managed through the DB API Marketplace. Check the official documentation at https://developers.deutschebahn.com/ for current limits before heavy polling.

### How do I read German train timetables through Jentic?

Add the Deutsche Bahn Timetables API from the Jentic API Directory and connect your DB-Api-Key and DB-Client-Id once. Your agent then searches by intent such as 'planned timetable for a station' and calls the matching operation. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Can I limit what my agent is allowed to do with the Deutsche Bahn API?

Yes. All four operations are read-only GETs, so you grant your agent only the ones it needs, such as station search and the timetable lookup while leaving out the change feeds. The EVA number sits in the URL path, so a rule can also pin the agent to specific path operations, and every call is logged.

### Is there a Deutsche Bahn timetable MCP server?

You don't need an MCP server to give your agent Deutsche Bahn timetables. Jentic connects it directly from the API Directory: import it, connect your keys once, and your agent can search stations and read timetables without another server loading tool definitions into its context.
