The Schedule and Search Engine API allows you to retrieve search results for external systems, search portals and directories in a secure and controlled manner.
## Prerequisites
To be able to query the journeys, you need:
- A token from the account holder
- The corresponding URL
## Available parameters
You can append the following parameters to the URL using GET:
- xml_token: The token that you receive for access
- date: The date in Unix timestamp format from when the results should be retrieved
- to_date: The date in Unix timestamp format until when the results should be displayed (maximum 1 month)
- max_days: Number of days displayed (maximum 31 days)
- line_region_id: Optional, to restrict to a specific line region
- line_type_id: Optional, to restrict to a specific line type
- line_id: Optional, only outputs this line
- station_id: Optional, only shows results from this departure station
- destination_id: Optional, only shows results for this destination station
- resource_id: Optional, only shows results with the specified resource
- person_id: Optional, to identify the person
- capacity: Optional, to output the driving capacity (performance costs)
## Search result
The search result is output as JSON and grouped into the following sections:
- Meta information (meta): Date of creation
- Client information (stores): Information about the client and the target URL
- Stations (stations): Available stations
- Connections (relations): Ride combinations with fare type and operator of the line
## Integration of booking mask
The URL of the booking mask is displayed in the search result in the "store" section. To load the booking mask directly with the selected search result, you can use the following optional parameters:
- port_id: Departure station as int value
- destination_id: Destination station as int value
- line_id: Restriction to a specific line
- arrival_date: Date of outward journey as Unix timestamp
- display_days: Number of previews of the search result in days
- single_journey: true as string for outward journey only
- return_date: Date of return trip as Unix timestamp (optional)
- agent_id: Commission recipient ID of the connecting portal
## Example booking mask