channelIdstringจำเป็น
The unique identifier for a YouTube channel.
https://api.sandbase.ai/v1/api/youtube/channel-videosGet public videos from a YouTube channel, with optional cursor-based pagination. Use it to browse a channel's uploads and continue through additional result pages.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns a list of public videos from a YouTube channel, plus basic channel details. It needs a channelId and accepts an optional cursor to fetch the next page.
video_id values to look up details, comments or transcripts for each video.curl -X POST "https://api.sandbase.ai/v1/api/youtube/channel-videos" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channelId": "UCuAXFkgsw1L7xaCfnd5JJOw"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
channelId | string | Yes | The unique identifier for a YouTube channel. |
cursor | string | No | The cursor for pagination. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"channel": {
"avatar": "https://yt3.googleusercontent.com/_ShEGOdg-t5YGJse14Ooq6FYBZqX_QSlhaTNjG06miYusm…",
"description": "Rick Astley’s Swinging Christmas 2026 🎄 Dec 9th, Royal Albert Hall. SOLD OUT ❤️\n",
"handle_url": "http://www.youtube.com/@RickAstleyYT",
"id": "UCuAXFkgsw1L7xaCfnd5JJOw",
"is_family_safe": true,
"is_verified": false,
"keywords": "Official Rick Astley \"rick astley\" \"never gonna give you up\" \"the best of me\" \"b…",
"name": "Rick Astley",
"rss_url": "https://www.youtube.com/feeds/videos.xml?channel_id=UCuAXFkgsw1L7xaCfnd5JJOw",
"url": "https://www.youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw"
},
"continuation_token": "4qmFsgLZ…",
"videos": [
{
"description": "",
"duration": "3:51",
"duration_accessibility": "3分钟51秒钟",
"is_live": false,
"is_verified": false,
"moving_thumbnail": "",
"playback_url": "https://rr6---sn-bvvbaxivnuxq5uu-q4fz.googlevideo.com/initplayback?source=youtub…",
"published_time": "4个月前",
"short_view_count": "11万次观看",
"thumbnail": "https://i.ytimg.com/vi/PXC_PYeB6F8/hq720.jpg?sqp=-oaymwEcCNAFEJQDSFXyq4qpAw4IARU…",
"thumbnails": [
{
"height": 202,
"url": "https://i.ytimg.com/vi/PXC_PYeB6F8/hq720.jpg?sqp=-oaymwEcCOgCEMoBSFXyq4qpAw4IARU…",
"width": 360
}
],
"title": "Rick Astley - Angels On My Side (Live at The O2, London, April 2026)"
}
]
}
| Field | Meaning |
|---|---|
channel.id / channel.name | The channel ID and display name. |
channel.url / channel.handle_url / channel.rss_url | Links to the channel page, its @handle page and its RSS feed of uploads. |
channel.description / channel.keywords | The channel's description text and keyword string. |
videos[].video_id / videos[].url | The video ID and the full watch link. |
videos[].title | The video title. |
videos[].duration | Video length as text, for example 3:51. |
videos[].view_count / videos[].short_view_count | View count as display text, not a number. The text follows the language of the response, so parse it with care. |
videos[].published_time | Relative publish time as text, for example "4个月前" (4 months ago). It is not an exact date. |
videos[].thumbnail / videos[].thumbnails[] | The main thumbnail URL and a list of thumbnail URLs with width and height. |
continuation_token | Token for the next page of videos. Pass it as cursor in the next request. |
continuation_token from the response as cursor to get the next page.channelId starts with UC, as in UCuAXFkgsw1L7xaCfnd5JJOw. The channel url in the response shows where it appears.video_id from this response with YouTube Video Details to get more about one video.$0.014286 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/youtube/channel-videos" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"channelId": "UCuAXFkgsw1L7xaCfnd5JJOw"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
channelIdstringจำเป็นThe unique identifier for a YouTube channel.
cursorstringThe cursor for pagination.
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
YouTube Channel VideosAPI นี้ YouTube | $0.014286 ต่อการเรียก | JSON |
YouTube | เริ่มต้นที่ $0.00045 ต่อครั้ง | JSON |
YouTube | เริ่มต้นที่ $0.0012 ต่อครั้ง | JSON |
YouTube | เริ่มต้นที่ $0.0012 ต่อครั้ง | JSON |
YouTube | เริ่มต้นที่ $0.0012 ต่อครั้ง | JSON |
YouTube | $0.014286 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/youtube/channel-videos โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.014286 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: channelId (string). ตัวเลือก: cursor (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น YouTube Channel Videos ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง YouTube API แยกต่างหาก