YouTube API V3 Get Overall Ratings for Video - youtube-api

In YouTube's V2 API one could obtain a video's rating from the following tag
<gd:rating average="4.254023" numRaters="20509">
I am not finding this information contained within the new V3 api however.
I am using the videos api. I reviewed all of the available properties that can be returned at this location but while I am finding information about "ratings", that information pertains to movie and tv ratings, not how the video was rated.
https://developers.google.com/youtube/v3/docs/videos#properties
Does anyone have experience with this that may know?

From the link you posted, see the statistics object, specifically statistics.likeCount and statistics.dislikeCount.

Related

is the dislike information still available on youtube's api?

since youtube updated thier guildlines on "dislikes" on the platform , see : https://blog.youtube/news-and-events/update-to-youtube/
I wanted to ask if there is still a way to get the dislike amount on a random video using youtube's api , an example of a random video https://www.youtube.com/watch?v=ThiCMd5kGbE&ab_channel=DigitalE
You will have access until Dec. 13th; after that only the user themselves with an authorized API call will be able to obtain that data for their videos only.

Does YouTube Data API V3 work with YouTube Music?

I would like to extract playlist data from Youtube Music, as well as metadata related to the songs in the said playlist. Is this possible with the Youtube Data V3 API, or YouTube Analytics API?
If so, where can I find documentation about calls and available metadata; I am not finding what I need on the YouTube Data API page. I am currently referencing PlaylistItems and Playlists in the reference Docs, but it seems that is geared to videos. Is that by design because you can toggle between video and audio in YT Music?
If possible is there an official Rust Crate?
Thank you in advance for the help.
Indeed, this feature is missing from YouTube Data API and quite a few other API users expressed the same need as yours.
The official Google staff account says the following:
This type of information is not available in the API. We have already raised a feature request for this but I can't guarantee that this feature will be implemented.
That is it: they may well implement this feature at some point, but, unfortunately, cannot tell when that'll happen.

Was User Watch History removed in YouTube Data API v3?

If you look at YouTube V3 Docs it will say
YouTube uses playlists to identify special collections of videos for a channel, such as: (...) watch history (...).
Now, if you go to Channels List API and make a call for part=contentDetails&mine=true it will list your information but watchHistory will appear as HL and watchLater as WL.
It makes me wonder, and so far I couldn't find any explicit mention, from Google/YouTube, were those playlists removed from API? IS there any way to actually get that information from an authenticated user?
For quite some time I observed the same values you mentioned on various channels. According to the docs, watch history and watch later playlists are deprecated.

How to know if a video has been seen/hidden?

Using the YouTube Data API v3, is there a way to know if a video has been seen or hidden?
Reading through the docs, I didn't see anything on the Video resource that could match what I'm looking for.
Logically, “Watched” videos are just videos which have entries on your “Watch History” on Youtube.
You can get your “Watched” videos list through the API by getting your Watch History list from your channel. You can do that by using obtaining your Watch History ID which at the same time is also treated as playlistId.
Referring through the Channel API, make a GET HTTP request to
https://www.googleapis.com/youtube/v3/channels?part=contentDetails&mine=true&key={YOUR_API_KEY}
This should return a JSON which should contain an object with “watchHistory” key. The value paired with it is your playlistId which you can now use to make a request using the PlaylistItems API
https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId={YOUR_WATCHED_PLAYLIST_ID}&key={YOUR_API_KEY}
This should return a list of videos that your account has already watched.
As for getting the list of “Hidden” videos on your subscription feed. I think it's not achievable through the API. Checked on different responses of subscription and video resources but to no avail. No responses containing "watched" or "hidden" related.

Youtube API: no way to get liked videos from user's activity feed

It's a known issue that Youtube API (v2) doesn't support liked videos - http://www.youtube.com/my_liked_videos (not http://www.youtube.com/my_favorites). The trick was to use events API for user's recent activity and filter out those with yt:rating.value = like. However, when I hit this endpoint https://gdata.youtube.com/feeds/api/users/default/events?inline=true (with proper authorization headers), I only get last 24 events and all of them are of 'X has uploded a video' type. Has anyone experienced this and figured out what is wrong?
You can get liked videos without much effort in v3 of the API. I don't think there's a workaround for this in v2.
In v3, make a channels.list(part=contentDetails) call to get the "likes" playlist id, and then do a playlistItems.list() call to get the contents of that playlist, i.e. the videos that have been liked.

Resources