Platforms/YouTube/Playlist

YouTube Playlist API

GET ยท 1 credit

Send a playlist's id or link, and get its details and its videos, 100 a page.

GET /v1/youtube/playlists

What people use it for

  • Course catalogs: import a course or series in the order its creator set.
  • Content collection: gather every video id in a playlist for transcripts or comments.
  • Curation tracking: watch a playlist for added or removed videos.

How it works with other endpoints

Playlist ids come from Channel playlists and Playlist search. Each video's id goes to Video.

Limits

  • 100 videos a page.
  • Pages after the first hold only id, url and videos.

Example request

const url = `${process.env.API_URL}/v1/youtube/playlists?playlist_id=PLoSWVnSA9vG9qV0CVCpg5WwEy3LiP7udY`;

const response = await fetch(url, {
  headers: { "x-api-key": process.env.API_KEY },
});

const { data } = await response.json();
console.log(data);

Parameters

ParameterRequiredDescription
playlist_idNoA playlist's id: the list= part of its link. Give playlist_id or url.
urlNoA playlist's link, or any YouTube link with its list= part. Give playlist_id or url.
cursorNoFor the next page: page.next_cursor from the page before. Send the other parameters again with it.

Example response

{
  "data": {
    "id": "PLoSWVnSA9vG9qV0CVCpg5WwEy3LiP7udY",
    "url": "https://www.youtube.com/playlist?list=PLoSWVnSA9vG9qV0CVCpg5WwEy3LiP7udY",
    "title": "Beginner Python Tutorials",
    "description": "Learn Python from scratch.",
    "thumbnail": "https://i.ytimg.com/vi/playlist-thumbnail.jpg",
    "channel_id": "UC8butISFwT-Wl7EV0hUK0BQ",
    "channel_name": "freeCodeCamp.org",
    "channel_handle": "freecodecamp",
    "video_count": 24,
    "views": 1300000,
    "videos": [
      {
        "id": "rfscVS0vtbw",
        "url": "https://www.youtube.com/watch?v=rfscVS0vtbw",
        "title": "Learn Python - Full Course for Beginners [Tutorial]",
        "is_short": null,
        "thumbnail": "https://i.ytimg.com/vi/rfscVS0vtbw/hqdefault.jpg",
        "duration_seconds": 16012,
        "views": 47000000,
        "published": "7 years ago",
        "channel_id": "UC8butISFwT-Wl7EV0hUK0BQ",
        "channel_name": "freeCodeCamp.org",
        "channel_handle": "freecodecamp",
        "badges": null,
        "description": null
      }
    ]
  },
  "page": {
    "next_cursor": "eyJ0b2tlbiI6IkVnWlEifQ",
    "has_more": true
  },
  "meta": {
    "platform": "youtube",
    "endpoint": "playlist",
    "params": {
      "playlist_id": "PLoSWVnSA9vG9qV0CVCpg5WwEy3LiP7udY"
    },
    "request_id": "sp_req_1f8c2d3e4a5b6c7d",
    "api_version": "v1",
    "fetched_at": "2026-11-30T09:30:00Z",
    "cached": false
  }
}

An illustrative answer: live answers have the same shape, with the page's current data.

Every field, with its type, is in the API reference, and every error code in Errors.

Price

Each call costs 1 credit, a not-found answer too. Cached answers and other errors cost nothing, and credits never expire. New accounts start with 100 free credits. See pricing for the packs.

FAQ

Where is the playlist's id?

It's the list= part of its link. Any YouTube link with a list= part works as url.

Why do later pages have fewer fields?

Pages after the first hold only the playlist's id, url and videos; the details come with the first page.

How many videos a page?

100. Send page.next_cursor as the cursor parameter for the next page.

Works with

YouTube guides

Start free

Your first 100 credits are on us

Sign up, create a key and make your first call in a few minutes.

No credit card required