Plan a multimodal journey with the API
Search scheduled rail, airport access and flights together on a date, with local times and scheduled transfer gaps.
Use the multimodal journey planning API to find routes that combine scheduled trains,
airport buses and flights. Call /v1/journeys with a travel date.
The date and the window use the origin’s zone. The window bounds when you need to be
ready to start, which can be earlier than your first ride. Use modes=ground to exclude
flights. You can page through options; the router does not return every permutation.
It keeps options that trade off a later start against an earlier finish.
This Python 3 example uses the standard library and the quickstart environment variables. It searches for a journey from Cologne to Tokyo on 3 December 2026, with a departure window of 11:00 to 11:30 in Cologne.
import json
import os
from urllib.error import HTTPError
from urllib.parse import urlencode
from urllib.request import Request, urlopen
query = urlencode({
"from": "geonames:2886242",
"to": "geonames:1850147",
"date": "2026-12-03",
"depart_after": "11:00",
"depart_before": "11:30",
"limit": 1,
})
request = Request(
f"{os.environ['TRIP_TOPOLOGY_URL'].rstrip('/')}/v1/journeys?{query}",
headers={"Authorization": f"Bearer {os.environ['TRIP_TOPOLOGY_KEY']}"},
)
try:
with urlopen(request, timeout=30) as response:
page = json.load(response)
except HTTPError as error:
problem = json.load(error)
raise SystemExit(f"{error.code} {problem['code']}: {problem['detail']}")
for option in page["data"]:
print(option["departure"], "to", option["arrival"])
print("Rides:", ", ".join(leg["mode"] for leg in option["legs"]))
print("Last stop:", option["legs"][-1]["to"]["place_id"])
2026-12-03T11:18:00+01:00 to 2026-12-04T10:45:00+09:00
Rides: rail, air
Last stop: HND
In the captured response, ICE 225 reaches Frankfurt Airport’s
long-distance station with 108 minutes before flight LH716. The last leg ends at Haneda
(HND), not in central Tokyo. Show the actual boarding and alighting places, local times
and operators for each ride when known. The value in changes[].available_minutes is the
scheduled gap between rides, not a transfer guarantee.
Verify schedule and availability before booking.