dbris - Interface to bahn.de public transit routing service
dbris [-d DD.MM.YYYY] [-a|-t HH:MM] [...] from-stop [via-stop[:duration] [via-stop[:duration]]] to-stop
version 0.04
dbris is an interface to the public transport routing service available on bahn.de. It requests connections between from-stop and to-stop and prints the result. If one or two via-stops are specified, it only returns matching connections, with an optional minimum stopover duration given in minutes.
Request connections that arrive on or after HH:MM. Overrides --time.
Request connections for a specific day. Default: today.
Show intermediate stops rather than just start/end of connection legs.
Request first class offers. Only useful when combined with --passengers.
Show JourneyID for each connection segment. The JourneyID can be passed to dbris-m(1) to obtain details about the segment.
Print result(s) as JSON and exit. This is a dump of internal data structures and not guaranteed to remain stable between minor versions. Please use the Travel::Routing::DE::DBRIS(3pm) module if you need a proper API.
Tell bahn.de to provide messages in lang (ISO 639-1 language code). Known supported languages are: cs da de en es fr it nl pl. Default: de.
Only show connections with the specified modes of transit. Supported modes of transit are: ICE, EC_IC, IR, REGIONAL, SBAHN, BUS, SCHIFF, UBAHN, TRAM, ANRUFPFLICHTIG. Default: all modes.
By default, if the Cache::File module is available, server replies are cached
for 90 seconds in ~/.cache/Travel-Routing-DE-DBRIS (or a path relative to
$XDG_CACHE_HOME
, if set). Use this option to disable caching. You can use
--cache to re-enable it.
(EXPERIMENTAL) Request offers (e.g. local transit tickets, super saver tickets, flex tickets) and list their prices, terms, and conditions for each connection. Note that this option is still work-in-progress and may miss important details. Offers consisting of multiple components (e.g. "buy a BahnCard 25 and then buy a cheaper ticket for this connection") are not supported yet. See also --with-upsell-offers.
Use the specified passenger information to request ticket offers and show the corresponding price for each connection. type must be adult, junior, or senior. discounts can be one or more of bc25, bc50, bc100, bc25-first, bc50-first, bc100-first. See also --first-class.
Note that dbris only has access to a single offer per connection. It is typically the cheapest, but there is no information about what kind of ticket it is. Lack of a listed price either means that ticket offers are not available or (for bc100) that the connection does not require a ticket. There is no way to distinguish between these two cases. dbris does not guarantee accuracy of the provided information and must not be relied upon to determine whether a given connection is free or not.
Print unprocessed API response as JSON and exit. Useful for debugging and development purposes.
Request connections that depart on or after HH:MM. Default: now.
Include free-text messages related to delays, platform changes, and other quality of service issues or announcements.
Show version information and exit.
Include upsell offers such as "travel first class instead of second class". Must be used with -o / --with-offers.
0 upon success, 1 upon internal error, 2 upon backend error.
None.
Copyright (C) 2025 Birte Kristina Friesel <derf@finalrewind.org>
This program is licensed under the same terms as Perl itself.