Plan a journey
db_journeysPlan train connections between any two stations using live Deutsche Bahn data. Get real-time departures/arrivals, delays, platforms, transfers, prices, occupancy, and amenities for each leg.
Instructions
Plan train connections between two stations with live bahn.de data.
Each connection: dep/arr (real-time; '(+7)' = 7 min late, '(+1d)' = next day), duration,
changes, price in EUR for the given travellers/BahnCard (None with Deutschlandticket), load
(occupancy) per class, recon_token (pass to db_journey_offers for Sparpreis/Flexpreis
breakdown), and per leg: line, platforms (real-time, with *_platform_changed), stops count,
amenities (WiFi, bike, step-free…), cancellations, journey_id (pass to db_trip_details),
and disruption notes. A journey flagged alternative is DB's re-route around a disruption.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| via | No | Optional intermediate station the route must pass through | |
| bike | No | Require bike carriage | |
| when | No | 'YYYY-MM-DD HH:MM' Europe/Berlin local time. Omit for now. No relative words. | |
| adults | No | ||
| format | No | 'text' = compact human table (best for chat); 'json' = structured | json |
| bahncard | No | '25', '50', '100', 'business25', 'business50', or None. Affects prices only. | |
| arrive_by | No | If true, `when` is the LATEST ARRIVAL time instead of earliest departure | |
| seat_only | No | Only trains where a seat reservation is possible | |
| to_station | Yes | Destination: station name, EVA number, or bahn.de id | |
| first_class | No | Price 1st class instead of 2nd | |
| max_results | No | ||
| from_station | Yes | Origin: station name, EVA number, or bahn.de id | |
| children_ages | No | Ages of accompanying children, e.g. [4, 9]. Affects prices. | |
| max_transfers | No | ||
| regional_only | No | Exclude ICE/IC/EC (Deutschlandticket-compatible trains) | |
| min_transfer_min | No | Minimum minutes for each change | |
| deutschlandticket | No | Only connections fully valid with the Deutschlandticket (implies regional_only, no price) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |