"Most Replayed" Data of YouTube Video via API

Question:

Is there any way to extract the "Most Replayed" (aka Video Activity Graph) Data from a YouTube video via API?

What I’m referring to:

Image of Youtube Video with "Most Replayed" Data displayed

Asked By: prodohsamuel

||

Answers:

One more time YouTube Data API v3 doesn’t provide a basic feature.

I recommend you to try out my open-source YouTube operational API. Indeed by fetching https://yt.lemnoslife.com/videos?part=mostReplayed&id=VIDEO_ID, you will get the most replayed graph values you are looking for in item["mostReplayed"]["heatMarkers"]["heatMarkerRenderer"]["heatMarkerIntensityScoreNormalized"].

With the video id XiCrniLQGYc you would get:

{
    "kind": "youtube#videoListResponse",
    "etag": "NotImplemented",
    "items": [
        {
            "kind": "youtube#video",
            "etag": "NotImplemented",
            "id": "XiCrniLQGYc",
            "mostReplayed": {
                "maxHeightDp": 40,
                "minHeightDp": 4,
                "showHideAnimationDurationMillis": 200,
                "heatMarkers": [
                    {
                        "heatMarkerRenderer": {
                            "timeRangeStartMillis": 0,
                            "markerDurationMillis": 2580,
                            "heatMarkerIntensityScoreNormalized": 1
                        }
                    },
                    ...
                ],
                "heatMarkersDecorations": [
                    {
                        "timedMarkerDecorationRenderer": {
                            "visibleTimeRangeStartMillis": 0,
                            "visibleTimeRangeEndMillis": 7740,
                            "decorationTimeMillis": 2580,
                            "label": {
                                "runs": [
                                    {
                                        "text": "Most replayed"
                                    }
                                ]
                            },
                            "icon": "AUTO_AWESOME",
                            "trackingParams": "CC0Q38YIGGQiEwiFxcqD7-P9AhX8V08EHcIFCg8="
                        }
                    }
                ]
            }
        }
    ]
}
Answered By: Benjamin Loison

You can’t extract the "Most Replayed feature" of a YouTube video using the YouTube Data API v3. However you can explore alternative solutions. One such solution is the "get youtube video revision graph" API available on RapidAPI.

The "get youtube video revision graph" API on RapidAPI provides comprehensive analytics and insights for YouTube videos, including information about replayed portions of the video. This API allows you to access data related to video performance and viewer engagement.

You can find the YouTube Video Analytics API on RapidAPI by following this link: get youtube video revision graph API on RapidAPI. You can click here to access it

Here’s an example of an API response:

{
    "videoId": "uC0RFwhrWLE",
    "heatMarkers": [
        {
            "startMillis": "0",
            "durationMillis": "15940",
            "intensityScoreNormalized": 0.8968143756681825
        },
        {
            "startMillis": "15940",
            "durationMillis": "15940",
            "intensityScoreNormalized": 0.5731419652555069
        },
        {
            "startMillis": "31880",
            "durationMillis": "15940",
            "intensityScoreNormalized": 0.2831004476352413
        },
        {
            "startMillis": "47820",
            "durationMillis": "15940",
            "intensityScoreNormalized": 0.1571306578626224
        },
        {
            "startMillis": "63760",
            "durationMillis": "15940",
            "intensityScoreNormalized": 0.13381780592629355
        }
    ]
    }

this API differs from Beinjamin Loison’s in the form of the answers, but can still do the trick.

Answered By: Lul lu