YouTube Tools

Export YouTube Playlist to YAML

Paste a playlist link to download its videos as a YAML file, ready to drop into a static site's data folder or read from a script.

How to export a YouTube playlist to YAML

  1. 01

    Paste the playlist link

    Copy the link of any public or unlisted playlist and press Export. Every video is read, however long the playlist is.

  2. 02

    YAML is already ticked

    Pick the keys each video holds: title, video ID, durations, views, likes, description, tags and more.

  3. 03

    Download

    Press Download to get a .yaml file, or tick more formats to get them together in a ZIP.

How the YAML is structured

The file has a playlist mapping with the playlist's id, title, channel, url, videoCount and exportedAt, and a videos list with one mapping per video in playlist order, using the same camelCase keys as the JSON export.

Every string is double-quoted and escaped, so titles starting with a colon, a dash or words like yes and no are never misread. Numbers stay numbers, tags are lists and missing values are null.

Frequently asked questions

How do I use it with Jekyll or Hugo?

Save the file in _data in Jekyll or data in Hugo, then loop over site.data.<name>.videos in Jekyll or .Site.Data.<name>.videos in Hugo, using the file name without .yaml.

Is the YAML the same as the JSON export?

It holds the same data with the same keys and types; only the syntax differs. Pick whichever your tools read.

Which YAML version does it follow?

It's valid YAML 1.1 and 1.2, so PyYAML, ruamel.yaml, js-yaml, Ruby's Psych and Go's yaml packages all read it.

Is there a limit on playlist length?

No. Playlists with thousands of videos are read in full, page by page, and you can export only a range with the From and To video numbers.

Export a YouTube playlist to other formats

More YouTube tools

See all tools