YouTube Playlist Scraper API
Get a playlist from its link or ID: title, owner, video and view counts, and its videos page by page.
- 1 credit per 100 results per call
- Failed calls are free
- Updated
- youtube.playlist.get
{ "title": "Neural Networks: Zero to Hero", "has_more": false, "is_editable": false, "last_updated": "Last updated on Jun 9, 2024", "owner": "Andrej Karpathy", "owner_channel_id": "UCXUPKJO5MZQN11PqgIvyuvQ", "pages": 1, "playlist_id": "PLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ", "total_videos_text": "10 videos", "total_views_text": "3,178,754 views", "url": "https://www.youtube.com/playlist?list=PLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ", "video_count": 10, "thumbnails": [ { "height": 94, "url": "https://i.ytimg.com/vi/VMj-3S1tku0/hqdefault.jpg?sqp=-oaymwEWCKgBEF5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLB2Op623ufQGhBzpdmt6ovG3_J-Tg", "width": 168 }, { "height": 110, "url": "https://i.ytimg.com/vi/VMj-3S1tku0/hqdefault.jpg?sqp=-oaymwEWCMQBEG5IWvKriqkDCQgBFQAAiEIYAQ==&rs=AOn4CLB8mnZInXcm0G9Ug_Ry5sc6NY6HmA", "width": 196 } ], "videos": [ { "title": "The spelled-out intro to neural networks and backpropagation: building micrograd", "channel": "Andrej Karpathy", "duration": "2:25:52", "index": 1, "is_playable": true, "video_id": "VMj-3S1tku0", "thumbnails": [ { "height": 94, "width": 168 }, { "height": 110, "width": 196 } ] }, { "title": "The spelled-out intro to language modeling: building makemore", "channel": "Andrej Karpathy", "duration": "1:57:45", "index": 2, "is_playable": true, "video_id": "PaCmpygFfXo", "thumbnails": [ { "height": 94, "width": 168 }, { "height": 110, "width": 196 } ] } ]}
What you send
The input
object of the request, with every field the endpoint accepts.
| Field | Type | Required | What it does | Example |
|---|---|---|---|---|
| url | string | yes | The playlist's link or ID. | PLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ |
| limit | integer | no | How many of its videos to return. | 10 |
| max_pages | integer | no | How many pages to read in this call. | 1 |
Fields it returns
What each record in the response holds, with the values from the sample above.
| Field | Type | What it is | Example |
|---|---|---|---|
| title | string | The playlist's title. | Neural Networks: Zero to Hero |
| has_more | boolean | Whether more items are available. | false |
| is_editable | boolean | Whether the playlist can be edited by the viewer. | false |
| last_updated | string | When the playlist was last updated, as YouTube writes it. | Last updated on Jun 9, 2024 |
| owner | string | Who made the playlist. | Andrej Karpathy |
| owner_channel_id | string | YouTube's ID for the owner's channel. | UCXUPKJO5MZQN11PqgIvyuvQ |
| pages | integer | How many pages were read for this answer. | 1 |
| playlist_id | string | YouTube's ID for the playlist. | PLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ |
| thumbnails | array | Thumbnail images in different sizes. | 3 records |
| thumbnails[].height | integer | Height in pixels. | 94 |
| thumbnails[].url | string | Link to the thumbnail image. | https://i.ytimg.com/vi/VMj-3S1tku0/hqdefault.jpg?sqp=-oaymwEWCK… |
| thumbnails[].width | integer | Width in pixels. | 168 |
| total_videos_text | string | How many videos, as YouTube writes it. | 10 videos |
| total_views_text | string | Total views, as YouTube writes them. | 3,178,754 views |
| url | string | The playlist's link. | https://www.youtube.com/playlist?list=PLAqhIrjkxbuWI23v9cThsA9G… |
| video_count | integer | How many videos the playlist has. | 10 |
| videos | array | The playlist's videos, in order. | 3 records |
| videos[].channel | string | The channel that posted it. | Andrej Karpathy |
| videos[].duration | string | The video's length as YouTube shows it. | 2:25:52 |
| videos[].index | integer | The video's position in the playlist. | 1 |
| videos[].is_playable | boolean | Whether the video can be played. | true |
| videos[].thumbnails | array | Thumbnail images in different sizes. | 3 records |
| videos[].thumbnails[].height | integer | 94 | |
| videos[].thumbnails[].width | integer | 168 | |
| videos[].title | string | The video's title. | The spelled-out intro to neural networks and backpropagation: b… |
| videos[].video_id | string | YouTube's ID for the video. | VMj-3S1tku0 |
Call it from your code, or ask your agent
Set UPSCRAPE_API_KEY to your key and copy a working request.
curl --request POST \ --url https://data.upscrape.com/execute \ --header "Authorization: Bearer $UPSCRAPE_API_KEY" \ --header "Content-Type: application/json" \ --header "Prefer: wait=30" \ --data '{ "capability": "youtube.playlist.get", "input": { "limit": 10, "max_pages": 1, "url": "PLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ" }}'
import jsonimport osimport requestspayload = json.loads(r'''{ "capability": "youtube.playlist.get", "input": { "limit": 10, "max_pages": 1, "url": "PLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ" }}''')response = requests.post( "https://data.upscrape.com/execute", headers={ "Authorization": f"Bearer {os.environ['UPSCRAPE_API_KEY']}", "Content-Type": "application/json", "Prefer": "wait=30", }, json=payload,)response.raise_for_status()print(json.dumps(response.json(), indent=2))
const response = await fetch("https://data.upscrape.com/execute", { method: "POST", headers: { "Authorization": `Bearer ${process.env.UPSCRAPE_API_KEY}`, "Content-Type": "application/json", "Prefer": "wait=30", }, body: JSON.stringify({ "capability": "youtube.playlist.get", "input": { "limit": 10, "max_pages": 1, "url": "PLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ" }}),});if (!response.ok) { throw new Error(`Upscrape request failed: ${response.status}`);}console.log(JSON.stringify(await response.json(), null, 2));
https://data.upscrape.com/mcp
With Upscrape, get the YouTube playlist for url "PLAqhIrjkxbuWI23v9cThsA9GvCAUhRvKZ". Tell me what it costs before you run it, then show the results as a table.
More from the YouTube API
- YouTube Video Scraper API1 credit
- YouTube Channel Scraper API1 credit
- YouTube Channel Videos Scraper API1 credit per 30 results
- YouTube Search Scraper API1 credit per 20 results
- YouTube Comments Scraper API1 credit per 20 results
- YouTube Channel Shorts Scraper API1 credit per 30 results
- YouTube Channel Live Streams Scraper API1 credit per 30 results
- YouTube Channel Playlists Scraper API1 credit per 30 results
- YouTube Channel Community Scraper API1 credit per 10 results
- YouTube Community Post Scraper API1 credit
- YouTube Hashtag Videos Scraper API1 credit per 36 results
- YouTube Trending Shorts Scraper API1 credit per 10 results
YouTube Playlist Scraper API FAQ
The short answers. The docs have the long ones.
How much does the YouTube Playlist Scraper API cost?
1 credit per 100 results per successful call, shown before it runs. You buy credits once, and paid credits never expire.
What do I send?
Send url. The input fields below list every option with its type and limits.
Do I need a YouTube login?
No. It reads public YouTube data; nothing runs on your account.
Can my AI agent call it?
Yes, over MCP: the agent finds youtube.playlist.get, checks its price and runs it with the same credits as the REST API.
Your first YouTube call is free.
Up to 100 free credits to start, no card needed.