playlistIdstringbắt buộc
The playlist ID: the "list" parameter in a playlist URL (e.g. "PLu0W_9lII9ahIappRPN0MCAgtOu3lQjQi").
https://api.sandbase.ai/v1/api/youtube/playlistList every video in a YouTube playlist (title, length, and channel per video plus playlist owner and totals).
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
Returns the videos in a YouTube playlist, plus the playlist title, owner, and total video count. It needs one input: the playlistId from the list parameter of a playlist URL.
lengthSeconds across a playlist to estimate its total running time.curl -X POST "https://api.sandbase.ai/v1/api/youtube/playlist" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"playlistId": "PLMC9KNkIncKtPzgY-5rmhvj7fax8fdxoj"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
playlistId | string | Yes | The playlist ID: the "list" parameter in a playlist URL (e.g. "PLu0W_9lII9ahIappRPN0MCAgtOu3lQjQi"). |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"authorHandle": "Redlist-JustHits",
"authorId": "UCs72iRpTEuwV3y6pdWYLgiw",
"authorUrl": "https://www.youtube.com/@Redlist-JustHits",
"owner": "Redlist - Just Hits",
"title": "Pop Music Playlist - Timeless Pop Songs (Updated Weekly 2026)",
"totalVideos": 200,
"videos": [
{
"channel": "Lady Gaga",
"id": "kPa7bsKwL-c",
"lengthSeconds": 253,
"lengthText": "4:13",
"thumbnail": "https://i.ytimg.com/vi/kPa7bsKwL-c/hqdefault.jpg?sqp=-oaymwEnCNACELwBSFryq4qpAxk…",
"title": "Lady Gaga, Bruno Mars - Die With A Smile (Official Music Video)",
"url": "https://www.youtube.com/watch?v=kPa7bsKwL-c"
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
data.title | Title of the playlist. |
data.owner / data.authorHandle | Display name and @handle of the channel that owns the playlist. |
data.authorId / data.authorUrl | ID and URL of the owner's channel. |
data.totalVideos | Number of videos in the playlist, as reported for the playlist as a whole. |
data.videos[].id | YouTube video ID. It matches the v value in data.videos[].url. |
data.videos[].title | Title of the video. |
data.videos[].channel | Name of the channel that posted the video. It can differ from the playlist owner. |
data.videos[].lengthSeconds / data.videos[].lengthText | Video length as a number of seconds and as display text such as 4:13. |
data.videos[].url / data.videos[].thumbnail | Link to the video's watch page and to its thumbnail image. |
found | true when the playlist was found. |
playlistId from the list parameter in a playlist URL, for example PLMC9KNkIncKtPzgY-5rmhvj7fax8fdxoj.data.totalVideos with the length of data.videos to see how many videos came back.data.videos[].id to YouTube Video Details for more about one video.Billed at the actual cost of each call, about $0.0012 for the request above. Failed calls are not charged.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/youtube/playlist" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"playlistId": "PLMC9KNkIncKtPzgY-5rmhvj7fax8fdxoj"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
playlistIdstringbắt buộcThe playlist ID: the "list" parameter in a playlist URL (e.g. "PLu0W_9lII9ahIappRPN0MCAgtOu3lQjQi").
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
YouTube PlaylistAPI này YouTube | Từ $0.0012 mỗi lần gọi | JSON |
YouTube | Từ $0.00045 mỗi lần gọi | JSON |
YouTube | Từ $0.0012 mỗi lần gọi | JSON |
YouTube | Từ $0.0012 mỗi lần gọi | JSON |
YouTube | Từ $0.0012 mỗi lần gọi | JSON |
YouTube | $0.014286 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/youtube/playlist với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
Từ $0.0012 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: playlistId (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. YouTube Playlist chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của YouTube.