Schedule and Search Engine API
The Schedule and Search Engine API provides controlled access to search results for external systems, search portals, and directories.
Requirements
| Requirement | Description |
|---|---|
| Token | API token provided by the account owner. |
| URL | Target URL to which the GET parameters are appended. |
Available Parameters
| Parameter | Description |
|---|---|
xml_token | Token received for API access. |
datum | Start date for results as Unix timestamp. |
bis_datum | End date for results as Unix timestamp, maximum 1 month. |
max_days | Number of displayed days, maximum 31 days. |
linie_region_id | Optional restriction to a specific line region. |
linie_typ_id | Optional restriction to a specific line type. |
linie_id | Optional restriction to one line. |
station_id | Optional restriction to one departure station. |
zielstation_id | Optional restriction to one destination station. |
ressource_id | Optional restriction to one resource. |
personen_id | Optional person identifier. |
kapazitaet | Optional output of trip capacity. This can affect performance. |
Search Result
The result is returned as JSON and grouped into the following sections:
| Section | Description |
|---|---|
meta | Generation date. |
shops | Tenant and target URL information. |
stations | Available stations. |
relations | Trip combinations with price type and line operator. |
Booking Screen Integration
The booking screen URL is returned in the shop section of the search result. To open the booking screen directly with selected search results, use these optional parameters:
| Parameter | Description |
|---|---|
hafen_id | Departure station as integer. |
zielhafen_id | Destination station as integer. |
linie_id | Restriction to a specific line. |
hinfahrt_datum | Outbound trip date as Unix timestamp. |
anzeige_tage | Number of preview days for the search result. |
einfache_fahrt | String value true for one-way trips only. |
rueckfahrt_datum | Return trip date as Unix timestamp, optional. |
vermittler_id | Commission recipient ID of the connected portal. |
Booking Screen Example
Use the returned URL to open the booking screen with prefilled values.