---
title: "Query public total views metrics"
method: GET
path: "/data/views/query/total/{playbackId}"
tags: ["metrics"]
---

# Query public total views metrics

`GET /data/views/query/total/{playbackId}`

Allows querying for the public metrics for viewership about a video.
This can be called from the frontend with a CORS key, or even
unauthenticated.

## Path parameters

- `playbackId` string, required

## Response `200`

A single Metric object with the viewCount and playtimeMins metrics.

- object — A simplified metric object about aggregate viewership of an asset. Either playbackId or dStorageUrl will be set.
  - `playbackId` PlaybackId — unresolved $ref
  - `dStorageUrl` DStorageUrl — unresolved $ref
  - `viewCount` ViewCount — unresolved $ref
  - `playtimeMins` PlaytimeMins — unresolved $ref

## Other responses

- `default` — Error

## Changes

- **2024-05-17** `fc477586b24c` — 3 breaking
  - the response property `errors` became optional for the status `default`
  - the response property `playtimeMins` became optional for the status `200`
  - the response property `viewCount` became optional for the status `200`
- **2024-04-23** `d0909f9b9414` — 2 info
  - api operation id `getPublicViewershipMetrics` was added
  - api tag `metrics` added

[Change history](https://skmtc.dev/livepeer/apis/livepeer-api-reference/changes/data/views/query/total/:playbackId/get.md)

---

[API](https://skmtc.dev/livepeer/apis/livepeer-api-reference.md) · [All operations](https://skmtc.dev/livepeer/apis/livepeer-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/livepeer/livepeer-api-reference/revisions/0d7e15217608/schema)
