Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

YouTube Channel Playlists

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

價格
自 $0.0012 起美元/次呼叫
方法
POST
回應
JSON
參數
0 個必填 · 3 個選填

Playground

輸入
Continuation token from a previous response for pagination.
YouTube channel handle.
YouTube channel ID.
輸出就緒

您的輸出會顯示在這裡

完成輸入後,點擊執行。

API README

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.

探索更多

相關 APIs

所有 APIs
API價格回應
YouTube每次呼叫 $0.0012 起JSON
YouTube每次呼叫 $0.00045 起JSON
YouTube每次呼叫 $0.0012 起JSON
YouTube每次呼叫 $0.0012 起JSON
YouTube每次呼叫 $0.014286JSON
YouTube每次呼叫 $0.014286JSON

指南:Best YouTube API in 2026: Pricing Compared

問題

常見問題

我要如何使用 YouTube Channel Playlists API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/youtube/channel-playlists。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

YouTube Channel Playlists API 的費用是多少?

每次起 $0.0012,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

YouTube Channel Playlists API 接受哪些參數?

不需要任何參數。 選填:cursor (string), handle (string) 和 channelId (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

YouTube Channel Playlists API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 YouTube 開發者帳號或 API 金鑰嗎?

不需要。YouTube Channel Playlists 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 YouTube API 存取權。