---
title: "Get Live unique viewers via CDN"
method: GET
path: "/streaming/statistics/stream/viewers"
tags: ["Streaming Statistics"]
---

# Get Live unique viewers via CDN

`GET /streaming/statistics/stream/viewers`

Calculates time series of unique viewers of Live streams via CDN.

The statistics are taken from the data of CDN and work regardless of which player the views were made with.


Works similar to the method ```/statistics/cdn/uniqs```. But this allows you to break down data with the specified granularity: minutes, hours, days.


Based on this method, a graph of unique views in the Customer Portal is built.

![Unique viewers via CDN in Customer Portal](https://demo-files.gvideo.io/apidocs/cdn_unique_viewers.png)

## Query parameters

- `from` string, required
- `to` string, required
- `stream_id` integer
- `client_user_id` integer
- `granularity` '1m' | '5m' | '15m' | '1h' | '1d'

## Response `200`

OK

- object[]
  - `client` integer, required
  - `metrics` object, required
    - `streams` integer[], required

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.dev/g-core/apis/gcore-openapi.md) · [All operations](https://skmtc.dev/g-core/apis/gcore-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/g-core/gcore-openapi/revisions/09e652815095/schema)
