How to calculate a taxi and ride route
User Story
You request a route from the Amsterdam City center to Amsterdam Schiphol Airport with the Intermodal
Routing API v8 using a combination of taxi and transit transport types. We
call this Taxi and Ride intermodal route. You take a taxi to the closest public transport
station, transfer to another mode of transport and reach your destination through public
transportation.
Request
Authentication
Intermodal Routing supports authentication using both API Key and Bearer Token. To get started, join the HERE platform.
To learn more about the available authentication methods, see Identity and Access Management Developer Guide.
Note
You can get started for free with the HERE Base Plan. For detailed pricing information, see HERE Location Service Rates.
Constructing a Taxi and Ride Route Request
GET https://intermodal.router.hereapi.com/v8/routes
?destination=52.309584623632894,4.762449758418342
&origin=52.360292297234395,4.883253423531613
&taxi[enable]=routeHead
&taxi[modes]=car
&transit[enable]=routeTail
&rented[enable]=
&apiKey=<YOUR API KEY>The only required parameters for an Intermodal Route Request in general are origin and
destination, given in <latitude>,<longitude> format. For a Taxi and Ride request in
particular, set the parameters taxi[modes]=car, taxi[enable]=routeHead,
transit[enable]=routeTail, and rented[enable]= to ensure the Taxi and Ride intermodal route in
the response.
The taxi[modes]=car and taxi[enable]=routeHead parameters tell the intermodal router to return
taxi transport type in the head section of the route. Whereas the transit[enable]=routeTail
parameter tells the intermodal router to return transit transport type in the tail section of
the route. The rented[enable]= parameter is needed to disable the rented transport type in the
response, which is enabled by default.
By default, the Intermodal Routing API v8 returns only one optimal intermodal
route. The optional parameter alternatives represents the number of alternative routes to return
aside from the optimal route. By default, alternatives=0 is assumed and only one optimal route
is returned. In cases where also a pedestrian route is available it will be also returned. This may
lead to two routes being returned in total (one intermodal route and one pedestrian route) even
though only one is expected when alternatives=0 is given.
Note
At the moment,
taxi[modes]=carparameter is optional ascaris the only mode of transport fortaxitransport type. In the future, other modes likeshuttlemight be made available, and you will need to usetaxi[modes]=shuttleif you only want that to be returned in the response.
For more information on the services and transport types of the Intermodal Routing API v8, see the Intermodal Services & Transport Types section.
Response
A successful response contains the following details about the calculated route:
- One optimal route divided into sections
- Departure and arrival times, duration, coordinates, and other per-section information for each section
- Per section, one of the following transport types:
taxi- route section in which you ride from your origin to the location of transferpedestrian- route section in which you walk from thetaxidrop-off point to thetransitstationtransit- route section with the public transit departure and arrival stations- Optionally, all intermediate stops can be returned by setting the
return=intermediaterequest parameter.
- Optionally, all intermediate stops can be returned by setting the
- A set of operators that run the services including operator code, operator name, and links to operator websites
{
"routes": [
{
"id": "R003814-C0",
"sections": [
{
"id": "R003814-C0-S0",
"type": "pedestrian",
"departure": {
"time": "2020-04-28T16:28:00+02:00",
"place": {
"type": "place",
"location": {
"lat": 52.360292,
"lng": 4.883253
}
}
},
"arrival": {
"time": "2020-04-28T16:29:00+02:00",
"place": {
"name": "Amsterdam, Rijksmuseum",
"type": "station",
"location": {
"lat": 52.359768,
"lng": 4.883548
},
"id": "215030307"
}
}
},
{
"id": "R003814-C0-S1",
"type": "transit",
"departure": {
"time": "2020-04-28T16:29:00+02:00",
"place": {
"name": "Amsterdam, Rijksmuseum",
"type": "station",
"location": {
"lat": 52.359768,
"lng": 4.883548
},
"id": "215030307"
},
"delay": 0
},
"arrival": {
"time": "2020-04-28T16:40:00+02:00",
"place": {
"name": "Amsterdam, Station Zuid",
"type": "station",
"location": {
"lat": 52.340825,
"lng": 4.87374
},
"id": "215096212",
"platform": "D"
},
"delay": 0
},
"transport": {
"mode": "lightRail",
"name": "5",
"category": "Tram",
"headsign": "Amstelveen Stadshart"
},
"agency": {
"id": "5wUGVB00",
"name": "GVB",
"website": "http://www.gvb.nl"
}
},
{
"id": "R003814-C0-S2",
"type": "pedestrian",
"departure": {
"time": "2020-04-28T16:40:00+02:00",
"place": {
"name": "Amsterdam, Station Zuid",
"type": "station",
"location": {
"lat": 52.340825,
"lng": 4.87374
},
"id": "215096212"
}
},
"arrival": {
"time": "2020-04-28T16:46:00+02:00",
"place": {
"name": "Amsterdam Zuid",
"type": "station",
"location": {
"lat": 52.33882,
"lng": 4.872866
},
"id": "215154261"
}
}
},
{
"id": "R003814-C0-S3",
"type": "transit",
"departure": {
"time": "2020-04-28T16:46:00+02:00",
"place": {
"name": "Amsterdam Zuid",
"type": "station",
"location": {
"lat": 52.33882,
"lng": 4.872866
},
"id": "215154261",
"platform": "3"
}
},
"arrival": {
"time": "2020-04-28T16:52:00+02:00",
"place": {
"name": "Schiphol Airport",
"type": "station",
"location": {
"lat": 52.309539,
"lng": 4.762266
},
"id": "215125100",
"platform": "4"
}
},
"transport": {
"mode": "regionalTrain",
"name": "Intercity",
"category": "Regional Train",
"headsign": "Schiphol Airport"
},
"agency": {
"id": "5wUIFF06",
"name": "NS",
"website": "http://www.ns.nl"
}
},
{
"id": "R003814-C0-S4-dep",
"type": "pedestrian",
"departure": {
"time": "2020-04-28T16:52:00+02:00",
"place": {
"name": "Schiphol Airport",
"type": "station",
"location": {
"lat": 52.309539,
"lng": 4.762266
},
"id": "215125100"
}
},
"arrival": {
"time": "2020-04-28T16:53:00+02:00",
"place": {
"name": "Schiphol",
"type": "accessPoint",
"location": {
"lat": 52.309539,
"lng": 4.762266
}
}
}
},
{
"id": "R003814-C0-S4",
"type": "pedestrian",
"departure": {
"time": "2020-04-28T16:53:00+02:00",
"place": {
"name": "Schiphol",
"type": "accessPoint",
"location": {
"lat": 52.309539,
"lng": 4.762266
}
}
},
"arrival": {
"time": "2020-04-28T16:54:00+02:00",
"place": {
"type": "place",
"location": {
"lat": 52.309585,
"lng": 4.76245
}
}
}
}
]
}
]
}Updated 10 days ago