---
title: "Get Occupancy Trend Data"
method: GET
path: "/cameras/v1/analytics/occupancy_trends"
tags: ["Analytics"]
---

# Get Occupancy Trend Data

`GET /cameras/v1/analytics/occupancy_trends`

## Request

- Base URL: `https://api.verkada.com`
- URL: `https://api.verkada.com/cameras/v1/analytics/occupancy_trends`
- Auth: one of:
  - API key in header `x-verkada-auth`
  - API key in header `x-api-key`

Returns all occupancy trends data for a particular camera over a specified time range.

Responses will include the start and end time of the data requested and device information (ID, serial number) alongside the readings.

## Query parameters

- `camera_id` string, required: The unique identifier of the camera.
- `start_time` integer: The start of the time range for occupancy trends. Formatted as a Unix timestamp in seconds. Defaults to an hour from the current time.
- `end_time` integer: The end of the time range for occupancy trends. Formatted as a Unix timestamp in seconds. Defaults to the current time.
- `interval` '15_minutes' | '1_hour' | '1_day': An enumeration.
- `type` 'person' | 'vehicle': An enumeration.
- `preset_id` string: The unique identifier of the camera preset.

## Response `200`

OK

- OccupancyTrendsResponseV1
  - `camera_address` string: The address of the site for the camera.
  - `camera_id` string: The unique identifier of the camera.
  - `camera_name` string: The name of the camera.
  - `camera_site` string: The name of the site for the camera.
  - `end_time` integer: The end of the time range for occupancy trends.
  - `org_id` string: The unique identifier of the organization.
  - `org_name` string: The name of the organization.
  - `preset_id` string: The unique identifier of the camera preset.
  - `start_time` integer: The start of the time range of occupancy trends.
  - `trend_in` array[]: An array with range timestamps, and count for “in” direction.
    - integer[]
  - `trend_out` array[]: An array with range timestamps, and count for “out” direction.
    - integer[]
  - `type` 'person' | 'vehicle': An enumeration.

---

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