I'm trying to feed videos from a YouTube channel to a website. I've been able to add the videos one by one but I would like to add the whole YouTube channel very interactively on the website. Any idea?
Using Data API v3, you can get a list of all playlists associated with your channel.
'https://developers.google.com/youtube/v3/docs/channels#properties' ->
'contentDetails.relatedPlaylists'
Iterating through these playlists, you can get video ids and feed them.
'https://developers.google.com/youtube/v3/docs/playlistItems#resource' ->
'contentDetails.videoId'
Or you can put the whole playlist as a player by,
going to playlists ->
'player.embedHtml'
Related
I want to get list of channels of a specific genre in my App using YouTube API.
For Example -
I want to get list of all comedy channels on YouTube in my App.
Is this possible , if yes than How ?
YouTube's V3 API doesn't have a category for each channel.
Take a look at this similar question: How to get the Channel Type or Category of each YouTube channel using YouTube API?
YouTube documentation for this: https://developers.google.com/youtube/v3/docs/channels
The YouTube API does however show if videos and by extension channels make videos for kids.
Youtube use to have a feature where you could click a more videos button while watching any video, and see a snapshot of the uploads playlist with videos uploaded before and after the one you are currently watching.
I am trying to get a list like that with the v3 data API and it seems there is no way. There use to be a way to dictate an index when using the playlistItems call, but now there isn't.
If you go to a channels upload playlist and click play all, you can see a list of videos surrounding the one you are watching, so it seems this functionality is possible, but I don't know how they are doing it.
Any ideas?
I need some help getting the video ID number and the video title ( the title would be "Private video") for all private videos within a public playlist. Specifically I'd need help editing my script below. This script used to be able to do that, but I fear something has changed with Youtube's API. I want to know if there is any way to get this information and fix my script.
My script is located here
Just a month ago my script (see above) was able to retrieve video ID numbers and video names of private videos when fetching playlistItems from a playlistid (of course the video titles were renamed "Private video" - but that is the info I wanted). Unfortunately now when I fetch the same playlistid from youtube it hides all this info. It acts as if there are no videos in the playlist when a playlist contains private videos. Here is a question asked last year, it shows you can pull the video ID numbers and names from a playlist that contained private videos. Retrieve Video IDs contained in a Playlist - YouTube API v3
Here is an example of a playlist I would want to fetch the video ID and video name from.
https://www.youtube.com/playlist?list=PLAg_-NsALZoOLfXbX7eGIzFsbG21XAvct
I haven't tried it but you can try PlaylistItems: list and Advanced Google Services
Returns a collection of playlist items that match the API request parameters. You can retrieve all of the playlist items in a specified playlist or retrieve one or more playlist items by their unique IDs.
AFAIK if you own the private/unlisted videos, you can get the videos using Youtube API v3. You can read these related SO questions - Using the YouTube API v3 to list all private videos, Google Youtube Data API: Private videos with API key and Google YouTube API (v3): how to access my unlisted/private videos from my server? that all discuss retrieving the ID as the owner of the videos.
This issue has been fixed. You now get the behavior you were used to.
I know how to embed a youtube video with a playlist and it's all fine. Except I don't get events. I need to know when the video or playlist is over. I know how to use the youtube API to load in a video and get the stop event. I don't know how to get them both together.
Here is an example to test with https://www.youtube.com/watch?v=YlUKcNNmywk&list=PLE5FFF0C74122C403. I tried queue playlist and looking at the other commands. It appears I can create a playlist dynamically. I don't know how to get a list of videos in an already existing playlist. My goal is having someone drop in a video id + playlist id and find out when the video/playlist is over.
I'm creating a media house mock app and am wondering whether there is a way I can get video playlists from a certain account which is not mine for example if a user has a page that is http://www.youtube.com/someuser is it possible to get all the videos and playlist from that user?
You can use youtube video feeds(Youtube RSS Video Feeds)
Make following requests using GET and read the xml data returned.
http://gdata.youtube.com/feeds/api/users/{{username}}/playlists - For playlists
http://gdata.youtube.com/feeds/api/users/{{username}}/uploads - For uploads
Orderby parameter can be used to change order of videos.