Get Real-Time Arrivals
onebusaway_get_arrivalsReal-time arrivals and departures at a stop. Returns predicted arrival times, schedule deviation (how many seconds late/early), vehicle positions, and any 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").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stopId | Yes | Agency-prefixed stop ID (e.g. "1_75403" for Metro Transit stop 75403). Use onebusaway_find_stops or onebusaway_search_stops to discover IDs. | |
| minutesAfter | No | Include arrivals expected within the next N minutes. Defaults to 35. | |
| minutesBefore | No | Include arrivals that departed up to this many minutes ago. Defaults to 5. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of arrivals in the time window. | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Guidance when no arrivals were found — e.g. try expanding the time window or check for service alerts. | |
| stopId | No | The queried stop ID. | |
| arrivals | No | Arrivals and departures at this stop within the requested time window. | |
| stopName | No | Stop name. | |
| situations | No | Active service alerts referenced by arrivals at this stop. | |
| currentTime | No | Server time as Unix milliseconds, for computing countdown timers. | |
| queriedStop | No | Stop ID queried. | |
| windowMinutes | No | Time window used for the arrivals query. |