Modes of transport - Public Transit API
The transit modes allow you to specify (using the modes request parameter) various modes that you wish to be included in the transit routing response. By default, all transit modes are supported if this parameter is omitted in a request. Currently a total of nine (9) transit modes (such as trains, buses, ferries, trams, and others) are supported, with up to 14 unique modes.
| Name | Vehicle types |
|---|---|
highSpeedTrain | High-speed trains |
intercityTrain | Intercity/EuroCity trains |
interRegionalTrain | Inter-regional and fast trains |
regionalTrain | Regional and other trains |
cityTrain | City trains |
bus | Buses |
ferry | Boats/Ferries |
subway | Metros/Subways |
lightRail | Trams |
privateBus | Ordered services/Taxis |
inclined | Inclined/Funiculars |
aerial | Aerials/Cable cars |
busRapid | Rapid buses |
monorail | Monorails |
flight | Airplanes |
The string parameter modes takes a comma-separated list of modes in two possible formats:
name_1,name_2,...,name_N- enable specified modes and disable everything else-name_1,-name_2,...,-name_N- disable specified modes and enable everything else
Examples
The following examples show how to include/exclude modes from the response:
- Intercity/EuroCity trains, buses and trams only:
modes=intercityTrain,bus,lightRail
- Metros/Subways and buses only:
modes=subway,bus
- All types except buses:
modes=-bus
- All types except high-speed trains, metros/subways, and monorails:
modes=-highSpeedTrain,-subway,-monorail
Warning::Invalid request
It is not allowed to enable and disable modes at the same time, for example:
name_1,-name_2,name_3,...,-name_NThis would render your request invalid and the API would return an error.
Updated 11 days ago