Skip to content

Get Location and Speed

Retrieve current location and speed data for one or more vehicles from Samsara.

getLocationAndSpeed

location

This operation has no required parameters.

OptionTypeDefaultDescription
Vehicle IDsstring-Comma-separated list of vehicle IDs to filter by. Leave empty to get all vehicles.
Tag IDsstring-Comma-separated list of tag IDs to filter vehicles by

Returns an array of location records:

{
"id": "281474976710655",
"name": "Truck 001",
"location": {
"latitude": 32.7767,
"longitude": -96.7970,
"heading": 180,
"speed": 55.5,
"time": "2024-01-15T14:30:00Z"
},
"reverseGeo": {
"formattedLocation": "123 Main St, Dallas, TX 75201"
}
}
{
"success": false,
"error": "API rate limit exceeded"
}
FieldTypeDescription
idstringVehicle ID
namestringVehicle name
location.latitudenumberGPS latitude
location.longitudenumberGPS longitude
location.headingnumberDirection in degrees
location.speednumberCurrent speed in mph
location.timestringTimestamp of the reading
reverseGeo.formattedLocationstringHuman-readable address
  • Missing API Token: Samsara credential is missing apiToken
  • Invalid Vehicle ID: One or more vehicle IDs not found
  • Rate Limiting: API rate limit exceeded