Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

YouTube Channel Playlists

Tài liệu API
https://api.sandbase.ai/v1/api/youtube/channel-playlists

List a YouTube channel's playlists by handle or channel ID with cursor pagination (title, video count, thumbnail).

Giá
Từ $0.0012USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
0 bắt buộc · 3 tùy chọn

Phòng thử nghiệm

Đầu vào
Continuation token from a previous response for pagination.
YouTube channel handle.
YouTube channel ID.
Đầu raSẵn sàng

Đầu ra của bạn sẽ xuất hiện ở đây

Hoàn tất đầu vào, rồi nhấp Run.

README API

YouTube Channel Playlists API

Returns the playlists of a YouTube channel, with each playlist's title, video count, thumbnail and links. It needs a channel handle such as @veritasium or a channelId.

Use cases

  • Build a table of contents for a creator's content by listing every playlist and its size.
  • Find a channel's topic series, such as Biology or Computing, to group its videos by subject.
  • Collect playlist URLs to feed into a playlist tracker or a content audit.
  • Show playlist cover images in a channel directory or a recommendation widget.

Request

curl -X POST "https://api.sandbase.ai/v1/api/youtube/channel-playlists" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"handle": "@veritasium"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
channelIdstringNoYouTube channel ID.
cursorstringNoContinuation token from a previous response for pagination.
handlestringNoYouTube channel handle.

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": {
    "nextCursor": null,
    "playlists": [
      {
        "id": "PLkahZjV5wKe8w9GC_n2yyhx6Wj-NKzzeE",
        "playlistUrl": "https://www.youtube.com/playlist?list=PLkahZjV5wKe8w9GC_n2yyhx6Wj-NKzzeE",
        "thumbnail": "https://i.ytimg.com/vi/AaZ_RSt0KP8/hqdefault.jpg?sqp=-oaymwEXCOADEI4CSFryq4qpAwk…",
        "title": "Computing",
        "videoCount": 5,
        "videoId": "AaZ_RSt0KP8",
        "videoUrl": "https://www.youtube.com/watch?v=AaZ_RSt0KP8"
      }
    ]
  },
  "found": true
}

Response fields

FieldMeaning
data.playlists[].idThe playlist ID. It starts with PL and works as the list value in the playlist URL.
data.playlists[].titleThe playlist name, for example Computing.
data.playlists[].videoCountThe number of videos in the playlist.
data.playlists[].playlistUrlA direct link to the playlist page on YouTube.
data.playlists[].thumbnailThe thumbnail image URL for the playlist.
data.playlists[].videoId / data.playlists[].videoUrlThe ID and watch link of the video that supplies the thumbnail. This is the video shown as the playlist cover.
data.nextCursorThe token for the next page of playlists. It is null when there are no more pages.
foundtrue when the channel was found.

Notes

  • Send either handle (with the leading @) or channelId. The example request uses handle.
  • To page through results, pass the data.nextCursor value as cursor in the next request. Stop when it is null.
  • To list the videos in a playlist, pass its id to YouTube Playlist.
  • To get the channel's own uploads, use YouTube Channel Videos.

Pricing

Billed at the actual cost of each call, about $0.0012 for the request above. Failed calls are not charged.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
YouTubeTừ $0.0012 mỗi lần gọiJSON
YouTubeTừ $0.00045 mỗi lần gọiJSON
YouTubeTừ $0.0012 mỗi lần gọiJSON
YouTubeTừ $0.0012 mỗi lần gọiJSON
YouTube$0.014286 mỗi lần gọiJSON
YouTube$0.014286 mỗi lần gọiJSON

Hướng dẫn:Best YouTube API in 2026: Pricing Compared

Câu hỏi

FAQ

Làm thế nào để dùng API YouTube Channel Playlists?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/youtube/channel-playlists 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.

API YouTube Channel Playlists có giá bao nhiêu?

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ý.

API YouTube Channel Playlists chấp nhận những tham số nào?

Không có tham số bắt buộc. Tùy chọn: cursor (string), handle (string) và channelId (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API YouTube Channel Playlists trả về gì?

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.

Tôi có cần tài khoản nhà phát triển hoặc API key của YouTube không?

Không. YouTube Channel Playlists 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.