Developer Resources

getvehicle

Get a vehicle's real-time location by vehicle_id.
Do not poll this more than once a minute per minute or attempt to retrieve data for every vehicle.

URL

https://developer.mtd.org/api/{version}/{format}/getvehicle

Remarks

These are live, vehicle-centric results based on GPS and the latest information in our system. We've tried to pack as much useful data into the results so you can use this in conjunction with the other methods to piece together all the information about a given vehicle in real-time.

Vehicles send their GPS position over a very limited bandwidth data-radio. Because of this they only update their position every minute or so. Do not poll for a specific vehicle more than once ever 60 seconds. There will be little use in doing this anyway as the information will probably not have changed.

The vehicle_id is unique to each vehicle and indicates the vehicle's model year (e.g. 1352 is from 2013).

Parameters

key (required) your API key
vehicle_id (required) id of the vehicle (e.g. 1352).

Response

vehicle_id vehicle number associated with vehicle
trip trip information for the departure
location the last known latitude and longitude of the vehicle
previous_stop_id The last stop that the vehicle served
next_stop_id The next stop that the vehicle will serve
origin_stop_id The stop where the vehicle began it's trip
destination_stop_id The stop where the vehicle will end its trip
last_updated The last time the vehicle sent a real-time location update to our system.

Sample