efa - unofficial command line client


efa --from city stop --to city stop [ additional options ]
efa [ options ] from-city from-stop [ via-city via-stop ] to-city to-stop


version 2.05


efa is a command line client for the web interface. It sends the specified information to the online form and displays the results.

It should be noted that efa, although using the web interface of a local transport association, is able to look up connections all over Germany.


--from city stop

Departure place

--to city stop

Arrival place

--via city stop

Travel via this place

In case you want stop to be an address or "point of interest", you can set it to 'addr:something' or 'poi:something'.

-t|--time|--depart hh:mm

Journey start time

-a|--arrive hh:mm

Journey end time (overrides --time/--depart)


Journey date


Choose connections allowing to carry a bike

-e|--exclude transports

Exclude transports (comma separated list).

Possible transports: zug, s-bahn, u-bahn, stadtbahn, tram, stadtbus, regionalbus, schnellbus, seilbahn, schiff, ast, sonstige


Display duration, ticket class and price for each route (if available)


Display intermediate stops (with time and platform) of each train. Note that these are not always available.

-m|--max-change number

Print connections with at most number interchanges


Output links to maps of transfer paths and transfer stations where available.

-n|--num-connections number

Return up to number connections. If unset, the default of the respective EFA server is used (usually 4 or 5).

-P|--prefer type

Prefer connections of type:

* speed (default)

The faster, the better

* nowait

Prefer connections with less interchanges

* nowalk

Prefer connections with less walking (at interchanges)


Take stops close to the stop/start into account and possibly use them instead

-i|--include type

Include connections using trains of type type, where type may be:

* local (default)

only take local trains ("Verbund-/Nahverkehrslinien"). Slow, but the cheapest method if you're not travelling long distance

* ic

Local trains + IC

* ice

All trains (local + IC + ICE)

-w|--walk-speed speed

Set your walking speed to speed. Accepted values: normal (default), fast, slow

-I|--ignore-info [ regex ]

Ignore additional information matching regex (default: /Fahrradmitnahme/)

If regex is not supplied, removes the default regex (-> nothing will be ignored)

-u|--efa-url url

URL to the EFA entry point, defaults to Depending on your location, some urls may contain more specific data than others. See Travel::Routing::DE::EFA(3pm) for alternatives.

--timeout seconds

Set timeout for HTTP requests. Default: 60 seconds.

--post key=value

Add key with value to the HTTP POST request sent to the EFA server. This can be used to use setting efa does not yet cover, like --post lineRestriction=400 to also show IC and ICE trains. Note that --post will be overridden by the standard efa options, such as --time


Print version information


    0    Everything went well
    1    Invalid arguments, see error message
    2    Network error, unable to send request
    3 did not return any parsable data
    4 error: ambiguous input
    5 error: no connections found
    10   Unknown Travel::Routing::DE::EFA error
    255  Other internal error




This script requires perl 5.10 (or higher) with the following modules:

* Class::Accessor
* Exception::Class
* LWP::UserAgent


The EFA backend is not able to calculate "two-way" routes, i.e. from -> via -> to routes with from == to. If from and to are the same stop, it doesn't even try to calculate a route ("we recommend walking instead"), if they are close to each other it may or may not work. Workaround: Request from -> via using the normal four-argument efa invocation, read the time, use efa -t time via via to to to request via -> to.

None known.


Copyright (C) 2009-2014 by Daniel Friesel <>