get_vehicle
Retrieve real-time location data for a specific bus using its vehicle ID. No caching ensures up-to-date position, and the pattern ID can be used to overlay the vehicle's route on a map.
Instructions
Fetch a vehicle's live location based on its id. This is real-time data and is always live, never cached. The returned 'pid' field can be passed to get_patterns to draw the vehicle's route shape.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vid | Yes | Vehicle id, e.g. the 'vid' field from a get_predictions_for_stop result. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |