Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Douyin Stream Data by Room ID (V2)

Tài liệu API
https://api.sandbase.ai/v1/api/douyin/web/user-live-videos-by-room-id-v2

Returns stream data for a specified Douyin user using a room identifier. Provide a valid room ID to inspect stream metadata and broadcast details.

Giá
$0.001USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 0 tùy chọn
100 lượt gọi miễn phí / ngày100 lượt gọi đầu tiên mỗi ngày miễn phí (chia sẻ theo tổ chức) · Đặt lại lúc 00:00 UTC. Sau đó tính phí theo mỗi lượt gọi.

Phòng thử nghiệm

Đầu vào
Room room_id
Đầu raVí dụ
Phản hồioutputs · 215 B · 14 dòng
[
  {
    "data": {
      "data": {
        "message": "Request params error",
        "prompts": "当前服务繁忙,请稍后重试"
      },
      "extra": {
        "now": 1787219017260
      },
      "status_code": 10011
    }
  }
]

Ví dụ

Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.

README API

Douyin Stream Data by Room ID (V2) API

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.

Use cases

  • Read the cover image URL and average color of a Douyin live room for display in a monitoring dashboard.
  • Check whether a live room shows a shopping cart by reading the e-commerce settings.
  • Inspect room-level flags such as virtual anchor status or geo block before further processing.
  • Log the server timestamp of each lookup to track when a room record was fetched.

Request

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.

Parameters

NameTypeRequiredDescription
room_idstringYesRoom room_id

Example response

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
}

Response fields

FieldMeaning
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_coloruri is the cover image identifier. avg_color is the average color of the image as a hex code.
data.cover.width / data.cover.heightCover image size values. Both are 0 in the sample response.
data.ecom_data.room_cart_v2.show_cartNumeric flag for the room shopping cart display. The sample value is 2.
data.extra.is_virtual_anchorBoolean that shows whether the anchor is a virtual anchor.
data.extra.geo_blockNumeric geo block flag for the room. The sample value is 0.
data.AnchorABMapMap 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_timeNumeric room attributes. All are 0 in the sample response, so they carry no detail for this room.
extra.nowTimestamp of the response in milliseconds, as shown by the 13-digit value.

Notes

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Douyin$0.001 mỗi lần gọiJSON
Douyin$0.001 mỗi lần gọiJSON
Douyin$0.001 mỗi lần gọiJSON
Douyin$0.001 mỗi lần gọiJSON
Douyin$0.001 mỗi lần gọiJSON
Douyin$0.03 mỗi lần gọiJSON

Hướng dẫn:Best Douyin API in 2026: Pricing Compared

Câu hỏi

FAQ

Làm thế nào để dùng API Douyin Stream Data by Room ID (V2)?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/douyin/web/user-live-videos-by-room-id-v2 với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.

API Douyin Stream Data by Room ID (V2) có giá bao nhiêu?

$0.001 mỗi lần gọi. Mỗi tổ chức được 100 lần gọi miễn phí mỗi ngày UTC, dùng chung cho các API SandBase đủ điều kiện, bao gồm API này; sau đó mỗi lần gọi sẽ được tính theo mức giá này từ số dư SandBase của bạn. Không có gói đăng ký.

API Douyin Stream Data by Room ID (V2) chấp nhận những tham số nào?

Bắt buộc: room_id (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Douyin Stream Data by Room ID (V2) trả về gì?

Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.

Tôi có cần tài khoản nhà phát triển hoặc API key của Douyin không?

Không. Douyin Stream Data by Room ID (V2) chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Douyin.