NAME

dbris - Interface to bahn.de public transit routing service

SYNOPSIS

dbris [-d DD.MM.YYYY] [-t HH:MM] [...] from-stop [via-stop[:duration] [via-stop[:duration]]] to-stop

VERSION

version 0.03

DESCRIPTION

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.

OPTIONS

-d, --date dd.mm.[yyyy]

Request connections for a specific day. Default: today.

-f, --full-route

Show intermediate stops rather than just start/end of connection legs.

--first-class

Request first class offers. Only useful when combined with --passengers.

-j, --with-jid

Show JourneyID for each connection segment. The JourneyID can be passed to dbris-m(1) to obtain details about the segment.

--json

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.

-l, --language lang

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.

-m, --modes-of-transit mot1[,mot2,...]

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.

--no-cache

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.

-p, --passengers type[:discounts,...][;type[:discounts,...];...]

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.

--raw-json

Print unprocessed API response as JSON and exit. Useful for debugging and development purposes.

-t, --time HH:MM

Request connections on or after HH:MM. Default: now.

-v, --verbose

Include free-text messages related to delays, platform changes, and other quality of service issues or announcements.

-V, --version

Show version information and exit.

EXIT STATUS

0 upon success, 1 upon internal error, 2 upon backend error.

CONFIGURATION

None.

DEPENDENCIES

  • Class::Accessor(3pm)

  • DateTime(3pm)

  • LWP::UserAgent(3pm)

  • Travel::Routing::DE::DBRIS(3pm)

  • Travel::Status::DE::DBRIS(3pm)

BUGS AND LIMITATIONS

  • This module is very much work-in-progress

AUTHOR

Copyright (C) 2025 Birte Kristina Friesel <derf@finalrewind.org>

LICENSE

This program is licensed under the same terms as Perl itself.