**The public endpoint is [`2.db.transport.rest`](`https://2.db.transport.rest`).** This API returns data in the [*Friendly Public Transport Format* `1.2.0`](https://github.com/public-transport/friendly-public-transport-format/blob/1.2.0/spec/readme.md).
*Note:* In order to improve this API, I would to know which software projects use it. Please send an **`X-Identifier` header (e.g. `my-awesome-tool`) to let me know who you are**. I you don't provide it, a hash of the client IP will be logged.
*Note:* As stated in the [*Friendly Public Transport Format* `1.2.0`](https://github.com/public-transport/friendly-public-transport-format/tree/1.2.0), the returned `departure` and `arrival` times include the current delay.
Passes all parameters into [`departures(…)` from `db-hafas`](https://github.com/derhuerst/db-hafas/blob/master/docs/departures.md).
-`when`: A [UNIX timestamp](https://en.wikipedia.org/wiki/Unix_time) or anything parsable by [`parse-messy-time`](https://github.com/substack/parse-messy-time#example). Default: now.
-`duration`: Show departures for the next `n` minutes. Default: `10`.
Output from [`require('db-hafas').journeys(…)`](https://github.com/derhuerst/db-hafas#getting-started). Start location and end location must be either in [station format](#station-format) or in [POI/address format](#poiaddress-format) (you can mix them).
*Note:* As stated in the [*Friendly Public Transport Format* `1.2.0`](https://github.com/public-transport/friendly-public-transport-format/tree/1.2.0), the returned `departure` and `arrival` times include the current delay.
-`when`: A [UNIX timestamp](https://en.wikipedia.org/wiki/Unix_time) or anything parsable by [`parse-messy-time`](https://github.com/substack/parse-messy-time#example). Default: now.
-`results`: Maximum number of results. Default: `5`.
-`via`: Station ID. Default: `null`.
-`passedStations`: Return stations on the way? Default: `false`.
-`transfers`: Maximum number of transfers. Default: `5`.
-`transferTime`: Minimum time in minutes for a single transfer. Default: `0`.
-`accessibility`: Possible values: `partial`, `complete`. Default: `none`.
-`bike`: Return only bike-friendly journeys. Default: `false`.
-`tickets`: Return information about available tickets. Default: `false`.
taxi
tram
bus
ferry
subway
suburban
regional
regionalExp
national
nationalExp
-`taxi`: Include taxis? Default: `false`.
-`tram`: Include [trams](https://en.wikipedia.org/wiki/Tram)? Default: `true`.
-`ferry`: Include [ferries](https://en.wikipedia.org/wiki/Ferry)? Default: `true`.
-`bus`: Include [buses](https://en.wikipedia.org/wiki/Bus)? Default: `true`.
-`subway`: Include [U-Bahn trains](https://en.wikipedia.org/wiki/Rapid_transit)? Default: `true`.
-`suburban`: Include [S-Bahn trains](https://en.wikipedia.org/wiki/S-train)? Default: `true`.
-`regional`: Include RB/ODEG trains? Default: `true`.
-`regionalExp`: Include RE/ODEG trains? Default: `true`.
-`national`: Include [IC/EC trains](https://en.wikipedia.org/wiki/Intercity_(Deutsche_Bahn)? Default: `true`.
-`nationalExp`: Include [ICE trains](https://en.wikipedia.org/wiki/Intercity-Express)? Default: `true`.