Skip to content Skip to sidebar Skip to footer

How To View Youtube List Of A Specific Playlist?

I'm new to this website and so far it really helped me just from looking. I'm building and app that contains a playlist from youtube, so far it's working but I only have one video

Solution 1:

I've done this using Youtube Api rest calls, async task and a recyclerview.

RecyclerView helps create a list and async task helps you make http requests in the background.

Look up the basics of async task and recyclerview. http://www.androidhive.info/ has great tutorials on this.

The Youtube rest call will look like this(I believe the max results are 50):

https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=iBi9LVIrC-fVelw2-I2r-yrEk6SpXfO8&key=AIzaSyCI1oCTXwZzgVv7LDQ8NykSIUEWt247KnU&maxResults=50

Here are some steps to get you started:

For example in this playlist url: https://www.youtube.com/watch?v=2q7XGuH2Q-s&list=PLuR1PJnGR-Igj4mNcr6_zDkQ3DTVA6wG5

Everything after "PL" is the id "uR1PJnGR-Igj4mNcr6_zDkQ3DTVA6wG5".

Also now you have to create a browser key in Google Developer console. You don't have to enter anything in the textbox, just click enter, and retrieve your api key

In your Google Developers console,under "APIs" make sure you turn Youtube Data api.

https://www.dropbox.com/s/6wtr7hpawx3ij64/youtubeApi.PNG

https://developers.google.com/youtube/android/player/downloads/

Add the jar file from the downloads to your libs folder in your newly downloaded project.DONT add it by dragging it into Android Studio

Next go to android studio and click the project drop down:

https://www.dropbox.com/s/cjlr4fnnikpnx7a/Screen%20Shot%202015-04-22%20at%2012.39.28%20PM.png?dl=0

then drop down the libs folder and you will see the youtube jar.right click the jar file and click “add as library”.

I have a more in-depth tutorial here: http://cmcoffee91.com/blog/2016/12/18/how-to-add-youtube-playlist-to-your-android-app/

Solution 2:

You can get everything with youtube data api, it's very easy and simple.

https://developers.google.com/youtube/v3/

Solution 3:

visit youtube developer api website. There are several methods in the api which can help to retrieve playlists,channels,users profile etc.For reference to insert playlist

Solution 4:

The other two answers are correct. Specifically, the YouTube API REST call you are looking for is under PlaylistItems, which gets a list of all videos in a playlist.

From the docs, the GET call is:

GET https://www.googleapis.com/youtube/v3/playlistItems?part=id&playlistId=[yourPlaylistId]

Post a Comment for "How To View Youtube List Of A Specific Playlist?"