I have very long lists of YouTube links/bookmarks. I want to create playlists for my YouTube channel with them. Is there any way to do it automatically without having to add each individual URL to a playlist?

  • 2
    Answer here: How to create a playlist form a list of links (not from bookmarks)?
    – user0
    Commented Mar 16, 2019 at 13:28
  • @user0 The current question and answer below have dates far earlier than the link you have provided? How is this question a duplicate of the link you have provided if this question has a prior date? shouldn't it be the other way around?
    – jaggi
    Commented Jun 1, 2019 at 7:48
  • @jaggi new question with an accepted answer has higher priority than an older unaccepted question (said mods). also, double posting the answer here has no meaning due to the lost interest of OP (OP does not have an account)
    – user0
    Commented Jun 1, 2019 at 9:07
  • @user0 Don't mods have the power to accept an answer for a question? This question and the provided answer have more upvotes & more activity than the other link. Did you genuinely try to point the OP of your link to this question, before you wrote the answer there which is more or less same as the answer written here?
    – jaggi
    Commented Jun 1, 2019 at 9:39
  • @jaggi sure they can I guess but they never do so. as for the rest - I wasn't aware of this post when answering over there back in Sep 2018 and as you can notice this was linked as duplicate just recently (Mar 2019). apologies for my non-awareness.
    – user0
    Commented Jun 1, 2019 at 10:00

2 Answers 2

  1. Go to bookmarks manager and select all the YouTube links and copy and paste them in a text file, say you.list, and RUN following on your terminal (assuming you use a linux system):

    grep -o 'v=.*' you.list | cut -f2 -d"="| tr '\n' ','

    You'll get comma separated list video ids something like: J6PBD-wNEDs,afwPe_OqPX0,OGcG4jSKOVA,hegL0V4ckco,LajAWn51HmE.

  2. Copy these ids and append it to http://www.youtube.com/watch_videos? video_ids=

    You'll get a link similar to this http://www.youtube.com/watch_videos?video_ids=J6PBD- wNEDs,afwPe_OqPX0,OGcG4jSKOVA,hegL0V4ckco,LajAWn51HmE

  3. Open this link in the browser and it'll create an 'untitled playlist', for the above links it would be https://www.youtube.com/watch?v=J6PBD-wNEDs&list=TLGGDO-k0WVJQ_8yNDA1MjAxNw

  4. Go to the playlist URL for the generated playlist in this format:
    https://www.youtube.com/playlist?list=[PLAYLIST ID]&disable_polymer=true, which for the above example would be https://www.youtube.com/playlist?list=TLGGDO-k0WVJQ_8yNDA1MjAxNw&disable_polymer=true. Press the three dots to the right of the playlist title, and then select "Add all to..." to add the videos to your own playlist. As @jet-blue says, you may need to use the &disable_polymer=true URL parameter to see the "Add all to..." drop-down option.

I guess the proper way of doing what the question is asking for is through YouTube developer api. https://developers.google.com/youtube/v3/docs/playlists/insert#examples


  • 2
    Your answer is nearly complete. Once you have the untitled playlist open in youtube there is an option to "Copy All into" (dots in the right hand corner gives you this option) whereby you can create a new playlist which will have all those videos in it.
    – CashCow
    Commented Jul 1, 2017 at 23:09
  • 2
    @CashCow Can you edit the answer to include this info?
    – Stevoisiak
    Commented Aug 12, 2017 at 21:56
  • 4
    Append &disable_polymer=true to the playlist url in order to get access to the Add all to... feature.
    – Jet Blue
    Commented Nov 21, 2017 at 17:57
  • 4
    @jaggi just some minor details to mention: - Video ids must be clean from other utms (eg. use Xkj931k not Xkj931k?t=10, which would be a video at specific time) - Also don't include more than 50 video ids in one url. At this moment, 50 video ids is the maximum that youtube will display in the new untitled playlist. As a turn around you have to create new playlists for every 50 songs you want to add
    – gpelelis
    Commented Mar 18, 2019 at 0:15
  • 6
    As of mid 2020, disable_polymer was only working intermittently. As of the end of 2020, it has stopped working completely. You can still mass add videos from one playlist to another, but the caveat is you have to be the author of both playlists, and these "temporary" playlists that are created by using /watch with multiple IDs appended are not considered to be authored by you, so you can't mass add them to another list. Which really sucks.
    – tubedogg
    Commented Dec 31, 2020 at 1:37

A small python script

  • to extract all the youtube links from the text file you.list.
  • open the browser (in background) with all the videos - urllib2.urlopen(listOfVideos).
  • gets the new playlist link - response.geturl().
  • opens the web browser again to to edit the playlist properties (playListURL) or directly start playing the list webbrowser.open(playListURL).

*tested on Google Chrome

import os, io
import webbrowser
from urllib import request

videos = []
f = open("you.list", 'r')
for line in f:
listOfVideos = "http://www.youtube.com/watch_videos?video_ids=" + ",".join(videos)

response = request.urlopen(listOfVideos)
playListLink = response.geturl().split('list=')[1]

# edit playlist with this URL
playListURL = "https://www.youtube.com/playlist?list=" + playListLink + "&disable_polymer=true"

# or start playing from first to last with this one
playNowURL = "https://www.youtube.com/watch?v=" + videos[0] + "&list=" + playListLink