plan_trip
Plan public transit trips in Hong Kong and other regions using coordinates or stop IDs. Get route options with MTR, bus, ferry, and walking directions, including fare ranges and optional departure or arrival times.
Instructions
Plan a transit trip. Uses Wheels Router for Hong Kong and Transitous for other regions. IMPORTANT: fares_min/fares_max are fare ranges, NOT interchange discounts. Interchange discounts (轉乘優惠) only apply when FareDiscountRules are explicitly present in the API response, and IT ONLY APPLIES TO CERTAIN ROUTES.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| modes | No | Optional comma-separated modes (e.g. 'mtr,bus,ferry'). Only set if needed. | |
| origin | Yes | Required. Starting point as 'lat,lon' or 'stop:ID'. Use coordinates or stop IDs only. | |
| arrive_by | No | Optional ISO 8601 arrival deadline (UTC preferred). | |
| depart_at | No | Optional ISO 8601 departure time (UTC preferred). | |
| destination | Yes | Required. Destination as 'lat,lon' or 'stop:ID'. Use coordinates or stop IDs only. | |
| max_results | No | Optional cap on returned plans (1-5). Defaults to API behavior. |