{"openapi":"3.1.0","info":{"title":"Transport for NSW Trip Planner (BYOK) API","version":"0.1.0","description":"Transport for NSW Trip Planner (BYOK) lets an AI assistant read your own Transport for NSW Trip Planner data through the Transport for NSW Trip Planner API with a key you supply (Open Data API key). Read-only: 5 tools (search_stops, get_departures, find_nearby_stops, list_service_alerts, plan_trip). The BYOK key travels with each request, is used for that one call only and is never stored, logged...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-transportnsw-trip-planner.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-transportnsw-trip-planner/docs"},"termsOfService":"https://connectorbay.com/byok-transportnsw-trip-planner/terms"},"servers":[{"url":"https://byok-transportnsw-trip-planner.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-transportnsw-trip-planner/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/search_stops":{"post":{"operationId":"search_stops","summary":"Search NSW public transport stops, stations, wharves, places and addresses by name, stop id or coordinate (for auto-comp","description":"Search NSW public transport stops, stations, wharves, places and addresses by name, stop id or coordinate (for auto-complete or to find an id for the other tools). Use for \"Find the stop id for Central Station in Sydney\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"search":{"description":"Search text such as 'Central Station', or a stop id, or a coordinate as LONGITUDE:LATITUDE:EPSG:4326 when search_type is coord.","maxLength":120,"title":"Search","type":"string"},"search_type":{"anyOf":[{"enum":["any","stop","poi","coord"],"type":"string"},{"type":"null"}],"default":"any","description":"What the search text is: any (all kinds of place), stop, poi (point of interest) or coord.","title":"Search Type"},"output_format":{"anyOf":[{"const":"rapidJSON","type":"string"},{"type":"null"}],"default":"rapidJSON","description":"Response format. Leave at the default rapidJSON.","title":"Output Format"},"coord_format":{"anyOf":[{"const":"EPSG:4326","type":"string"},{"type":"null"}],"default":"EPSG:4326","description":"Coordinate system of the answer. Leave at the default EPSG:4326 (latitude and longitude).","title":"Coord Format"},"trip_planner_mode":{"anyOf":[{"const":"true","type":"string"},{"type":"null"}],"default":"true","description":"Leave at the default true to behave like the transportnsw.info trip planner.","title":"Trip Planner Mode"}},"required":["search"],"title":"search_stopsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_departures":{"post":{"operationId":"get_departures","summary":"Show the next departures (planned times, with route number, description and destination) from one NSW stop, station or w","description":"Show the next departures (planned times, with route number, description and destination) from one NSW stop, station or wharf. Use for \"What are the next departures from Central Station\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"stop":{"description":"Stop id or global stop id such as 10101100 (find it with search_stops).","maxLength":60,"title":"Stop","type":"string"},"stop_type":{"anyOf":[{"enum":["stop","any","platform","coord","poi","street","locality"],"type":"string"},{"type":"null"}],"default":"stop","description":"What the stop value is: stop (default), any, platform, coord, poi, street or locality.","title":"Stop Type"},"date":{"anyOf":[{"maxLength":8,"type":"string"},{"type":"null"}],"default":null,"description":"Reference date as YYYYMMDD (default: now).","title":"Date"},"time":{"anyOf":[{"maxLength":4,"type":"string"},{"type":"null"}],"default":null,"description":"Reference time as HHMM, 24 hour (default: now).","title":"Time"},"output_format":{"anyOf":[{"const":"rapidJSON","type":"string"},{"type":"null"}],"default":"rapidJSON","description":"Response format. Leave at the default rapidJSON.","title":"Output Format"},"coord_format":{"anyOf":[{"const":"EPSG:4326","type":"string"},{"type":"null"}],"default":"EPSG:4326","description":"Coordinate system of the answer. Leave at the default EPSG:4326 (latitude and longitude).","title":"Coord Format"},"direct_mode":{"anyOf":[{"const":"direct","type":"string"},{"type":"null"}],"default":"direct","description":"Leave at the default direct to show the board without stop verification.","title":"Direct Mode"},"departure_macro":{"anyOf":[{"const":"true","type":"string"},{"type":"null"}],"default":"true","description":"Leave at the default true to behave like the transportnsw.info departure board.","title":"Departure Macro"},"trip_planner_mode":{"anyOf":[{"const":"true","type":"string"},{"type":"null"}],"default":"true","description":"Leave at the default true to include real-time options.","title":"Trip Planner Mode"}},"required":["stop"],"title":"get_departuresArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/find_nearby_stops":{"post":{"operationId":"find_nearby_stops","summary":"Find NSW public transport stops, stations, wharves or points of interest within a radius of a coordinate. Use for \"Which","description":"Find NSW public transport stops, stations, wharves or points of interest within a radius of a coordinate. Use for \"Which transport stops are within 500 metres of Town Hall in Sydney\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"coord":{"description":"Location as LONGITUDE:LATITUDE:EPSG:4326 (longitude first), for example 151.206290:-33.884080:EPSG:4326.","maxLength":60,"title":"Coord","type":"string"},"radius_m":{"anyOf":[{"maximum":5000,"minimum":50,"type":"integer"},{"type":"null"}],"default":1000,"description":"Search radius in metres (default 1000).","title":"Radius M"},"kind":{"anyOf":[{"enum":["BUS_POINT","GIS_POINT","POI_POINT"],"type":"string"},{"type":"null"}],"default":"BUS_POINT","description":"What to return: BUS_POINT (stops and stations, default), GIS_POINT (map points such as Opal resellers) or POI_POINT (places of interest).","title":"Kind"},"output_format":{"anyOf":[{"const":"rapidJSON","type":"string"},{"type":"null"}],"default":"rapidJSON","description":"Response format. Leave at the default rapidJSON.","title":"Output Format"},"coord_format":{"anyOf":[{"const":"EPSG:4326","type":"string"},{"type":"null"}],"default":"EPSG:4326","description":"Coordinate system of the answer. Leave at the default EPSG:4326 (latitude and longitude).","title":"Coord Format"},"advanced_filter":{"anyOf":[{"const":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Leave at the default 1 (required for coordinate searches).","title":"Advanced Filter"}},"required":["coord"],"title":"find_nearby_stopsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_service_alerts":{"post":{"operationId":"list_service_alerts","summary":"List current NSW public transport service alerts and disruptions, optionally for one stop, line or transport mode. Use f","description":"List current NSW public transport service alerts and disruptions, optionally for one stop, line or transport mode. Use for \"Are there any current train service alerts in NSW\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"mode":{"anyOf":[{"enum":[1,2,4,5,7,9,11],"type":"integer"},{"type":"null"}],"default":null,"description":"Mode codes: 1 train, 2 metro, 4 light rail, 5 bus, 7 coach, 9 ferry, 11 school bus. Only one mode can be filtered at a time (leave empty for all).","title":"Mode"},"stop":{"anyOf":[{"maxLength":60,"type":"string"},{"type":"null"}],"default":null,"description":"Only alerts for this stop id or global stop id.","title":"Stop"},"line":{"anyOf":[{"maxLength":40,"type":"string"},{"type":"null"}],"default":null,"description":"Only alerts for this line number, for example 020T1.","title":"Line"},"valid_on":{"anyOf":[{"maxLength":10,"type":"string"},{"type":"null"}],"default":null,"description":"Only alerts valid on this date, as DD-MM-YYYY.","title":"Valid On"},"publication_status":{"anyOf":[{"const":"current","type":"string"},{"type":"null"}],"default":"current","description":"Use current to return only current alerts, not history.","title":"Publication Status"},"output_format":{"anyOf":[{"const":"rapidJSON","type":"string"},{"type":"null"}],"default":"rapidJSON","description":"Response format. Leave at the default rapidJSON.","title":"Output Format"}},"title":"list_service_alertsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/plan_trip":{"post":{"operationId":"plan_trip","summary":"Plan public transport journeys between two NSW places (stop ids, global ids or coordinates) with legs, times and real-ti","description":"Plan public transport journeys between two NSW places (stop ids, global ids or coordinates) with legs, times and real-time information. Use for \"How do I get from Central Station to Bondi Junction by public transport\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"origin":{"description":"Start: a stop id or global stop id (such as 10101100), or LONGITUDE:LATITUDE:EPSG:4326.","maxLength":60,"title":"Origin","type":"string"},"destination":{"description":"End: a stop id or global stop id, or LONGITUDE:LATITUDE:EPSG:4326.","maxLength":60,"title":"Destination","type":"string"},"origin_type":{"anyOf":[{"enum":["any","coord"],"type":"string"},{"type":"null"}],"default":"any","description":"What the origin value is: any (stop or place id) or coord.","title":"Origin Type"},"destination_type":{"anyOf":[{"enum":["any","coord"],"type":"string"},{"type":"null"}],"default":"any","description":"What the destination value is: any or coord.","title":"Destination Type"},"depart_or_arrive":{"anyOf":[{"enum":["dep","arr"],"type":"string"},{"type":"null"}],"default":"dep","description":"dep to leave after the given time, arr to arrive before it.","title":"Depart Or Arrive"},"date":{"anyOf":[{"maxLength":8,"type":"string"},{"type":"null"}],"default":null,"description":"Reference date as YYYYMMDD (default: now).","title":"Date"},"time":{"anyOf":[{"maxLength":4,"type":"string"},{"type":"null"}],"default":null,"description":"Reference time as HHMM, 24 hour (default: now).","title":"Time"},"max_trips":{"anyOf":[{"maximum":10,"minimum":1,"type":"integer"},{"type":"null"}],"default":3,"description":"Maximum number of journeys to return (default 3).","title":"Max Trips"},"wheelchair":{"anyOf":[{"const":"on","type":"string"},{"type":"null"}],"default":null,"description":"Set to on to return only wheelchair accessible journeys.","title":"Wheelchair"},"output_format":{"anyOf":[{"const":"rapidJSON","type":"string"},{"type":"null"}],"default":"rapidJSON","description":"Response format. Leave at the default rapidJSON.","title":"Output Format"},"coord_format":{"anyOf":[{"const":"EPSG:4326","type":"string"},{"type":"null"}],"default":"EPSG:4326","description":"Coordinate system of the answer. Leave at the default EPSG:4326 (latitude and longitude).","title":"Coord Format"},"trip_planner_mode":{"anyOf":[{"const":"true","type":"string"},{"type":"null"}],"default":"true","description":"Leave at the default true to behave like the transportnsw.info trip planner.","title":"Trip Planner Mode"}},"required":["origin","destination"],"title":"plan_tripArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}