Is there a way to retrieve the audience retention data of any Youtube video via API (preferably using Python)?
I found the same question asked 9 years ago, but they were told that the feature didn't exist yet – does it exist now?
Is there a way to retrieve the audience retention data of any Youtube video via API (preferably using Python)?
I found the same question asked 9 years ago, but they were told that the feature didn't exist yet – does it exist now?
There is a YouTube Analytics (V2) API that allows users to fetch audience retention data of a single YouTube Video.
YouTube Audience Retention link
You set the dimension to elapsedVideoTimeRatio
, and use relativeRetentionPerformance
for metrics and include video=={yourVideoID}
for filters!
This will output a result in the following format: \
{
"kind": "youtubeAnalytics#resultTable",
"columnHeaders": [
{
"name": "elapsedVideoTimeRatio",
"columnType": "DIMENSION",
"dataType": "FLOAT"
},
{
"name": "relativeRetentionPerformance",
"columnType": "METRIC",
"dataType": "FLOAT"
}
],
"rows": [
[
0.01,
0.4472
],
[
0.02,
0.47595
],
[
0.03,
0.48175
],
[
0.04,
0.47025
],
...
[
0.95,
0.17835
],
[
0.96,
0.18214999999999998
],
[
0.97,
0.1885
],
[
0.98,
0.19684999999999997
],
[
0.99,
0.20539999999999997
],
[
1,
0.2117
]
]
}