danmaku_typestringจำเป็น
Message type
https://api.sandbase.ai/v1/api/tiktok/web/live-roomReturns danmaku and chat messages from a TikTok livestream room based on the provided room URL and message type.
เอาต์พุตของคุณจะแสดงที่นี่
กรอกอินพุตให้ครบ แล้วคลิก Run
This endpoint is meant to return danmaku and chat messages from a TikTok livestream room. It takes a room URL in live_room_url and a message type in danmaku_type. The real response currently returns only a notice that the online service is no longer available.
message_EN text to see how to get the source code for local deployment.curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/live-room" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"danmaku_type": "WebcastChatMessage", "live_room_url": "https://www.tiktok.com/@mpl.id.official/live"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
danmaku_type | string | Yes | Message type |
live_room_url | string | Yes | Live room link |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"message_EN": "This interface is no longer available online, you need to purchase the source co…",
"message_ZH": "该接口已不再提供线上服务,需要自行购买源代码后在本地部署使用,购买源代码请在Discord服务器联系管理员,Discord邀请链接:https://discor…",
"ws_url": "No longer available"
}
| Field | Meaning |
|---|---|
message_EN | English notice that the interface is no longer available online. It says you must buy the source code and deploy it locally. |
message_ZH | Chinese version of the same notice. It also points to a Discord server where you can contact the administrator to buy the source code. |
ws_url | Holds the text No longer available instead of a WebSocket address. |
danmaku_type (for example WebcastChatMessage) and live_room_url (for example https://www.tiktok.com/@mpl.id.official/live).$0.0015 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/tiktok/web/live-room" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"danmaku_type": "WebcastChatMessage",
"live_room_url": "https://www.tiktok.com/@mpl.id.official/live"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
danmaku_typestringจำเป็นMessage type
live_room_urlstringจำเป็นLive room link
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
ยังไม่มีการเผยแพร่การตอบกลับที่บันทึกไว้ ให้รัน API ใน Playground เพื่อดูการตอบกลับ
สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
TikTok Broadcast DanmakuAPI นี้ TikTok | $0.0015 ต่อการเรียก | JSON |
TikTok | $0.001 ต่อการเรียก | JSON |
TikTok | $0.001 ต่อการเรียก | JSON |
TikTok | $0.001 ต่อการเรียก | JSON |
TikTok | $0.001 ต่อการเรียก | JSON |
TikTok | $0.05 ต่อการเรียก | JSON |
คู่มือ:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/tiktok/web/live-room โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.0015 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: danmaku_type (string) และ live_room_url (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น TikTok Broadcast Danmaku ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง TikTok API แยกต่างหาก