---
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`

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.net/verkada/apis/api-tokens.md) · [All operations](https://skmtc.net/verkada/apis/api-tokens/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/verkada/api-tokens/revisions/4a79d2d949a6/schema)
