67

YouTube likes to periodically delete videos that are on my favorites list:

warning about deleted videos

But they refuse to tell me what they were so I can go find another copy.

I would like a way to export my YouTube playlists, so that I can periodically diff them, and manually find other copies of the deleted songs.

How can I export my playlists (or a playlist) from YouTube?

1
  • 2
    For some reason viewing the playlist on an Android phone will still yield the names of the videos that were deleted!
    – sinni800
    Commented May 28, 2012 at 22:29

11 Answers 11

22

As far as I am aware, there's no built in way to do this on Youtube.

You could of course use the Youtube API to easily get all of your playlists in xml using the following:

https://gdata.youtube.com/feeds/api/users/[YOUR_USER_NAME]/playlists?v=2

Example: https://gdata.youtube.com/feeds/api/users/oisinorion/playlists?v=2

That xml file will have the unique IDs for each of your playlists, which you can then use to get the details for each playlist, including Video URLs and titles. The following API call will again give you an xml file:

https://gdata.youtube.com/feeds/api/playlists/[UNIQUE_ID]?v=2

Example: https://gdata.youtube.com/feeds/api/playlists/D5F03C2BE1AA3E7E?v=2

Working with those XML files manually would be a nightmare however. It would be best to create a small web app (if you know a bit of web programming) to pull out and present the relevant info from those XML files.

You can read more about the API here: https://developers.google.com/youtube/2.0/developers_guide_protocol_playlists

3
  • 3
    It seems that only the first 25 items are returned by default. You can add max-results=x to the URL, but x > 50 is rejected. Add start-index=... for paging the results.
    – lunakid
    Commented Aug 15, 2014 at 18:06
  • 9
    This answer appears outdated. Youtube API is now 3.0.
    – Jay M
    Commented Jul 7, 2018 at 16:31
  • 6
    Just like the playlist itself, the API managed to bitrot in less than a decade. We live in a world where everything is just thought as temporary and no-one takes care of making things not disappear. Nothing will be known of our society in a thousand year because all traces will be gone. Commented Aug 27, 2020 at 13:30
24

How about we make this more easy..

Go to: http://www.williamsportwebdeveloper.com/FavBackUp.aspx

Put in the playlist-url you want to create in excel-format, that's all :)

Here's a preview how it looks like. Have exported my short-film playlist which is located sorry not enough credits to post 2 links enter image description here

The creator: 'All my web application does is use the YouTube developer’s API to get the feed data. You could do the same yourself but it would be in a complicated XML format and not very readable. I think most people would rather have it in an Excel spreadsheet. If you do not have Microsoft Office then you can download Open Office for free.'

5
  • 2
    That works for all playlists except favourites and liked.
    – tobylane
    Commented Oct 10, 2015 at 8:43
  • THANKS SO MUCH, I've been looking for any way to do this for 2 days, and there's so much outdated crap online related to this. This site worked perfectly. (just a little slow but still <2 days!) @tobylane Liked was the only list I was interested in and it worked perfectly.
    – ashleedawg
    Commented Jun 7, 2018 at 7:38
  • @tobylane it works for favorites. I didn't test it for liked.
    – user
    Commented Jun 17, 2019 at 14:58
  • Nice, but your .xls is actually HTML. No need to open with Excel. Any web browser will display the file fine.
    – tbc0
    Commented Mar 22, 2020 at 20:05
  • Does this work for Youtube Music playlists? I see that it doesn't
    – Suncatcher
    Commented Oct 17, 2020 at 15:21
13

This is not the most elegant way to accomplish what you ask, but here's a manual method that I just used to do it. Because I'm using Powershell for part of this, I'm assuming you're on a Windows machine.

Steps:

  1. Go to Google Takeout
  2. On the Download Your Data page, deselect everything except for Youtube
  3. Expand Youtube and select "Select specific data" under "YouTube data", then click the "YouTube data" button and select only "Playlists", then change the "Subscriptions" dropdown to "JSON", then click Next
  4. Download your Takeout data when it's ready and unzip it to wherever
  5. Open a Powershell session and execute the below statements

Assuming your playlist is Favorites, you'll get a Favorites.json. Let's say I want just the title of each video in the playlist and a link to it, in a text file called YoutubeFavorites.txt:

$json = ConvertFrom-Json (Get-Content .\Favorites.json -Raw)
foreach ($vid in $json) { "$($vid.snippet.Title) - Link: https://www.youtube.com/watch?v=$($vid.contentDetails.videoId)" | Out-File -FilePath .\YoutubeFavorites.txt -Append }

Voila, enjoy.

4
  • 1
    Seems like private playlists aren't exported (I only got 'liked' 'watch later' and something else that wasn't the playlist I was looking for) Commented Apr 29, 2019 at 19:48
  • That seems pretty weird, also disappointing. Perhaps the API options in other answers are the only real solution(s).
    – Some Fool
    Commented May 1, 2019 at 21:18
  • 1
    My private YT Music playlists were perfectly exported via Takeout
    – Suncatcher
    Commented Oct 17, 2020 at 15:29
  • 1
    Takeout doesn't have an option to download "Playlists" anymore. Is it under a different option now? Commented Oct 15, 2021 at 0:52
13

In light of deprecation of v2, the current answer is no longer works. v3 is the new version.

The documentation link - https://developers.google.com/youtube/v3/docs/playlistItems/list

This limits to only 50 results. Fill in the following

Example link - https://www.googleapis.com/youtube/v3/playlistItems?part=contentDetails&maxResults=50&pageToken=NNNNN&playlistId=PLXxxx=key=yyyy

4
  • THANK YOU! Dozens of playlists from when the kids were younger, and I need to get them all organized and content sorted. This has been a total PITA. Hoping this (and other tidbits) pushes me in the right direction.
    – J.Hirsch
    Commented Aug 16, 2020 at 18:08
  • Does this works for Yotube Music playlists?
    – Suncatcher
    Commented Oct 17, 2020 at 15:21
  • when this question was asked, music may not have existed. check the api
    – Sairam
    Commented Oct 17, 2020 at 19:20
  • Yes it does, just tried it. However what it returns is not the names but just a list of IDs. Which method should I run to get the human names for these IDs?
    – Suncatcher
    Commented Dec 11, 2020 at 17:35
6

Nowadays there are many solutions that do even more than what you requested:

But the most efficient & elegant solution would be in my opinion to just use youtube-dl because with one single command like (which you can easily build yourself by looking at the docs) you can download ALL your playlists items titles (well not only the titles, if you cared...), by entering as a parameter the YouTube URL to the page showing all your playlists (e.g. https://www.youtube.com/user/your_user_name/playlists). On top of that it also has an option to make authenticated requests to YouTube (with your credentials) so it can also download your private playlists.

5

I've created a service called www.recovermy.video to fix this problem. See my answer on another question.

3
  • Nov 2021 update: RecoverMyVideo will be dead by the end of this month. Thank you for your service, I've used it since I first came across this answer many years ago and it's a shame you're no longer to able to keep it going. Commented Nov 1, 2021 at 23:45
  • @HashimAziz, RecoverMy.Video will not shut down. See here: recovermy.video/shutdown-postponed
    – ninsky
    Commented Nov 3, 2021 at 7:52
  • Yes, I read the email a few hours after i posted my comment. I can't tell you how glad I am that you're looking into monetising, and I hope it works out for you and means the service can stick around indefinitely. Commented Nov 3, 2021 at 18:58
5

You can do it with a new site we Developed https://www.tunemymusic.com/

You can choose export from Youtube a specific playlist, all your playlists and also all your liked videos. Then you can export it for free text file.

In addition to text file, we are now working on adding options to export to csv and m3u files

1
  • I put a youtube playlist url into it and nothing happened. Commented Jan 29, 2019 at 0:04
5

Use Google Takeout.

  1. Deselect all
  2. Scroll all the way to the bottom for YouTube and YouTube Music and select it YouTube and YouTube Music in Google Takeout
  3. Click on All YouTube data included to get sub-selections and click Deselect allenter image description here
  4. Select playlists and OK. enter image description here

Sorry, screenshot doesn't include OK. It's at the bottom of the modal where you select playlists.

  1. Click Next step
  2. Click Create export and wait a few seconds
  3. Download
2
  • Just be aware that as of Nov 4 2020, this does not export ALL of my playlists. Only some random subset of them.
    – Jon
    Commented Nov 5, 2020 at 1:37
  • 4
    Edit Jan 2021: The above was actually fixed, and the previous limit of 50 playlists is gone. However, the CSV files now exported only have YouTube video code, not name of song. Sheesh.
    – Jon
    Commented Jan 21, 2021 at 19:24
2

You can make a Bookmarklet in your browser in order to catch the description of each video in the list and then print them all in a textarea.

For example this script will create a list with the url's and the names of the videos. Simply create a bookmark and add the following script in the address (URL) of the bookmark:

javascript:var Description = "Export YouTube playlists. This script is in the Public Domain - created at: 2016-11-21";
function printline(myLine) {
  document.write(myLine+"\n");
};
function showlinks() {
  var today = new Date();
  var day = today.getDate();
  var month = today.getMonth()+1;
  var year = today.getFullYear();
  document.write("<html><head><title>YouTube list: " + Title + "</title></head><body>");
  printline("<textarea name='Links' rows='55' cols='200'>");
  printline(year + "-" + month + "-" + day);
  printline(Title +"\n"+url);
  printline("");
  for (i=0; i<lines.length; i++) printline(lines[i]);
  printline("</textarea>");
  document.write("</body></html>");
};
var url = document.URL;
var body = document.body.innerHTML;
var lines = [];
if (url.match(/youtube.com/)) {
  var x = body.match(/data-list-title=.*/)[0];
  var x = x.replace(/.*data-list-title="/, '');
  var Title = x.replace(/".*/, '');
  var body = body.replace(/data-video-id="/g, 'data-video-id="https://www.youtube.com/watch?v=');
  if (body.match(/li class=.yt-uix-scroller-scroll-unit/)) {
    var matches = body.match(/li class=.yt-uix-scroller-scroll-unit.*/g);
    for(i=0; i<matches.length; i++) {
      var x = matches[i];
      var ID = x.replace(/.*data-video-id=./, "");
      var ID = ID.replace(/".*/, "");
      var VName = x.replace(/.*data-video-title=./, "");
      var VName = VName.replace(/".*/, "");
      var x = VName;
      var x = ID + "\t" + VName;
      lines.push(x);
    };
  };
};
showlinks();

In case you don't want the url's of the videos, then simply delete the line "var x = ID + "\t" + VName;" (line 36)

This script should work for a while, until YouTube will change the formatting of their HTML pages. When they will do that, you will have to adjust the script accordingly - most likely, you will have to search for something else instead of "data-video-title="

-1

What I did was go to my playlist and right clicked on the name of my playlist then selected "email with Windows Live". It sends a link to your email and when you click the link you have your entire playlist.

1
  • 1
    then YouTube removes a video from your playlist and then you go visit the emailed link again and you're taken to that playlist, where the video is now missing, you know? ;)
    – red-o-alf
    Commented Sep 18, 2017 at 12:34
-3

Why don't you just open the playlist and copy/paste it to Excel, Word, or whatever? It's not exactly elegant, but the information is there as a backup.

Not the answer you're looking for? Browse other questions tagged or ask your own question.