Get Real-Time Vehicle Positions
onebusaway_get_vehiclesReal-time positions of all active vehicles for an agency. Optionally filter to a single route (client-side). Returns GPS coordinates, heading, schedule deviation, and current trip. Useful for "where are all the buses on route X right now?" Use agencyId values from onebusaway_list_agencies.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| routeId | No | Optional agency-prefixed route ID to filter results to one route. Filtering is client-side — all agency vehicles are fetched first. | |
| agencyId | Yes | Agency ID (e.g. "1" for Metro Transit, "40" for Sound Transit). Use onebusaway_list_agencies to discover IDs. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of vehicles returned after any route filter. | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Guidance when no vehicles were found — e.g. the route may not be currently active, or the agency may not have real-time data. | |
| routeId | No | Route ID filter applied client-side, if any. | |
| agencyId | No | Agency ID queried. | |
| vehicles | No | Active vehicles for the agency, optionally filtered by route. | |
| limitExceeded | No | True if the upstream capped the vehicle list — some vehicles were omitted. This endpoint has no pagination to retrieve them. |