How can I get the order of the playlist api? I looked into the doku
and got all my playlist returned, however the order in which they are returned, doesn't match the order in which the are on the youtube channel?
Is there a possibility to get the list in the order of the youtube channel, or have an id property of in which order the playlists are?
After reading the decomuntation again and again, and also the comments, I realized that this is not possible.
Issue
https://code.google.com/p/gdata-issues/issues/detail?id=7562&thanks=7562&ts=1442567810
was created in googles issu tracker.
Related
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.
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.
I'm having an hard time trying to figure out how I can get a list of videos that are live for a given channel. For instance for this channel:
https://www.youtube.com/channel/UC4R8DWoMoI7CAwX8_LjQHig
I can get the videos from the uploads playlist or any playlist without any issue. However, I can't figure out how to get a list of live broadcasts.
Many thanks in advance
Solved by using:
https://developers.google.com/youtube/v3/docs/search/list
There, you can filter by channelId and filter by live only if you add type=video and eventtype=live.
Thanks anyway
I have searched the web tirelessly and looked through the YouTube API, but I still can't seem to find a way in which to request videos from a specific channel which have been uploaded since a certain date-time.
Something along the lines of this:
GET https://www.googleapis.com/youtube/v3/channels?part=videoContent&channel=UC_x5XG1OV2P6uZZ5FSM9Ttw&uploadedAfter=1421056357914
What you'd want to do is to get the channel's uploads playlist, the do a playlistItems.list with it.
Though currently playlistItems.list doesn't support orderBy or uploadedAfter, it's in the works.
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.