Onebusaway Mcp Server

io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.4.0更新於 Nov 14, 2026

Real-time transit stops, routes, arrivals, vehicle positions, and schedules via OneBusAway APIs.

已驗證Streamable HTTP可網頁執行位置與生活資料與分析

概覽

AI 產生的概覽

透過 OneBusAway 介面查詢公車站牌、路線、即時到站、車輛位置、服務提醒與時刻表。

可以做什麼
  • 列出營運機構,並依位置、名稱或站牌編號尋找或搜尋站牌與路線
  • 取得單一站牌或路線的詳細資料,並列出某機構營運的所有路線
  • 查詢站牌的即時到站與發車資訊,以及整合到站資訊與提醒詳情的站牌脈絡
  • 依 situation ID 讀取服務提醒,包含原因、嚴重程度、受影響的站牌與路線及生效時段
  • 檢視行程與車輛班次區塊:停靠順序、即時狀態,以及一輛車在一個服務日內執行的所有行程
  • 取得站牌或路線的全日時刻表,以及某機構的即時車輛位置
適用情境
當助理需要回答 OneBusAway 涵蓋地區的大眾運輸問題時使用,例如下一班車何時到、哪些路線經過某個站牌、車輛是否誤點,或某則服務提醒的內容。也適合依日期取得站牌或路線的靜態時刻表。
執行需求
可使用公開託管的 Streamable HTTP 端點,或透過 npx、bunx、Docker 在本機執行(需 Bun 1.4.4+ 或 Node.js 24+)。需要環境變數 ONEBUSAWAY_API_KEY 中的 OneBusAway API 金鑰;值 TEST 可用於預設的 Puget Sound 執行個體,其他執行個體需註冊金鑰並設定 ONEBUSAWAY_BASE_URL。需要能連線至上游執行個體的網路。
安裝前請注意
API 金鑰以環境變數傳入,所有呼叫端共用同一上游速率額度,取不到配額時請求會以 rate_limited 失敗。此伺服器對運輸資料僅供讀取,不提供行程規劃。自行以 HTTP 方式託管時,可選的驗證模式(none、jwt、oauth)預設為 none,公開部署時需自行強化端點。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Onebusaway Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.cyanheads%2Fonebusaway-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "onebusaway": {
      "type": "http",
      "url": "https://onebusaway.caseyjhand.com/mcp"
    }
  }
}

README

@cyanheads/onebusaway-mcp-server

Query stops, routes, real-time arrivals, vehicle positions, and schedules from OneBusAway transit APIs via MCP. STDIO or Streamable HTTP.

16 Tools • 2 Resources


Overview

Real-time transit from OneBusAway, set up for Puget Sound (King County Metro, Sound Transit, Pierce Transit, Community Transit, and more) and compatible with any OneBusAway instance. Find stops and routes, track live arrivals and vehicle positions, and pull schedules and service alerts.

Tools

ToolDescription
onebusaway_list_agenciesList the transit agencies on the instance, with IDs, contact info, and coverage area
onebusaway_find_stopsFind stops near a lat/lon, optionally filtered by stop code
onebusaway_search_stopsResolve a stop name to a stop ID
onebusaway_get_stopFetch one stop by ID
onebusaway_find_routesFind routes near a lat/lon, optionally filtered by name or number
onebusaway_search_routesResolve a route name or number to a route ID
onebusaway_get_routeFetch one route by ID
onebusaway_list_routes_for_agencyList every route an agency operates
onebusaway_get_arrivalsReal-time arrivals and departures at a stop, with schedule deviation, vehicle positions, and active alerts
onebusaway_get_stop_contextStop details, real-time arrivals, and full detail for every alert at the stop, from one upstream request
onebusaway_get_alertFull service alert detail by situation ID
onebusaway_get_tripReal-time status and stop sequence for a trip
onebusaway_get_blockEvery trip one vehicle runs in a service day, in order, with stop times
onebusaway_get_vehiclesReal-time positions in a vehicle agency's namespace, optionally filtered by route
onebusaway_get_schedule_for_stopFull-day departure schedule for a stop, by route and direction
onebusaway_get_schedule_for_routeFull-day schedule for a route: every trip and its stop sequence

Resources

ResourceDescription
onebusaway://stop/{stopId}Stop metadata: name, coordinates, served routes, wheelchair accessibility
onebusaway://route/{routeId}Route metadata: short name, description, agency, schedule URL

The same data is available to tool-only clients through onebusaway_get_stop and onebusaway_get_route.

Capability reference

onebusaway_list_agencies tool

  • No input; returns agencies with IDs, contact info, timezones, coverage centers, and full coverage widths in degrees
  • limitExceeded flags an upstream-capped list, with no pagination to fetch the rest

onebusaway_find_stops tool

  • lat and lon are required. The radius defaults to 300 m and caps at 1600 m. The optional query matches the stop code printed on the sign
  • Each stop carries id, code, direction, wheelchairBoarding (ACCESSIBLE / NOT_ACCESSIBLE / UNKNOWN), all routeIds, and routes with id, shortName, and agencyId where the response includes a matching reference
  • limitExceeded flags upstream truncation

onebusaway_search_stops tool

  • query (stop name fragment) required; maxCount defaults to 10 and caps at 3500. For a code from a stop sign, use onebusaway_find_stops with the stop's approximate location and code as query
  • Same stop shape as onebusaway_find_stops. limitExceeded means OneBusAway reported more matching stops than it returned

onebusaway_get_stop tool

  • Single stopId; returns the same stop record as onebusaway_find_stops
  • Unknown IDs fail as stop_not_found, with recovery via onebusaway_find_stops or onebusaway_search_stops

onebusaway_find_routes tool

  • lat and lon are required. The radius defaults to 500 m and caps at 1600 m. Set both latSpan and lonSpan for a box search and omit the radius. The optional query filters by route name or number
  • Each route carries shortName, longName, agencyId, GTFS type (0=tram … 5=cable_car), color, and schedule url; limitExceeded means more routes exist in the area

onebusaway_search_routes tool

  • query (route name or number) required; maxCount defaults to 10 and caps at 6000
  • Returns shortName, longName, agencyId, and GTFS type. limitExceeded means OneBusAway reported more matching routes than it returned
  • Search can return an empty list for a known route. Use onebusaway_find_routes near the service area or onebusaway_list_routes_for_agency to check the agency's routes

onebusaway_get_route tool

  • Single routeId; returns shortName, longName, description, agency, GTFS type, color, and schedule url
  • Unknown IDs fail as route_not_found, with recovery via onebusaway_find_routes or onebusaway_list_routes_for_agency

onebusaway_list_routes_for_agency tool

  • agencyId required; unknown agencies fail as agency_not_found
  • Every route with shortName, longName, GTFS type, color, and url; limitExceeded flags an upstream-capped list with no pagination

onebusaway_get_arrivals tool

  • stopId is required. The window uses nonnegative integers for minutesBefore (default 5, cap 60) and minutesAfter (default 35, cap 240). For later departures, use onebusaway_get_schedule_for_stop
  • Compare predictedArrivalTime with scheduledArrivalTime for deviation at the stop. scheduleDeviation is the vehicle's current deviation in seconds, positive when late and meaningful when predicted is true
  • stopsAway is the queried stop's block sequence minus the vehicle's next stop block sequence. Zero can also mean unavailable
  • Active alerts arrive in situations[]: those on the stop itself plus those linked from each arrival's situationIds, each once

onebusaway_get_stop_context tool

  • Same input as onebusaway_get_arrivals, and the same stop_not_found / rate_limited failures; one call issues one upstream request
  • Returns stop (the onebusaway_get_stop fields without routeIds and routes), arrivals in the onebusaway_get_arrivals shape, and alerts in the onebusaway_get_alert shape, including stop-wide alerts
  • When the upstream response omits the stop, stop is null; a referenced alert missing from the response is left out; either way a notice names the tool to fetch it with

onebusaway_get_alert tool

  • Single situationId, from onebusaway_get_arrivals (situations[].id or arrivals[].situationIds); unknown IDs fail as situation_not_found
  • Returns a TPEG reason code, severity, consequenceMessage, affects (agency, route, stop, or trip scope), consequences with diversion stop IDs, and activeWindows

onebusaway_get_trip tool

  • tripId required; serviceDateMs (non-negative integer, midnight local) only for a trip on a previous service day; includeSchedule (default true) adds the stop sequence with GTFS times and distanceAlongTripMeters
  • When present, status.activeTripId identifies the trip the live status describes, and status.blockTripSequence gives its sequence within the block when available. The top-level tripId and schedule refer to the requested trip. Use a non-null blockId with onebusaway_get_block
  • Fails as trip_not_found when the trip isn't active for the service date; a completed trip's times come from onebusaway_get_schedule_for_route

onebusaway_get_block tool

  • Single blockId, from onebusaway_get_trip; unknown IDs fail as block_not_found
  • Top-level trips, activeServiceIds, and inactiveServiceIds describe the first returned configuration; alternateConfigurations preserves every remaining configuration in order. Service IDs are calendar conditions, not a claim that a configuration operates today
  • Each trip carries distanceAlongBlock, accumulatedSlackTime (layover seconds), and blockStopTimes. Optional exact tripId or departureFromSec / departureBeforeSec selects complete trips independently in every configuration, retaining empty configuration slots
  • With selectors, selection.total / returned count trip occurrences across configurations; configurationCounts[0] describes the top-level configuration, then one entry per alternative

Example: {"blockId":"<blockId from onebusaway_get_trip>","departureFromSec":86400,"departureBeforeSec":90000} selects trips with any departure from 24:00 inclusive to 25:00 exclusive, retaining their complete stop sequences.


onebusaway_get_vehicles tool

  • agencyId is the vehicle ID's agency namespace. Use the prefix of a known vehicleId from an arrival or trip. A route's operating agency can differ. The optional routeId filters that namespace's results by exact route ID
  • Each vehicle carries position, orientation, phase, scheduleDeviation, tripId, nextStop, and predicted (reporting real-time GPS); limitExceeded flags an upstream-capped list with no pagination
  • tripId prefers the active trip; route and headsign metadata resolve only from that trip. orientation preserves counter-clockwise degrees from east (0=east, 90=north, 180=west, 270=south), not a compass bearing
  • Records missing latitude or longitude are skipped: omittedWithoutPosition counts them across the agency, and omittedWithoutPositionOnRoute counts resolved matches when filtering by route. These counts are independent of upstream truncation

onebusaway_get_schedule_for_stop tool

  • stopId required; optional date as a real YYYY-MM-DD calendar date, default (omitted or blank) today in the agency's timezone; unknown stops fail as stop_not_found
  • Departures grouped by route and direction, each with scheduledDepartureTime and tripId
  • serviceDateMs preserves the upstream schedule-date marker: query time for an omitted/blank date, instance-local midnight for an explicit date; it is not rounded to a service-day boundary
  • Optional routeId, departureFromMs, and departureBeforeMs combine with AND; time bounds are non-negative integer Unix milliseconds, lower inclusive and upper exclusive. Selected results omit empty directions/routes; selection.total / returned count departure rows before/after selection
  • Static schedule only; live predictions come from onebusaway_get_arrivals

Example: {"stopId":"1_75403","routeId":"1_100259","departureFromMs":1792882800000,"departureBeforeMs":1792886400000} selects that route's departures in the given epoch interval.


onebusaway_get_schedule_for_route tool

  • routeId required; optional date as a real YYYY-MM-DD calendar date, default (omitted or blank) today; unknown routes fail as route_not_found
  • Every trip that day with tripId, tripHeadsign, serviceId, and its stop sequence
  • serviceDateMs preserves the upstream route scheduleDate, identifying the schedule's service day
  • Route, stop, headsign, and service metadata resolve from references first, retaining legacy metadata and grouping fallbacks where reference fields are absent or empty
  • Optional exact tripId or departureFromSec / departureBeforeSec selects whole trips having any departure in the interval. Bounds are non-negative integer GTFS seconds from midnight, including values beyond 86400; lower inclusive, upper exclusive. selection.total / returned count trips before/after selection
  • Static schedule only; live predictions come from onebusaway_get_arrivals at a stop

Example: {"routeId":"1_100259","departureFromSec":28800,"departureBeforeSec":32400} selects trips with any departure from 08:00 inclusive to 09:00 exclusive.

For route and block schedules, a nonblank tripId cannot be combined with departure bounds. Blank optional IDs mean omitted; either bound may be omitted, and two supplied bounds must increase. Without selectors, all three tools return their complete mapped response with no selection metadata or default cap. Selection counts describe only that upstream response, not omitted upstream service; a zero match is a successful result with a notice.

Arrivals, stop context, trips, vehicles, schedules, and alerts include a validated IANA timezone; epoch clocks and date headings carry that zone explicitly. Stop tools use the queried stop's agency namespace, vehicles the requested agency, and trip/route schedules the referenced route's agency. Each alert resolves its own agency, route, trip, and stop scopes and uses their zone only when every scope resolves and agrees. Missing, invalid, unresolved, or conflicting zones use UTC, without additional requests. Epoch numbers and GTFS seconds remain unchanged, including schedule times beyond 24:00.


onebusaway://stop/{stopId} resource

  • Stop record as application/json, the same shape onebusaway_get_stop returns
  • stopId comes from onebusaway_find_stops or onebusaway_search_stops

onebusaway://route/{routeId} resource

  • Route record as application/json, the same shape onebusaway_get_route returns
  • routeId comes from onebusaway_find_routes or onebusaway_list_routes_for_agency

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

OneBusAway-specific:

  • Wraps onebusaway-sdk with typed error classification (NotFound, RateLimited, ValidationError for an upstream 400, ServiceUnavailable)
  • Defaults to the Puget Sound instance (api.pugetsound.onebusaway.org), where ONEBUSAWAY_API_KEY=TEST works for development; ONEBUSAWAY_BASE_URL points it at any other OneBusAway instance
  • Stop and route IDs are agency-prefixed, {agencyId}_{localId} (stop 1_75403, route 1_100259). Pass raw IDs from the configured instance as tool arguments. Resource URIs accept URI encoding for their ID segment
  • One shared pacer, sized by ONEBUSAWAY_RATE_LIMIT_*, queues every upstream request against the API key's budget; a call that gets no slot within the wait cap fails as retryable rate_limited with data.retryAfter, on any tool
  • Transit data only, no trip planning; server-level instructions walk agents through the ID format and the common lookup chains

Agent-friendly output:

  • predicted on every arrival, trip, and vehicle separates GPS-tracked data from schedule-only projections
  • Machine-readable times: scheduleDeviation in seconds; arrival, stop-schedule, and update timestamps in Unix milliseconds; trip, route-schedule, and block stop times in GTFS seconds from midnight
  • Chainable IDs: stopId from the stop tools feeds arrivals, tripId feeds onebusaway_get_trip, blockId feeds onebusaway_get_block, situationIds feed onebusaway_get_alert, and agencyId feeds vehicles and route listing
  • Typed error contracts whose recovery hints name the next tool to call, plus a notice on empty or truncated results

Getting started

Public Hosted Instance

A public instance is available at https://onebusaway.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:

json
{  "mcpServers": {    "onebusaway-mcp-server": {      "type": "streamable-http",      "url": "https://onebusaway.caseyjhand.com/mcp"    }  }}

Self-Hosted / Local

Add the following to your MCP client configuration file. ONEBUSAWAY_API_KEY=TEST works on the Puget Sound instance without registration.

json
{  "mcpServers": {    "onebusaway-mcp-server": {      "type": "stdio",      "command": "bunx",      "args": ["@cyanheads/onebusaway-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info",        "ONEBUSAWAY_API_KEY": "TEST"      }    }  }}

Or with npx (no Bun required):

json
{  "mcpServers": {    "onebusaway-mcp-server": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@cyanheads/onebusaway-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info",        "ONEBUSAWAY_API_KEY": "TEST"      }    }  }}

Or with Docker:

json
{  "mcpServers": {    "onebusaway-mcp-server": {      "type": "stdio",      "command": "docker",      "args": [        "run", "-i", "--rm",        "-e", "MCP_TRANSPORT_TYPE=stdio",        "-e", "ONEBUSAWAY_API_KEY=TEST",        "ghcr.io/cyanheads/onebusaway-mcp-server:latest"      ]    }  }}

For Streamable HTTP, set the transport and start the server:

sh
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 ONEBUSAWAY_API_KEY=TEST bun run start:http# Server listens at http://localhost:3010/mcp

Prerequisites

  • Bun v1.4.4 or higher (or Node.js v24+).
  • A OneBusAway API key. TEST works on the Puget Sound instance for development; for production use or other instances, register at the relevant agency's developer portal.

Installation

  1. Clone the repository:
sh
git clone https://github.com/cyanheads/onebusaway-mcp-server.git
  1. Navigate into the directory:
sh
cd onebusaway-mcp-server
  1. Install dependencies:
sh
bun install
  1. Configure environment:
sh
cp .env.example .env# edit .env — set ONEBUSAWAY_API_KEY if needed

Configuration

VariableDescriptionDefault
ONEBUSAWAY_API_KEYOneBusAway API key. TEST works on the Puget Sound instance.TEST
ONEBUSAWAY_BASE_URLBase URL of the OneBusAway instance.https://api.pugetsound.onebusaway.org
ONEBUSAWAY_CLAMP_LIMITSApply the documented caps to over-limit search counts, radii, and arrival windows. Each reduction reports the requested and applied values. Set false to reject over-cap inputs.true
ONEBUSAWAY_RATE_LIMIT_REQUESTSUpstream requests allowed per window, shared by all callers.20
ONEBUSAWAY_RATE_LIMIT_WINDOW_MSWidth of the sliding rate window, in ms.60000
ONEBUSAWAY_RATE_LIMIT_MAX_WAIT_MSLongest a call waits for a slot before failing as rate_limited, in ms. Keep it under the SDK's 60 s request timeout.45000
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTHTTP server port.3010
MCP_SESSION_MODEHTTP session mode: stateless, stateful, or auto.stateless
MCP_AUTH_MODEAuthentication: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (debug, info, notice, warning, error).info
LOGS_DIRDirectory for log files. Relative paths resolve inside the server package. Use an absolute path to write elsewhere.<server-package>/logs
STORAGE_PROVIDER_TYPEStorage backend: in-memory, filesystem, supabase, cloudflare-kv/r2/d1.in-memory
OTEL_ENABLEDEnable OpenTelemetry.false

See .env.example for the full list of optional overrides.

Running the server

Local development

  • Build and run the production version:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:http# orbun run start:stdio
  • Run checks and tests:

    sh
    bun run devcheck       # Lint, format, typecheck, security, changelog syncbun run test           # Vitest test suitebun run test:coverage  # Test suite with coverage, held to the framework thresholdsbun run lint:mcp       # Validate MCP definitions against spec

Docker

sh
docker build -t onebusaway-mcp-server .docker run --rm -e ONEBUSAWAY_API_KEY=TEST -p 3010:3010 onebusaway-mcp-server

The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/onebusaway-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/index.tscreateApp() entry point: registers tools and resources, sets server instructions, inits the OneBusAway service.
src/configServer-specific env var parsing and validation with Zod.
src/mcp-server/toolsTool definitions (*.tool.ts) plus the schemas and format helpers they share.
src/mcp-server/resourcesStop and route resource definitions (*.resource.ts).
src/services/onebusawayOneBusAway service: wraps onebusaway-sdk, paces upstream requests, classifies errors; domain types.
tests/Vitest tests for the tools, resources, service, and config.

Development guide

See CLAUDE.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for request-scoped logging, ctx.state for tenant-scoped storage
  • Register new tools and resources in the createApp() arrays in src/index.ts
  • Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields

Contributing

Issues are welcome. Run checks and tests before submitting:

sh
bun run devcheckbun run test

License

Apache-2.0 — see LICENSE for details.

Transit data from the default Puget Sound OneBusAway API, operated by Sound Transit and King County Metro, is governed by the Sound Transit Transit Data Terms of Use, and users of the hosted endpoint receive it under those terms. Key obligations:

  • Clause 2: usage metrics are available on request.
  • Clause 3: data is fetched live from the OneBusAway API and is not modified or cached beyond the request cycle.
  • Clause 4: you agree to pass substantially similar terms through to any users you provide this data to.
  • Clause 7: this server does not use Sound Transit trademarks in its name or branding.

來源:README.md,提交 422d190

工具

16

onebusaway_list_agencies

List Transit Agencies

List all transit agencies served by this OneBusAway instance. Returns agency IDs, names, contact info, timezone, and geographic coverage center. Agency IDs are needed for onebusaway_list_routes_for_agency and onebusaway_get_vehicles.

無需輸入參數。

onebusaway_find_stops

Find Stops Near Location

Find bus stops near a location. Returns stops within a radius, each with ID, name, direction, served routes, and wheelchair boarding status. Use stopId values from results to fetch real-time arrivals with onebusaway_get_arrivals. Optionally filter by stop code (the number printed on the stop sign, e.g. "75403").

輸入參數lat必填lon必填queryradius

onebusaway_find_routes

Find Routes Near Location

Find transit routes near a location, optionally filtered by name or number. Returns routes with IDs, short names, and descriptions. Use routeId values to fetch schedules, vehicles, or stop sequences.

輸入參數lat必填lon必填queryradiuslatSpanlonSpan

onebusaway_search_stops

Search Stops by Name

Search for stops by name on instances that support name search. Returns matching stops with IDs and coordinates. For a stop code, use onebusaway_find_stops with nearby coordinates and the code as query.

輸入參數query必填maxCount

onebusaway_search_routes

Search Routes by Name or Number

Search for routes by name or number on instances that support name search. Returns matching routes with IDs. For route discovery use onebusaway_find_routes near the service area or onebusaway_list_routes_for_agency with a known agency ID.

輸入參數query必填maxCount

onebusaway_get_stop

Get Stop Details

Fetch details for a specific stop by ID. Returns the stop's name, coordinates, direction, served routes, and wheelchair accessibility. Stop IDs use agency-prefixed format: {agencyId}_{localId} (e.g. "1_75403" for Metro Transit stop 75403).

輸入參數stopId必填

onebusaway_get_route

Get Route Details

Fetch details for a specific route by ID. Returns short name, description, agency, route type, and schedule URL. Route IDs use agency-prefixed format: {agencyId}_{localId} (e.g. "1_100259").

輸入參數routeId必填

onebusaway_list_routes_for_agency

List Routes for Agency

List all routes operated by an agency. Returns route IDs, short names, and descriptions. Use to enumerate an agency's full service before searching for a specific route. Get agencyId values from onebusaway_list_agencies.

輸入參數agencyId必填

onebusaway_get_arrivals

Get Real-Time Arrivals

Real-time arrivals and departures at a stop. Returns predicted arrival times, current vehicle schedule deviation, vehicle positions, and active service alerts. The predicted boolean on each arrival indicates whether GPS tracking backs the estimate — predicted=false means schedule-only. Use tripId from results for follow-up onebusaway_get_trip calls. Stop IDs use agency-prefixed format: {agencyId}_{localId} (e.g. "1_75403").

輸入參數stopId必填minutesAfterminutesBefore

onebusaway_get_stop_context

Get Stop Context

Get stop details, real-time arrivals, and available details for alerts on the stop or its arrivals from one upstream response. Use onebusaway_get_stop for served-route IDs and available route summaries. Pass a raw agency-prefixed stop ID (e.g. "1_75403").

輸入參數stopId必填minutesAfterminutesBefore

onebusaway_get_alert

Get Service Alert Detail

Fetch full detail for a service alert (situation) by ID. Returns the summary, description, reason (e.g. detour, construction), affected stops and routes, consequence description, and active time windows. Situation IDs appear in onebusaway_get_arrivals responses under situationIds and situations[].id.

輸入參數situationId必填

onebusaway_get_trip

Get Trip Status

Get the requested trip’s stop sequence and the vehicle status reported for its block. The status may describe a different active trip in the same block. Use the raw tripId from onebusaway_get_arrivals or a schedule lookup.

輸入參數tripId必填serviceDateMsincludeSchedule

onebusaway_get_block

Get Block Schedule

Fetch block trip sequences with their stop times and service-calendar conditions. Top-level fields describe the first returned configuration; every remaining alternative is included without choosing a calendar date. Optionally select an exact tripId or complete trips having any departure in a half-open GTFS-seconds interval, independently in every configuration; selection counts trip occurrences before and after filtering. Without selectors, returns all trips with no default cap. Block IDs appear as blockId in onebusaway_get_trip responses; obtain a tripId from onebusaway_get_arrivals first.

輸入參數tripIdblockId必填departureFromSecdepartureBeforeSec

onebusaway_get_vehicles

Get Real-Time Vehicle Positions

Real-time positions of active vehicles for an agency. Optionally filter to a single route (client-side). Returns GPS coordinates, counter-clockwise orientation from east, schedule deviation, and current trip. Reports agency records omitted for missing position coordinates. Use agencyId values from onebusaway_list_agencies.

輸入參數routeIdagencyId必填

onebusaway_get_schedule_for_stop

Get Stop Schedule

Full-day departure schedule for a stop. Lists every departure by route and direction for the specified date (defaults to today). Optionally filter departure rows by routeId and a half-open Unix-millisecond interval; selection includes counts before and after filtering. Without selectors, returns the complete mapped schedule with no default cap. For live predictions, use onebusaway_get_arrivals instead.

輸入參數datestopId必填routeIddepartureFromMsdepartureBeforeMs

onebusaway_get_schedule_for_route

Get Route Schedule

Full-day schedule for a route — all trips, stop sequences, and departure times for the specified date (defaults to today). Optionally select an exact tripId or complete trips having any departure in a half-open GTFS-seconds interval; selection includes counts before and after filtering. Without selectors, returns all mapped trips with no default cap. For live predictions, use onebusaway_get_arrivals at specific stops instead.

輸入參數datetripIdrouteId必填departureFromSecdepartureBeforeSec

版本歷史

6
  1. v0.4.0最新Nov 14, 2026
  2. v0.3.0Oct 26, 2026
  3. v0.2.1Oct 9, 2026
  4. v0.2.0Sep 25, 2026
  5. v0.1.15Sep 20, 2026
  6. v0.1.14Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分