---
title: "Locations feed"
method: GET
path: "/fleet/vehicles/locations/feed"
tags: ["Vehicle Locations"]
---

# Locations feed

`GET /fleet/vehicles/locations/feed`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/fleet/vehicles/locations/feed`
- Auth: HTTP bearer

***NOTE: The Vehicle Locations API is an older API that does not combine GPS data with onboard diagnostics. Try our new [Vehicle Stats API](ref:getvehiclestatsfeed) instead.***

Follow a continuous feed of all vehicle locations from Samsara Vehicle Gateways.

Your first call to this endpoint will provide you with the most recent location for each vehicle and a `pagination` object that contains an `endCursor`.

You can provide the `endCursor` to the `after` parameter of this endpoint to get location updates since that `endCursor`. 

If `hasNextPage` is `false`, no updates are readily available yet. We'd suggest waiting a minimum of 5 seconds before requesting updates.

Related guide: <a href="/docs/vehicle-locations-1" target="_blank">Vehicle Locations</a>. 

 **Submit Feedback**: Likes, dislikes, and API feature requests should be filed as feedback in our <a href="https://forms.gle/zkD4NCH7HjKb7mm69" target="_blank">API feedback form</a>. If you encountered an issue or noticed inaccuracies in the API documentation, please <a href="https://www.samsara.com/help" target="_blank">submit a case</a> to our support team.

To use this endpoint, select **Read Vehicle Statistics** under the Vehicle category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>

## Query parameters

- `after` string
- `parentTagIds` string[]
- `tagIds` string[]
- `vehicleIds` string[]

## Response `200`

List of locations events for the specified vehicles.

- VehicleLocationsListResponse: List of vehicle location events and pagination info.
  - `data` VehicleLocationsListResponseData[], required: A list of vehicles and an array of location events for each vehicle.
    - `id` string, required: The unique Samsara ID of the Vehicle. This is automatically generated when the Vehicle object is created. It cannot be changed.
    - `locations` VehicleLocation[], required: A list of location events for the given vehicle.
      - `heading` number, double: Heading of the vehicle in degrees.
      - `latitude` number, double, required: GPS latitude represented in degrees
      - `longitude` number, double, required: GPS longitude represented in degrees
      - `reverseGeo` ReverseGeo: Reverse geocoded information.
        - `formattedLocation` string: Formatted address of the reverse geocoding data.
      - `speed` number, double: GPS speed of the vehicle in miles per hour. See `isEcuSpeed` to determine speed data source.
      - `time` string, required: UTC timestamp in RFC 3339 format. Example: `2020-01-27T07:06:25Z`.
    - `name` string, required: The human-readable name of the Vehicle. This is set by a fleet administrator and will appear in both Samsara’s cloud dashboard as well as the Samsara Driver mobile app. **By default**, this name is the serial number of the Samsara Vehicle Gateway. It can be set or updated through the Samsara Dashboard or through the API at any time.
  - `pagination` PaginationResponse, required: Pagination parameters.
    - `endCursor` string, string, required: Cursor identifier representing the last element in the response. This value should be used in conjunction with a subsequent request's 'after' query parameter. This may be an empty string if there are no more pages left to view.
    - `hasNextPage` boolean, required: True if there are more pages of results immediately available after this endCursor.

## Other responses

- `default`: Error response

---

[API](https://skmtc.dev/samsara/apis/samsara-api.md) - [All operations](https://skmtc.dev/samsara/apis/samsara-api/llms.txt) - [OpenAPI document](https://skmtc.dev/samsara/apis/samsara-api/revisions/a9e35d4999be?raw)
