Playlists
YouTube Playlist API
Get every video in a YouTube playlist in order, with IDs, titles, and durations ready to pipe into your next request.
Pass a playlist URL and get back every video in order. Each item includes the video ID, title, author, publish date, and thumbnails. Continuation tokens handle collections of any size.
The common pattern: pull the playlist, then call the transcript or details endpoint for each video ID. Two requests turn any course or curated series into a fully processed dataset.
Endpoint
POST https://api.stophy.dev/v1/playlist
1curl -X POST https://api.stophy.dev/v1/playlist \2 -H "Authorization: Bearer $STOPHY_API_KEY" \3 -H "Content-Type: application/json" \4 -d '{"playlistUrl":"https://youtube.com/playlist?list=PLrAXtmRdnEQy6nuLMHjMZOz59O"}'1{2 "playlist": {3 "id": "PLrAXtmRdnEQy6nuLMHjMZOz59O",4 "title": "Intro to TypeScript",5 "author": "Theo - t3.gg",6 "videoCount": "12"7 },8 "items": [9 {10 "id": "ukzFI9rgwfU",11 "videoUrl": "https://youtube.com/watch?v=ukzFI9rgwfU",12 "title": "TypeScript in 60 seconds",13 "author": "Theo - t3.gg",14 "duration": "1:02",15 "publishedAt": "2023-03-15T00:00:00Z"16 }17 ],18 "continuationToken": "4qmF..."19}What you can do
Ordered with full metadata
Videos in playlist order. Each item carries its ID, title, author, publish date, and two thumbnail sizes.
Any size, no dropped entries
Continuation tokens handle playlists with thousands of entries without missing a single video.
IDs ready for other endpoints
Each video ID plugs directly into the transcript, details, and comments endpoints, making batch processing a simple loop.
Common use cases
- Turn a course playlist into a transcribed, searchable knowledge base
- Batch-fetch metadata and thumbnails for every video in a collection
- Mirror a playlist's order into your own database or queue
- Build a list of video IDs for an agent to process one by one
Frequently asked questions
- How do I get all the videos from a long playlist?
- Each response includes a continuationToken when more items exist. Keep passing it back until it is absent and you will have the complete ordered list.
- Are videos returned in playlist order?
- Yes. Items keep the playlist's original order, which is what you need when processing a course or series sequentially.
- Can I feed these video IDs into the transcript endpoint?
- That is the most common pattern. Take the id from each playlist item and pass it as the videoUrl to the transcript or details endpoint to process the whole playlist.