1

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?

  • Not that I'm aware of. Check in [Issue Tracker](https://issuetracker.google.com/issues?q=status:open%20componentid:186600&s=created_time:desc) if there is an ticket with this request. – Marco Aurelio Fernandez Reyes Jun 14 '22 at 20:24
  • I think something like [this method](https://stackoverflow.com/a/71987890/7123660) is feasible. Does it look like a reasonable solution for you ? – Benjamin Loison Jun 14 '22 at 23:18

1 Answers1

0

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
]
]
}
Emil Rowland
  • 538
  • 5
  • 25