cursorstring
Continuation token from a previous response for pagination.
https://api.sandbase.ai/v1/api/youtube/channel-community-postsList a YouTube channel's community posts by handle or channel ID with cursor pagination (text, likes, image, publish time).
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
Returns a list of community posts for a YouTube channel, with the post text, like count, image links and publish time. You pass a channel handle such as @MrBeast or a channelId.
likeCount across posts to see which posts get the most engagement.curl -X POST "https://api.sandbase.ai/v1/api/youtube/channel-community-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"handle": "@MrBeast"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
channelId | string | No | YouTube channel ID. |
cursor | string | No | Continuation token from a previous response for pagination. |
handle | string | No | YouTube channel handle. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"nextCursor": "cur_VMouee4IpseKyQo6IPoYVg",
"posts": [
{
"channelHandle": "MrBeast",
"channelId": "UCX6OQ3DkcsbYNE6H8uQQuVA",
"channelTitle": "MrBeast",
"content": "We spent $7,000,000 making the new MrBeast Lab animation series, and EPISODE 1 I…",
"createdUtc": 1793605689,
"id": "UgkxvMrKTpUbvqLPjv-lVi7N0wn68DV_NCBQ",
"image": "",
"likeCount": 9000,
"publishedTime": "1 day ago",
"url": "https://www.youtube.com/post/UgkxvMrKTpUbvqLPjv-lVi7N0wn68DV_NCBQ"
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
data.posts[] | List of community posts for the channel, as returned on this page. |
data.posts[].id | ID of the post. It also appears at the end of the post url. |
data.posts[].content | Text of the post. Long text can end with an ellipsis. |
data.posts[].likeCount | Number of likes on the post, as a whole number. |
data.posts[].createdUtc | Time the post was created, as a Unix timestamp in seconds. |
data.posts[].publishedTime | Relative publish time as shown on YouTube, for example 2 weeks ago. |
data.posts[].image / data.posts[].images[] | Image attached to the post. image is an empty string when the post has no image. images appears on posts that have images. |
data.posts[].url | Link to the post on YouTube. |
data.posts[].channelHandle / data.posts[].channelId / data.posts[].channelTitle | Handle, ID and display name of the channel that made the post. |
data.nextCursor | Token for the next page of posts. Send it as cursor. |
handle or channelId. The handle in the response (channelHandle) has no leading @.cursor set to the data.nextCursor value.id or url with YouTube Community Post.Billed at the actual cost of each call, about $0.0012 for the request above. Failed calls are not charged.
เริ่มสร้าง
เอ็นด์พอยต์ของ Platform API ที่มีการยืนยันตัวตนและการติดตามการใช้งานแบบรวมศูนย์
curl -X POST "https://api.sandbase.ai/v1/api/youtube/channel-community-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"handle": "@MrBeast"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
cursorstringContinuation token from a previous response for pagination.
handlestringYouTube channel handle.
channelIdstringYouTube channel ID.
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
YouTube | เริ่มต้นที่ $0.0012 ต่อครั้ง | JSON |
YouTube | เริ่มต้นที่ $0.00045 ต่อครั้ง | JSON |
YouTube | เริ่มต้นที่ $0.0012 ต่อครั้ง | JSON |
YouTube | เริ่มต้นที่ $0.0012 ต่อครั้ง | JSON |
YouTube | $0.014286 ต่อการเรียก | JSON |
YouTube | $0.014286 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/youtube/channel-community-posts โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
เริ่มต้นที่ $0.0012 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ไม่ต้องระบุพารามิเตอร์ ตัวเลือก: cursor (string), handle (string) และ channelId (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น YouTube Channel Community Posts ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง YouTube API แยกต่างหาก