Plan a journey
plan_journeyFind public-transport routes between two places, with multiple itinerary options, times, transfers, and disruption alerts. Supports wheelchair access, departure/arrival times, and line preferences.
Instructions
Compute public-transport journeys between two points (multi-modal door-to-door routing). Returns up to 'max_nb_journeys' itineraries with legs, times, transfers and any disruptions. To express a taste for or against a line without ruling it out, pass 'prefer_lines' / 'avoid_lines'; use 'forbidden_uris' to exclude something outright.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Destination. Either 'lon;lat' coordinates (e.g. '2.3522;48.8566') or a Navitia object id from search_places (e.g. 'stop_area:SNCF:87686006'). Prefer object ids for stations. | |
| from | Yes | Origin. Either 'lon;lat' coordinates (e.g. '2.3522;48.8566') or a Navitia object id from search_places (e.g. 'stop_area:SNCF:87686006'). Prefer object ids for stations. | |
| datetime | No | ISO 8601 datetime, local to the region (e.g. 2026-06-11T17:30). Defaults to now. | |
| wheelchair | No | Only wheelchair-accessible journeys. | |
| avoid_lines | No | EXPERIMENTAL. Line ids ('line:...') the traveller would rather not use: they are proposed less but stay in the results, unlike forbidden_uris which removes them. For "I would like to avoid metro 14 without ruling it out". | |
| prefer_lines | No | EXPERIMENTAL. Line ids ('line:...', from search_pt_objects) the traveller would rather use: itineraries taking them are favoured, without discarding the alternatives. For "I prefer taking metro 14". | |
| forbidden_uris | No | Object ids to exclude entirely, e.g. a line ('line:...'), network or commercial_mode ('commercial_mode:Bus'). To merely de-prioritise a line, use 'avoid_lines' instead. | |
| max_nb_journeys | No | Maximum number of itineraries to return (default 8). | |
| max_nb_transfers | No | Maximum number of transfers. | |
| datetime_represents | No | Whether 'datetime' is the departure time (default) or the desired arrival time. |