| find_stopA | Search for stops, stations, wharves, points of interest and addresses by name. Use this to turn a place name into the stop ID that the trip planning and
departure tools require.
Args:
query: What to search for, e.g. "Circular Quay" or "Town Hall Station".
location_type: Restrict results — "any", "stop", "platform", "poi",
"address", "street" or "locality".
limit: Ask the TfNSW API to return at most this many matches. Unlike
max_results on the capped tools, this bounds the upstream query
rather than truncating a fetched list, so `count` is exact.
|
| find_stop_by_idA | Look up a single stop by its numeric TfNSW stop ID. Returns `{"location": null}` if no stop carries that ID.
Args:
stop_id: The stop ID, e.g. "10101331".
|
| best_stopA | Return only the single best-matching location for a name. A shortcut for find_stop when you just need one stop ID and do not want to
weigh alternatives. Returns `{"location": null}` if nothing matches.
Args:
query: The place name to resolve, e.g. "Bondi Junction".
|
| plan_tripA | Plan a public transport journey between two places. Prefer passing plain place names as `origin` and `destination` — addresses,
stations, suburbs and landmarks all work, and the server resolves them
itself. You do NOT need to call find_stop or best_stop first; doing so costs
two extra round trips for no benefit. Use `origin_id`/`destination_id` only
when you already hold a stop ID from an earlier call.
Args:
origin: Place to depart from, e.g. "100 Harris Street Pyrmont" or
"Circular Quay". Resolved server-side.
destination: Place to arrive at, e.g. "32 Geelong Rd Engadine".
origin_id: Stop ID to depart from. Alternative to `origin`, not both.
destination_id: Stop ID to arrive at. Alternative to `destination`.
when: Optional ISO 8601 date/time, e.g. "2026-08-30T09:15". Without an
offset this is Sydney local time. Defaults to now.
arrive_by: Treat `when` as the desired arrival time instead of departure.
origin_type: Kind of the origin ID. Leave as "any", which resolves stops,
addresses and POIs alike; "stop" rejects address IDs and returns
nothing for them.
destination_type: Kind of the destination ID. Leave as "any".
realtime: Include live delay information.
wheelchair: Return only wheelchair-accessible journeys.
detail: How much to return per journey. "answer" gives only departure,
arrival, duration, changes and the mode summary — use it for "when
do I get there" and "how long does it take", which is most questions.
"summary" (default) adds the legs, each with its times, route,
platform and any alerts. "stops" adds intermediate stop names.
"full" adds the map polyline and is very large — pair it with
max_results=1 or 2 or the call may exceed the client's size limit.
max_results: Maximum journeys to return.
|
| plan_trip_from_coordinateA | Plan a journey starting from a GPS coordinate rather than a stop. Use this when the starting point is a user's current location or an
arbitrary address, and only the destination is a known stop.
Args:
latitude: Starting latitude in decimal degrees, e.g. -33.8613.
longitude: Starting longitude in decimal degrees, e.g. 151.2107.
destination_id: Stop ID to arrive at.
when: Optional ISO 8601 date/time; Sydney local time if no offset given.
arrive_by: Treat `when` as the desired arrival time.
realtime: Include live delay information.
wheelchair: Return only wheelchair-accessible journeys.
detail: How much to return per journey. "answer" gives only departure,
arrival, duration, changes and the mode summary — use it for "when
do I get there" and "how long does it take", which is most questions.
"summary" (default) adds the legs, each with its times, route,
platform and any alerts. "stops" adds intermediate stop names.
"full" adds the map polyline and is very large — pair it with
max_results=1 or 2 or the call may exceed the client's size limit.
max_results: Maximum journeys to return.
|
| plan_cycling_tripA | Plan a cycling route, optionally combined with public transport. Args:
origin_id: Stop ID to start from.
destination_id: Stop ID to finish at.
profile: Route preference — "EASIER" (gentler gradients and quieter
roads), "MODERATE", or "MORE_DIRECT" (fastest, busier roads).
when: Optional ISO 8601 date/time; Sydney local time if no offset given.
bike_only: Cycle the whole way. Set false to allow mixed bike + transit.
max_time_minutes: Reject routes longer than this.
cycle_speed: Assumed cycling speed in km/h.
detail: How much to return per journey. "answer" gives only departure,
arrival, duration, changes and the mode summary — use it for "when
do I get there" and "how long does it take", which is most questions.
"summary" (default) adds the legs, each with its times, route,
platform and any alerts. "stops" adds intermediate stop names.
"full" adds the map polyline and is very large — pair it with
max_results=1 or 2 or the call may exceed the client's size limit.
max_results: Maximum journeys to return.
|
| get_departuresA | List upcoming departures from a stop — the live departure board. Args:
stop_id: Stop ID to read departures for. Resolve names with find_stop.
when: Optional ISO 8601 date/time to board from; Sydney local time if no
offset given. Defaults to now.
platform_id: Restrict to a single platform or stand.
realtime: Include live delay information alongside scheduled times.
|
| get_alertsA | Retrieve service alerts: disruptions, trackwork and planned changes. Pass a stop_id whenever you can. A network-wide fetch returns every alert in
NSW — hundreds of them — so results are capped: `count` is the true total
and `returned` is how many are included.
Args:
when: Optional ISO 8601 date/time to check alerts for; Sydney local time
if no offset given. Defaults to now.
stop_id: Restrict to alerts affecting one stop. Omit for network-wide.
current_only: Only alerts in effect now. Set false to include future ones.
max_results: Maximum alerts to return.
|
| find_nearbyA | Find stops and points of interest near a GPS coordinate. Each result carries its distance in metres from the coordinate. A dense area
can return hundreds of locations within 500m, so results are capped:
`count` is the true total and `returned` is how many are included. Narrow
`radius_m` rather than raising `max_results` to get more relevant results.
Args:
latitude: Latitude in decimal degrees, e.g. -33.8613.
longitude: Longitude in decimal degrees, e.g. 151.2107.
radius_m: Search radius in metres.
type_1: TfNSW result category. "GIS_POINT" covers stops and POIs.
draw_class: Optional TfNSW sub-category filter.
max_results: Maximum locations to return.
|
| get_vehicle_positionsA | Fetch live GPS positions of vehicles currently running on a network. Unlike the other tools, which return timing estimates, this returns where
each vehicle physically is. Note this feed is a separate product on the
TfNSW Open Data portal — your API key must be subscribed to it as well.
Feeds can carry thousands of vehicles, so results are capped: `count` is the
true feed size and `returned` is how many are included.
Args:
mode: Which feed to read. One of "buses", "sydneytrains", "metro",
"nswtrains", "ferries/sydneyferries", "lightrail/cbdandsoutheast",
"lightrail/innerwest", "lightrail/newcastle",
"lightrail/parramatta".
max_results: Maximum vehicles to return.
|