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

# Get unique viewers via CDN

`GET /streaming/statistics/cdn/uniqs`

Сounts the number of unique viewers of a video entity over CDN. It doesn't matter what player you used.

All unique viewers for the specified period of time are counted.


**How does it work?**

Calculating the number of unique viewers for a Live stream or VOD over CDN involves aggregating and analyzing various metrics to ensure each individual viewer is counted only once, regardless of how many times they connect or disconnect during the stream.

This method provides statistics for any video viewing by unique users, regardless of viewing method and a player you used. Thus, this is the most important difference from viewing through the built-in player:
- In method /statistics/uniqs viewers of the built-in player are tracked only.
- But this method tracks all viewers from everywhere.


This method is a combination of two other Live and VOD detailed methods. If you need detailed information, then see the methods: ```/statistics/stream/viewers``` and ```/statistics/vod/viewers```.


**Data Processing and Deduplication**

We us IP Address & User-Agent combination. Each unique combination of IP address and User-Agent string might be considered a unique viewer. 

This approach allows to accurately estimate the number of unique viewers. However, this is not foolproof due to NAT (Network Address Translation) and shared networks. Thus if your users fall under such restrictions, then the number of unique viewers may be higher than calculated.


**Why is there no "Unique Views" method?**

Based on CDN data, we can calculate the number of unique viewers only. Thus only your player will be able to count the number of unique views (clicks on the Play button) within the player session (i.e. how many times 1 unique viewer clicked the Play button within a unique player's session).

## Query parameters

- `date_from` string, required
- `date_to` string, required
- `type` 'live' | 'vod' | 'playlist'
- `id` string

## Response `200`

OK

- CdnUniqs
  - `data` object[]
    - `uniqs` integer, required
    - `type` string, 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)
