{"openapi":"3.1.0","info":{"title":"Trans CAPI (BYOK) API","version":"0.1.0","description":"Trans CAPI (BYOK) lets an AI assistant read your own Trans CAPI data through the Trans CAPI API with a key you supply (TransCAPI API key). Read-only: 12 tools (search_places, search_bus_stops, get_bus_stop_departures, list_live_buses, search_bus_routes, get_bus_punctuality, get_rail_station_board, get_rail_service, get_rail_fares, list_disruptions, get_airport_transport, plan_journey). The BYOK...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-transcapi.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-transcapi/docs"},"termsOfService":"https://connectorbay.com/byok-transcapi/terms"},"servers":[{"url":"https://byok-transcapi.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-transcapi/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_places":{"post":{"operationId":"search_places","summary":"Search Great Britain towns, villages, postcodes (full or partial) and stops by text; same-named places are ranked by siz","description":"Search Great Britain towns, villages, postcodes (full or partial) and stops by text; same-named places are ranked by size or by distance when lat and lon are given. Use for \"Find the place S1 1AA\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"query":{"description":"Search text such as a town, postcode ('S1 1AA') or stop name.","maxLength":100,"title":"Query","type":"string"},"type":{"anyOf":[{"enum":["settlement","postcode","airport","bus_stop","train_station","tram_stop"],"type":"string"},{"type":"null"}],"default":null,"description":"Only this kind of place.","title":"Type"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":10,"description":"How many results (1 to 100).","title":"Limit"}},"required":["query"],"title":"search_placesArguments","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/search_bus_stops":{"post":{"operationId":"search_bus_stops","summary":"Find bus, tram and rail stops near a point; each stop has a 'towards' field to tell the two sides of a road apart. Use f","description":"Find bus, tram and rail stops near a point; each stop has a 'towards' field to tell the two sides of a road apart. Use for \"Which bus stops are within 200 m of 53.3824, -1.4695\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"lat":{"description":"Latitude of the centre point.","maximum":61,"minimum":49,"title":"Lat","type":"number"},"lon":{"description":"Longitude of the centre point.","maximum":3,"minimum":-9,"title":"Lon","type":"number"},"radius":{"anyOf":[{"maximum":5000,"minimum":10,"type":"integer"},{"type":"null"}],"default":400,"description":"Search radius in metres.","title":"Radius"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many stops (1 to 100).","title":"Limit"}},"required":["lat","lon"],"title":"search_bus_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_bus_stop_departures":{"post":{"operationId":"get_bus_stop_departures","summary":"Get departures (or arrivals) at a bus stop with expected times and delay for tracked buses; the timetable is used for un","description":"Get departures (or arrivals) at a bus stop with expected times and delay for tracked buses; the timetable is used for untracked ones. Use for \"What buses leave stop 370022870 in the next hour\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"atcocode":{"description":"NaPTAN stop code, for example '370022870' (from search_bus_stops).","maxLength":200,"title":"Atcocode","type":"string"},"type":{"anyOf":[{"enum":["departures","arrivals","both"],"type":"string"},{"type":"null"}],"default":"departures","description":"Which board: departures, arrivals or both.","title":"Type"},"from_offset":{"anyOf":[{"maximum":1440,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Minutes from now at which the window starts.","title":"From Offset"},"to_offset":{"anyOf":[{"maximum":1440,"minimum":1,"type":"integer"},{"type":"null"}],"default":60,"description":"Minutes from now at which the window ends.","title":"To Offset"},"live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to match live vehicle positions to departures.","title":"Live"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many entries (1 to 100).","title":"Limit"}},"required":["atcocode"],"title":"get_bus_stop_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/list_live_buses":{"post":{"operationId":"list_live_buses","summary":"List buses reporting their position near a point, nearest first, with line, operator, destination, delay in seconds and ","description":"List buses reporting their position near a point, nearest first, with line, operator, destination, delay in seconds and the trip id. Use for \"Where are the number 52 buses near Sheffield Cathedral\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"lat":{"description":"Latitude of the centre point.","maximum":61,"minimum":49,"title":"Lat","type":"number"},"lon":{"description":"Longitude of the centre point.","maximum":3,"minimum":-9,"title":"Lon","type":"number"},"radius":{"anyOf":[{"maximum":10000,"minimum":50,"type":"integer"},{"type":"null"}],"default":1000,"description":"Radius in metres (up to 10000).","title":"Radius"},"line":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only this line name, for example '52a'.","title":"Line"},"operator":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only this operator code or exact name.","title":"Operator"},"limit":{"anyOf":[{"maximum":200,"minimum":1,"type":"integer"},{"type":"null"}],"default":50,"description":"How many buses (1 to 200).","title":"Limit"}},"required":["lat","lon"],"title":"list_live_busesArguments","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/search_bus_routes":{"post":{"operationId":"search_bus_routes","summary":"Find bus routes by line number or name, by operator or by a stop they serve. Use for \"Find bus route X1\".","description":"Find bus routes by line number or name, by operator or by a stop they serve. Use for \"Find bus route X1\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"q":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Line number or name, for example '36' or 'X1'.","title":"Q"},"operator":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Operator name or agency id.","title":"Operator"},"atcocode":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only routes calling at this stop code.","title":"Atcocode"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":20,"description":"How many routes (1 to 100).","title":"Limit"}},"title":"search_bus_routesArguments","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_bus_punctuality":{"post":{"operationId":"get_bus_punctuality","summary":"Get observed punctuality of a bus route or line: share on time, early, late and very late, mean delay and on-time rate b","description":"Get observed punctuality of a bus route or line: share on time, early, late and very late, mean delay and on-time rate by hour. Measured where buses are tracked. Use for \"How punctual is the 52 bus of Stagecoach Yorkshire\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"route_id":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Route id from search_bus_routes.","title":"Route Id"},"operator":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"National operator code, for example 'SYRK'.","title":"Operator"},"line":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Line name as shown on the bus.","title":"Line"},"days":{"anyOf":[{"maximum":56,"minimum":7,"type":"integer"},{"type":"null"}],"default":28,"description":"How many past days to measure (7 to 56).","title":"Days"}},"title":"get_bus_punctualityArguments","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_rail_station_board":{"post":{"operationId":"get_rail_station_board","summary":"Get live departures or arrivals at a Great Britain rail station with expected time, platform, status and delay or cancel","description":"Get live departures or arrivals at a Great Britain rail station with expected time, platform, status and delay or cancellation reason, plus station notices. Use for \"What trains are leaving Leeds station\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"crs_code":{"description":"Three-letter station code, for example 'LDS' for Leeds or 'KGX' for London Kings Cross.","maxLength":3,"title":"Crs Code","type":"string"},"type":{"anyOf":[{"enum":["departures","arrivals","both"],"type":"string"},{"type":"null"}],"default":"departures","description":"Which board: departures, arrivals or both.","title":"Type"},"from_offset":{"anyOf":[{"maximum":1440,"minimum":0,"type":"integer"},{"type":"null"}],"default":0,"description":"Minutes from now at which the window starts.","title":"From Offset"},"to_offset":{"anyOf":[{"maximum":1440,"minimum":1,"type":"integer"},{"type":"null"}],"default":60,"description":"Minutes from now at which the window ends (default 60).","title":"To Offset"},"live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"False for timetable only.","title":"Live"}},"required":["crs_code"],"title":"get_rail_station_boardArguments","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_rail_service":{"post":{"operationId":"get_rail_service","summary":"Follow one train station by station: scheduled and live times, platforms and status of every call. Use for \"Where has tr","description":"Follow one train station by station: scheduled and live times, platforms and status of every call. Use for \"Where has train T15865 got to\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"trip_id":{"description":"Train trip id from a station board, for example 'T15865'.","maxLength":200,"title":"Trip Id","type":"string"},"live":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":true,"description":"False for timetable only.","title":"Live"}},"required":["trip_id"],"title":"get_rail_serviceArguments","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_rail_fares":{"post":{"operationId":"get_rail_fares","summary":"Get every adult fare between two Great Britain rail stations (Anytime, Off-Peak, Super Off-Peak, Advance) with route, re","description":"Get every adult fare between two Great Britain rail stations (Anytime, Off-Peak, Super Off-Peak, Advance) with route, restriction and validity; optionally with a railcard. Use for \"How much is a train ticket from Sheffield to Leeds\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"from_station":{"description":"Origin station code, for example 'SHF'.","maxLength":3,"title":"From Station","type":"string"},"to_station":{"description":"Destination station code, for example 'LDS'.","maxLength":3,"title":"To Station","type":"string"},"railcard":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Railcard code such as 'YNG' (16-25 Railcard).","title":"Railcard"},"fare_class":{"anyOf":[{"enum":["standard","first","all"],"type":"string"},{"type":"null"}],"default":"all","description":"Which class.","title":"Fare Class"}},"required":["from_station","to_station"],"title":"get_rail_faresArguments","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_disruptions":{"post":{"operationId":"list_disruptions","summary":"List current planned works, incidents and line status for bus, tram, National Rail and TfL modes, filterable by mode, se","description":"List current planned works, incidents and line status for bus, tram, National Rail and TfL modes, filterable by mode, severity, operator, line, stop or location. Use for \"What severe rail disruptions are there right now\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"mode":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated modes: bus, tram, rail, tube, dlr, overground, elizabeth-line.","title":"Mode"},"severity":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Comma-separated: severe, minor, information, good, unknown.","title":"Severity"},"atcocode":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only disruptions naming this stop (a rail CRS code works too).","title":"Atcocode"},"operator":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Operator name or code (substring match).","title":"Operator"},"line":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Line or route name (substring match).","title":"Line"},"lat":{"anyOf":[{"maximum":61,"minimum":49,"type":"number"},{"type":"null"}],"default":null,"description":"Latitude for a radius search.","title":"Lat"},"lon":{"anyOf":[{"maximum":3,"minimum":-9,"type":"number"},{"type":"null"}],"default":null,"description":"Longitude for a radius search.","title":"Lon"},"radius":{"anyOf":[{"maximum":50000,"minimum":50,"type":"integer"},{"type":"null"}],"default":2000,"description":"Radius in metres (default 2000, up to 50000).","title":"Radius"},"planned":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":null,"description":"True for planned works only, false for incidents only.","title":"Planned"},"limit":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":25,"description":"How many results (1 to 100).","title":"Limit"}},"title":"list_disruptionsArguments","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_airport_transport":{"post":{"operationId":"get_airport_transport","summary":"Get a Great Britain airport by IATA code with its terminals, nearby rail stations, bus, coach and tram stops with their ","description":"Get a Great Britain airport by IATA code with its terminals, nearby rail stations, bus, coach and tram stops with their lines, and nearby disruptions. Use for \"How do I reach Manchester Airport by public transport\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"iata":{"description":"Airport IATA code, for example 'MAN'.","maxLength":3,"title":"Iata","type":"string"}},"required":["iata"],"title":"get_airport_transportArguments","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_journey":{"post":{"operationId":"plan_journey","summary":"Plan public transport journeys between two points in Great Britain (bus, coach, rail, Underground, metro, tram, ferry) w","description":"Plan public transport journeys between two points in Great Britain (bus, coach, rail, Underground, metro, tram, ferry) with legs, live times, rail fares and CO2 estimates. Use for \"How do I get from Sheffield station to Leeds station by public transport\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"from_lat":{"description":"Origin latitude.","maximum":61,"minimum":49,"title":"From Lat","type":"number"},"from_lon":{"description":"Origin longitude.","maximum":3,"minimum":-9,"title":"From Lon","type":"number"},"to_lat":{"description":"Destination latitude.","maximum":61,"minimum":49,"title":"To Lat","type":"number"},"to_lon":{"description":"Destination longitude.","maximum":3,"minimum":-9,"title":"To Lon","type":"number"},"datetime":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"ISO 8601 departure time (UK time if no offset); default now.","title":"Datetime"},"arrive_by":{"anyOf":[{"type":"boolean"},{"type":"null"}],"default":false,"description":"True to treat datetime as the arrival time.","title":"Arrive By"},"max_walk_distance":{"anyOf":[{"maximum":5000,"minimum":100,"type":"integer"},{"type":"null"}],"default":null,"description":"Longest single walking leg in metres.","title":"Max Walk Distance"},"limit":{"anyOf":[{"maximum":10,"minimum":1,"type":"integer"},{"type":"null"}],"default":3,"description":"How many itineraries (1 to 10).","title":"Limit"}},"required":["from_lat","from_lon","to_lat","to_lon"],"title":"plan_journeyArguments","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}}}}