room_idstring必填
Room room_id
https://api.sandbase.ai/v1/api/douyin/web/user-live-videos-by-room-id-v2Returns stream data for a specified Douyin user using a room identifier. Provide a valid room ID to inspect stream metadata and broadcast details.
[
{
"data": {
"data": {
"message": "Request params error",
"prompts": "当前服务繁忙,请稍后重试"
},
"extra": {
"now": 1787219017260
},
"status_code": 10011
}
}
]选择一个示例,将其输入和结果加载到 playground 中。
Returns the live room record for one Douyin room, looked up by room_id. The response holds cover image data, e-commerce flags, room settings and a map of anchor feature flags.
curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/user-live-videos-by-room-id-v2" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"room_id": "7462723839303093032"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
room_id | string | Yes | Room room_id |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"AnchorABMap": {
"ab_admin_comment_on_wall": "0",
"ab_friend_chat": "4",
"admin_privilege_refine": "2",
"allow_shared_to_fans": "false",
"audience_linkmic_continue": "0",
"audio_double_enlarge_enable": "1",
"audio_room_subtitle_opt": "3",
"battle_match_rebuild_anchor": "2",
"big_party_enable_open_camera": "2",
"chat_intercommunicate_multi_anchor": "2",
"chat_intercommunicate_pk": "2",
"double_enlarge_enable": "1"
},
"acquaintance_status": 0,
"admin_user_ids": [],
"admin_user_open_ids": [],
"anchor_scheduled_time_text": "",
"anchor_share_text": "",
"anchor_tab_type": 0,
"app_id": 0,
"assist_label_list": [],
"auth_city": "",
"auto_cover": 0,
"base_category": 0
},
"extra": {
"now": 1793691152950
},
"status_code": 0
}
| Field | Meaning |
|---|---|
data.cover.url_list[] | Cover image URLs for the room. Each entry is a signed link to the same image on a different host. |
data.cover.uri / data.cover.avg_color | uri is the cover image identifier. avg_color is the average color of the image as a hex code. |
data.cover.width / data.cover.height | Cover image size values. Both are 0 in the sample response. |
data.ecom_data.room_cart_v2.show_cart | Numeric flag for the room shopping cart display. The sample value is 2. |
data.extra.is_virtual_anchor | Boolean that shows whether the anchor is a virtual anchor. |
data.extra.geo_block | Numeric geo block flag for the room. The sample value is 0. |
data.AnchorABMap | Map of feature flag names to string values for the anchor. Use it to see which room features are set. |
data.admin_user_ids[] | List of room admin user IDs. It is empty in the sample response. |
data.business_live / data.category / data.create_time | Numeric room attributes. All are 0 in the sample response, so they carry no detail for this room. |
extra.now | Timestamp of the response in milliseconds, as shown by the 13-digit value. |
room_id as a string, for example 7462723839303093032.room_id from a live room link, call Douyin Webcast ID Extraction to get the webcast ID, then Douyin Webcast ID to Room ID.status_code of 0 appears in the sample response alongside the data object.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
开始构建
具备统一身份验证和使用情况跟踪的平台 API 端点。
curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/user-live-videos-by-room-id-v2" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"room_id": "example"
}'将您的 SandBase API 密钥设置到服务器环境中。请求使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_KEY"请将密钥保存在服务器端。不要在浏览器代码中暴露它。
room_idstring必填Room room_id
这是该 API 保存的示例响应;查看时不会发起实时请求。
[
{
"data": {
"data": {
"message": "Request params error",
"prompts": "当前服务繁忙,请稍后重试"
},
"extra": {
"now": 1787219017260
},
"status_code": 10011
}
}
]探索更多
| API | 价格 | 响应 |
|---|---|---|
Douyin | $0.001 每次调用 | JSON |
Douyin | $0.001 每次调用 | JSON |
Douyin | $0.001 每次调用 | JSON |
Douyin | $0.001 每次调用 | JSON |
Douyin | $0.001 每次调用 | JSON |
Douyin | $0.03 每次调用 | JSON |
问题
向 https://api.sandbase.ai/v1/api/douyin/web/user-live-videos-by-room-id-v2 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。
每次调用 $0.001。每个组织在每个 UTC 日可获得 100 次免费调用,适用于包括此接口在内的所有符合条件的 SandBase APIs;超过后,每次调用将按此价格从您的 SandBase 余额中扣费。无需订阅。
必填:room_id (string)。 Parameters 表和本页的 Playground 列出了每个字段。
在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。
不需要。Douyin Stream Data by Room ID (V2) 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Douyin API 访问权限。