get
https://data.pandavideo.com/retention/
Retrieve the retention metrics for a specific variant video of an A/B test.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
GET /retention/{video_id}
{video_id}Returns the retention curve of a video over a date range — i.e. how many viewers are still watching at each second of the video. Used by the A/B Testing UI to render the Retention chart per variant.
Different host:data.pandavideo.comThis endpoint lives on
https://data.pandavideo.com, not onapi-v2.pandavideo.com.br. Same host as A/B Test Plays Rate.
AuthorizationRequires a valid API Key in the
Authorizationheader. Send the key directly — noBearerprefix.
HTTP Method & Path
GET /retention/{video_id}?a=1&start_date=<YYYY-MM-DD>&end_date=<YYYY-MM-DD>
Base URL: https://data.pandavideo.com
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
video_id | string (uuid) | yes | Video to fetch retention for. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
a | integer | yes | Must be 1. Internal flag the analytics service uses to switch the retention computation mode; the dashboard always sends 1. |
start_date | string (YYYY‑MM‑DD) | yes | Inclusive start. |
end_date | string (YYYY‑MM‑DD) | yes | Inclusive end. |
Why?a=1? This is a known inconsistency between the two analytics endpoints —plays-rateis gated by?type=video, retention by?a=1. There is no documented alternate value, but both endpoints reject the request when the gate is missing.
Response
Success Response (200)
{
"retention": {
"0": 100,
"1": 99,
"5": 92,
"30": 71,
"60": 58,
"120": 45,
"300": 22
}
}Response Schema
| Field | Type | Description |
|---|---|---|
retention | object | Map of "<seconds>" → <percentage>, where the key is the second mark in the video (as a string) and the value is the percentage of viewers still watching. Keys are not necessarily contiguous — render as a sparse line series. |
Error Responses
- 400 — invalid
start_date/end_dateor missinga. - 401 — missing/invalid API Key.
- 404 — video not found.
- 500 — internal error.
Example Usage
cURL
curl --request GET \
--url 'https://data.pandavideo.com/retention/f1f2f3f4-aaaa-bbbb-cccc-d1d2d3d4d5d6?a=1&start_date=2025-01-15&end_date=2025-01-22' \
--header 'Authorization: <your-api-key>'