---
title: "Get Trips Stream"
method: GET
path: "/trips/stream"
tags: ["Trips"]
---

# Get Trips Stream

`GET /trips/stream`

## Request

- Base URL: `https://api.samsara.com`
- URL: `https://api.samsara.com/trips/stream`
- Auth: HTTP bearer

This endpoint will return trips that have been collected for your organization based on the time parameters passed in. Results are paginated.

 <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).

To use this endpoint, select **Read Trips** under the Trips 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>
 

 **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.

## Query parameters

- `includeAsset` boolean
- `completionStatus` 'inProgress' | 'completed' | 'all'
- `startTime` string, required
- `endTime` string
- `queryBy` 'updatedAtTime' | 'tripStartTime'
- `after` string
- `ids` string[], required

## Response `200`

OK response.

- TripsGetTripsResponseBody
  - `data` TripResponseBody[], required: List of trips
    - `asset` TripAssetResponseBody, required: Asset that the location readings are tied to
      - `id` string, required: Unique ID for the asset object that is reporting the location.
      - `name` string: Name for the asset object that is reporting the location. Only returns when `includeAsset` is set to `true`.
      - `type` 'uncategorized' | 'trailer' | 'equipment' | 'unpowered' | 'vehicle': Type for the asset object that is reporting the location. Only returns when `includeAsset` is set to `true`. Valid values: `uncategorized`, `trailer`, `equipment`, `unpowered`, `vehicle`
      - `vin` string: VIN for the asset object that is reporting the location. Only returns when `includeAsset` is set to `true`.
    - `completionStatus` 'inProgress' | 'completed', required: Trip completion status Valid values: `inProgress`, `completed`
    - `createdAtTime` string, required: [RFC 3339] Time the trip was created in Samsara in UTC.
    - `endLocation` LocationResponseResponseBody: Location object.
      - `accuracyMeters` number, double: Radial accuracy of gps location in meters. This will only return if strong GPS is not available.
      - `address` AddressResponseResponseBody: Closest address that the GPS latitude and longitude match to.
        - `city` string: The name of the city
        - `country` string: The country
        - `neighborhood` string: The name of the neighborhood if one exists
        - `pointOfInterest` string: Point that may be of interest to the user
        - `postalCode` string: The zip code
        - `state` string: The name of the state
        - `street` string: The street name
        - `streetNumber` string: Street number of the address
      - `geofence` GeofenceResponseResponseBody: Closest geofence based on 1000 meter radial search.
        - `externalIds` object: A map of external ids
        - `id` string: Unique ID of the geofence object.
      - `headingDegrees` integer, required: Heading of the asset in degrees. May be 0 if the asset is not moving.
      - `latitude` number, double, required: Latitude of the location of the asset.
      - `longitude` number, double, required: Longitude of the location of the asset.
    - `finalDistanceMeters` integer: Final distance driven in meters, calculated from GPS data. Only populated once the trip has completed (`completionStatus: completed`); null while the trip is in progress. Later corrections (e.g. late-arriving GPS data) are not signaled by updatedAtTime.
    - `startLocation` LocationResponseResponseBody, required: Location object.
      - `accuracyMeters` number, double: Radial accuracy of gps location in meters. This will only return if strong GPS is not available.
      - `address` AddressResponseResponseBody: Closest address that the GPS latitude and longitude match to.
        - `city` string: The name of the city
        - `country` string: The country
        - `neighborhood` string: The name of the neighborhood if one exists
        - `pointOfInterest` string: Point that may be of interest to the user
        - `postalCode` string: The zip code
        - `state` string: The name of the state
        - `street` string: The street name
        - `streetNumber` string: Street number of the address
      - `geofence` GeofenceResponseResponseBody: Closest geofence based on 1000 meter radial search.
        - `externalIds` object: A map of external ids
        - `id` string: Unique ID of the geofence object.
      - `headingDegrees` integer, required: Heading of the asset in degrees. May be 0 if the asset is not moving.
      - `latitude` number, double, required: Latitude of the location of the asset.
      - `longitude` number, double, required: Longitude of the location of the asset.
    - `tripEndTime` string: [RFC 3339] Time the trip ended in UTC.
    - `tripPurpose` 'unknown' | 'unassigned' | 'personal' | 'business' | 'commute': The driver-assigned purpose of the trip. Only populated for completed trips when your organization is licensed for mileage reporting; null while the trip is in progress or when not licensed. `unassigned` means the driver has not classified the trip. Reflects the explicit Driver App classification, not automatic classification. When a driver changes the purpose after the trip completes, the trip is re-served through the `updatedAtTime` feed with the new value. Valid values: `unknown`, `unassigned`, `personal`, `business`, `commute`
    - `tripStartTime` string, required: [RFC 3339] Time the trip started in UTC.
    - `updatedAtTime` string, required: [RFC 3339] Time the trip was updated in Samsara in UTC. Valid updates are when `endTime` populates, `completionStatus` changes values, or a driver changes the trip's `tripPurpose` after the trip has completed. To receive later purpose corrections, poll with `queryBy=updatedAtTime`; feed data trails real time by a few seconds.
  - `pagination` GoaPaginationResponseResponseBody, required: Pagination parameters.
    - `endCursor` 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

- `401`: Unauthorized response.
- `404`: Not Found response.
- `405`: Method Not Allowed response.
- `413`: Content Too Large response.
- `429`: Too Many Requests response.
- `500`: Internal Server Error response.
- `501`: Not Implemented response.
- `502`: Bad Gateway response.
- `503`: Service Unavailable response.
- `504`: Gateway Timeout response.
- `default`: Bad Request 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)
