durationintegerbắt buộc
Video total duration
https://api.sandbase.ai/v1/api/douyin/web/one-video-danmakuReturns danmaku comment records for a Douyin video across a specified playback interval. Filter by video ID, total duration, start time, and end time.
[
{
"data": {
"danmaku_list": null,
"end_time": 32000,
"extra": {
"fatal_item_ids": [],
"logid": "202608201743577585872A9B8DD98ED56A",
"now": 1787219037000
},
"log_pb": {
"impr_id": "202608201743577585872A9B8DD98ED56A"
},
"start_time": 0,
"status_code": 0,
"total": 6
}
}
]Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.
Returns danmaku (scrolling comment) data for one Douyin video over a playback window. You send the video item_id, the video's total duration, and a start_time and end_time for the window.
curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/one-video-danmaku" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"duration": 15134, "end_time": 15133, "item_id": "7355433624046472498", "start_time": 0}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
duration | integer | Yes | Video total duration |
end_time | integer | Yes | End time |
item_id | string | Yes | Video id |
start_time | integer | Yes | Start time |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"danmaku_list": null,
"end_time": 32000,
"extra": {
"fatal_item_ids": [],
"logid": "202611031532288DC7ADE63C0205E3F5CF",
"now": 1793691148000
},
"log_pb": {
"impr_id": "202611031532288DC7ADE63C0205E3F5CF"
},
"start_time": 0,
"status_code": 0,
"total": 6
}
| Field | Meaning |
|---|---|
danmaku_list | List of danmaku comment records for the requested window. It is null in this response, so no records came back for this request. |
total | Count of danmaku comments reported for the video. This response shows 6. |
start_time / end_time | Start and end of the playback window that the response covers. This response shows 0 and 32000, which differs from the end_time of 15133 in the request. |
status_code | Result code of the call. 0 in this response. |
extra.fatal_item_ids | List of video IDs that failed to load. It is empty here. |
extra.logid / log_pb.impr_id | Request identifiers. They carry the same value in this response. |
extra.now | Server time as a 13-digit number, which looks like a Unix timestamp in milliseconds. |
item_id from a Douyin video URL with Douyin Batch Video ID Extraction or Douyin Video ID Extractor.duration from Douyin Single Video Details (V1).end_time can differ from the end_time you send, so read it to see the window that was returned.danmaku_list can be null even when total is above 0, so check both fields.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/one-video-danmaku" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"item_id": "7355433624046472498",
"duration": 15134,
"end_time": 15133,
"start_time": 0
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
durationintegerbắt buộcVideo total duration
end_timeintegerbắt buộcEnd time
item_idstringbắt buộcVideo id
start_timeintegerbắt buộcStart time
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
[
{
"data": {
"danmaku_list": null,
"end_time": 32000,
"extra": {
"fatal_item_ids": [],
"logid": "202608201743577585872A9B8DD98ED56A",
"now": 1787219037000
},
"log_pb": {
"impr_id": "202608201743577585872A9B8DD98ED56A"
},
"start_time": 0,
"status_code": 0,
"total": 6
}
}
]Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
Douyin Video DanmakuAPI này Douyin | $0.001 mỗi lần gọi | JSON |
Douyin | $0.001 mỗi lần gọi | JSON |
Douyin | $0.001 mỗi lần gọi | JSON |
Douyin | $0.001 mỗi lần gọi | JSON |
Douyin | $0.001 mỗi lần gọi | JSON |
Douyin | $0.03 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/douyin/web/one-video-danmaku 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.
$0.001 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: duration (integer), end_time (integer), item_id (string) và start_time (integer). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
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.
Không. Douyin Video Danmaku 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.