room_idstringจำเป็น
Live room ID
https://api.sandbase.ai/v1/api/bilibili/web/live-room-detailReturns detailed metadata and status information for a specified Bilibili live broadcast room based on the provided room identifier.
[
{
"data": {
"code": 0,
"data": {
"allow_change_area_time": 0,
"allow_upload_cover_time": 0,
"area_id": 371,
"area_name": "虚拟日常",
"area_pendants": "",
"attention": 880063,
"background": "https://i0.hdslb.com/bfs/live/room_bg/c4eed3ef37ef4cd30bbcac7491a7ed9ac78e1459.jpg",
"battle_id": 0,
"description": "",
"hot_words": [
"2333333",
"喂,妖妖零吗",
"红红火火恍恍惚惚",
"… 15 more items in the full response"
],
"hot_words_status": 0,
"is_anchor": 0,
"is_portrait": false,
"is_strict_room": false,
"keyframe": "",
"live_status": 2,
"live_time": "0000-00-00 00:00:00",
"new_pendants": {
"badge": {
"desc": "bilibili 知名虚拟UP主",
"name": "v_person",
"position": 3,
"value": ""
},
"frame": {
"area": 0,
"area_old": 0,
"bg_color": "",
"bg_pic": "",
"desc": "",
"name": "",
"position": 0,
"use_old_area": false,
"value": ""
},
"mobile_badge": null,
"mobile_frame": {
"area": 0,
"area_old": 0,
"bg_color": "",
"bg_pic": "",
"desc": "",
"name": "",
"position": 0,
"use_old_area": false,
"value": ""
}
},
"old_area_id": 6,
"online": 0,
"parent_area_id": 9,
"parent_area_name": "虚拟主播",
"pendants": "",
"pk_id": 0,
"pk_status": 0,
"room_id": 22816111,
"room_silent_level": 3,
"room_silent_second": -1,
"room_silent_type": "medal",
"short_id": 0,
"studio_info": {
"master_list": [],
"status": 0
},
"tags": "",
"title": "【情感电台】找小三",
"uid": 1437582453,
"up_session": "",
"user_cover": "https://i0.hdslb.com/bfs/live/new_room_cover/64815ee2f89dc6f9596d6fc4d607fd5f2eca69b6.jpg",
"verify": ""
},
"message": "ok",
"msg": "ok"
}
}
]เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
Returns metadata and status for one Bilibili live room, including its title, streamer ID, area, cover image and live status. It needs a single input, the room_id of the live room.
data.live_status.uid for a room, then look up that user's profile.data.parent_area_name and data.area_name.curl -X POST "https://api.sandbase.ai/v1/api/bilibili/web/live-room-detail" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"room_id": "22816111"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
room_id | string | Yes | Live room ID |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"code": 0,
"data": {
"allow_change_area_time": 0,
"allow_upload_cover_time": 0,
"area_id": 745,
"area_name": "虚拟Gamer",
"area_pendants": "",
"attention": 892815,
"background": "https://i0.hdslb.com/bfs/live/room_bg/c4eed3ef37ef4cd30bbcac7491a7ed9ac78e1459.j…",
"battle_id": 0,
"description": "",
"hot_words": [
"2333333"
],
"hot_words_status": 0,
"is_anchor": 0
},
"message": "ok",
"msg": "ok"
}
| Field | Meaning |
|---|---|
data.room_id / data.short_id | The numeric room ID. short_id is the short room ID, and 0 means no short ID is set for this room. |
data.uid | The user ID of the room owner. |
data.title | The current title of the live room. |
data.live_status | The broadcast state code of the room. This sample returns 2, with online at 0 and live_time at 0000-00-00 00:00:00. |
data.live_time | The start time of the current broadcast as a YYYY-MM-DD HH:MM:SS string. The value 0000-00-00 00:00:00 appears when no start time is set. |
data.parent_area_id / data.parent_area_name | The ID and name of the top-level category the room belongs to. |
data.area_id / data.area_name | The ID and name of the sub-category the room belongs to. |
data.attention | The follower count for the room, as shown in this response (892815). |
data.user_cover / data.background / data.keyframe | Image URLs for the room cover and the room background. keyframe is an empty string in this sample. |
data.hot_words[] | A list of preset hot words (quick chat phrases) for the room. |
room_id is passed as a string, for example "22816111". The response returns data.room_id as a number.data.uid from this response as the input to a user API such as Bilibili User Profile.data.area_id and data.parent_area_id with Bilibili Streaming Areas to match the IDs to the full list of categories.$0.001 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/bilibili/web/live-room-detail" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"room_id": "22816111"
}'ตั้งค่า SandBase API key ของคุณในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอจะใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์
room_idstringจำเป็นLive room ID
บันทึกตัวอย่างการตอบกลับสำหรับ API นี้; จะไม่มีการส่งคำขอจริงเมื่อเปิดดู
[
{
"data": {
"code": 0,
"data": {
"allow_change_area_time": 0,
"allow_upload_cover_time": 0,
"area_id": 371,
"area_name": "虚拟日常",
"area_pendants": "",
"attention": 880063,
"background": "https://i0.hdslb.com/bfs/live/room_bg/c4eed3ef37ef4cd30bbcac7491a7ed9ac78e1459.jpg",
"battle_id": 0,
"description": "",
"hot_words": [
"2333333",
"喂,妖妖零吗",
"红红火火恍恍惚惚",
"… 15 more items in the full response"
],
"hot_words_status": 0,
"is_anchor": 0,
"is_portrait": false,
"is_strict_room": false,
"keyframe": "",
"live_status": 2,
"live_time": "0000-00-00 00:00:00",
"new_pendants": {
"badge": {
"desc": "bilibili 知名虚拟UP主",
"name": "v_person",
"position": 3,
"value": ""
},
"frame": {
"area": 0,
"area_old": 0,
"bg_color": "",
"bg_pic": "",
"desc": "",
"name": "",
"position": 0,
"use_old_area": false,
"value": ""
},
"mobile_badge": null,
"mobile_frame": {
"area": 0,
"area_old": 0,
"bg_color": "",
"bg_pic": "",
"desc": "",
"name": "",
"position": 0,
"use_old_area": false,
"value": ""
}
},
"old_area_id": 6,
"online": 0,
"parent_area_id": 9,
"parent_area_name": "虚拟主播",
"pendants": "",
"pk_id": 0,
"pk_status": 0,
"room_id": 22816111,
"room_silent_level": 3,
"room_silent_second": -1,
"room_silent_type": "medal",
"short_id": 0,
"studio_info": {
"master_list": [],
"status": 0
},
"tags": "",
"title": "【情感电台】找小三",
"uid": 1437582453,
"up_session": "",
"user_cover": "https://i0.hdslb.com/bfs/live/new_room_cover/64815ee2f89dc6f9596d6fc4d607fd5f2eca69b6.jpg",
"verify": ""
},
"message": "ok",
"msg": "ok"
}
}
]สำรวจเพิ่มเติม
| API | ราคา | การตอบกลับ |
|---|---|---|
Bilibili Live Room DetailsAPI นี้ Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
Bilibili | $0.001 ต่อการเรียก | JSON |
คำถาม
ส่งคำขอ POST ไปที่ https://api.sandbase.ai/v1/api/bilibili/web/live-room-detail โดยใส่ SandBase API key ของคุณใน Authorization header (Bearer) และส่งพารามิเตอร์เป็น JSON body คุณยังสามารถลองใช้ได้ใน Playground บนหน้านี้โดยไม่ต้องเขียนโค้ด
$0.001 ต่อครั้ง คิดจากยอดคงเหลือ SandBase ของคุณ คุณจะถูกเรียกเก็บเฉพาะคำขอที่คุณส่งเท่านั้น ไม่มีค่าสมาชิกรายเดือน
ที่ต้องระบุ: room_id (string). ตาราง Parameters และ Playground ในหน้านี้แสดงทุกฟิลด์
การตอบกลับ JSON ที่ส่งกลับในคำขอ HTTP เดียวกัน (แบบซิงโครนัส) README บนหน้านี้มีตัวอย่างการตอบกลับ
ไม่จำเป็น Bilibili Live Room Details ทำงานผ่าน SandBase ดังนั้น SandBase API key เดียวครอบคลุม endpoint นี้และทุก API กับโมเดลอื่นในแค็ตตาล็อก คุณไม่ต้องสมัครขอสิทธิ์เข้าถึง Bilibili API แยกต่างหาก