1

When I request a snippet, statistics, status, on video Id: darZbXulSDI I am receiving that its status is public.

      "status": {
        "uploadStatus": "processed",
        "privacyStatus": "public",
        "license": "youtube",
        "embeddable": true,
        "publicStatsViewable": true,
        "madeForKids": false
      },
      "statistics": {
        "viewCount": "4",
        "likeCount": "1538",
        "favoriteCount": "0",
        "commentCount": "0"
      }

but on YouTube page, It shows unavailable. I also can't explain how the likes count exceeds the view count :)

What is the best way to check if a video becomes unavailable? And did the creator unlist this video, made it private, or deleted it?

Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33
bob mason
  • 677
  • 1
  • 6
  • 11

1 Answers1

2

I don't know how creators, if they are able to, make their videos unavailable.

Note that Subscribe to Push Notifications sends a notification when a video of the tracked channel becomes private or unlisted or is deleted, for each of this case you will receive for instance:

<?xml version=\'1.0\' encoding=\'UTF-8\'?>
<feed xmlns:at="http://purl.org/atompub/tombstones/1.0" xmlns="http://www.w3.org/2005/Atom"><at:deleted-entry ref="yt:video:1RHxvM8mQS4" when="2022-10-24T13:39:07.99031+00:00">
  <link href="https://www.youtube.com/watch?v=1RHxvM8mQS4"/>
  <at:by>
   <name>Test</name>
   <uri>https://www.youtube.com/channel/UCv_LqFI-0vMVYgNR3TeB3zQ</uri>
  </at:by>
 </at:deleted-entry></feed>

For an unlisted video (such as 8c-AHRlzyJs) you can retrieve this information from status/privacyStatus using YouTube Data API v3 Videos: list endpoint with part=snippet.

Graphically you would get:

private video UI rendering

For such a private video, Videos: list won't return you any item for the given YouTube video id (if you aren't using OAuth 2 by being logged as the creator of the given video).

For a deleted video you would graphically get:

deleted video UI rendering

For the video darZbXulSDI you sent, graphically you get:

provided video UI rendering

To distinguish both of them as they are both unavailable, you can use my open-source YouTube operational API. Indeed by requesting https://yt.lemnoslife.com/videos?part=status&id=VIDEO_ID, you would get whether or not the video was deleted by his uploader by reading item["status"]["removedByTheUploader"].

Note that as we don't know how the video went unavailable and as people are able to like the video without watching it, this may explains how the likes count exceeds the view count.

Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33
  • Hello, I tried your library: https://yt.lemnoslife.com/noKey/videos?part=snippet,status&id=darZbXulSDI and I got the exact same reply as V3 API, public status, and publicStatsViewable = true, does your API pull data directly from youtube.com? – bob mason Oct 26 '22 at 10:07
  • @bobmason Indeed https://yt.lemnoslife.com/noKey/YOUR_REQUEST retrieves YouTube Data API v3 content in a quota-free manner as explained on https://yt.lemnoslife.com However I haven't mentioned my YouTube no-key service in my answer. You are looking for my YouTube operational API and more precisely https://yt.lemnoslife.com/videos?part=status&id=darZbXulSDI Note that YouTube operational API retrieves its content from [YouTube UI](https://www.youtube.com) endpoints. – Benjamin Loison Oct 26 '22 at 10:21
  • I got it! was a little confused, but great job, I already joined your discord... – bob mason Oct 26 '22 at 11:40