Plan a journey
plan_journeyRead-onlyIdempotent
Plans bus and metro journeys between two places in one city network. Returns the first journey leaving at or after the departure time as numbered steps with boarding stops, changes, walking, times and fare, a link that opens it in PakBus, and up to two later departures on one line. Apps that show interactive views also get a map of the journey.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | place_id of the destination, from find_places. | |
| city | Yes | City network from find_places or list_cities, such as Lahore, Attock or Rawalpindi. | |
| from | Yes | place_id of the start, from find_places. | |
| depart | No | Departure date and time in Pakistan local time, as YYYY-MM-DDTHH:MM. Leave out to leave now. Search again with a later time for later journeys. | |
| max_changes | No | Most changes between buses, 0 for direct journeys only. Defaults to 2. When none are found within the limit, journeys with up to 5 changes are returned. |