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

TikTok Stream Status Check

Tài liệu API
https://api.sandbase.ai/v1/api/tiktok/web/check-live-alive

Checks the active broadcast state of a specified TikTok room. Returns room identifier data and a boolean flag indicating whether the stream is active.

Giá
$0.002USD / 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

Phòng thử nghiệm

Đầu vào
Live room ID
Đầu raVí dụ
Phản hồioutputs · 443 B · 21 dòng
[
  {
    "data": {
      "live_room_status": {
        "cookie": "tt_chain_token=1Cd42OskCAaGuPIQ6aFMqQ==;",
        "data": [
          {
            "alive": false,
            "room_id": 7674625312902925000,
            "room_id_str": "7674625312902925057"
          }
        ],
        "extra": {
          "now": 1787104340418
        },
        "status_code": 0,
        "tt_chain_token": "1Cd42OskCAaGuPIQ6aFMqQ=="
      }
    }
  }
]

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

TikTok Stream Status Check API

Returns whether a single TikTok live room is broadcasting right now. It needs one input, the live room_id, and returns that ID with an alive true or false flag.

Use cases

  • Check whether a known live room is still on air before you start collecting its data.
  • Poll a room ID and send an alert when alive changes to true.
  • Filter out ended rooms from a saved list of room IDs, one call per room.
  • Confirm a room has closed before you stop a recording or monitoring job.

Request

curl -X POST "https://api.sandbase.ai/v1/api/tiktok/web/check-live-alive" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"room_id": "7381444193462078214"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
room_idstringYesLive room ID

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "live_room_status": {
    "cookie": "tt_chain…",
    "data": [
      {
        "alive": false,
        "room_id": 7381444193462078214,
        "room_id_str": "7381444193462078214"
      }
    ],
    "extra": {
      "now": 1793691862008
    },
    "status_code": 0,
    "tt_chain_token": "0k5cdiqY…"
  }
}

Response fields

FieldMeaning
live_room_status.data[].aliveBoolean flag. true means the room is broadcasting now, false means it is not. The sample response shows false.
live_room_status.data[].room_id / live_room_status.data[].room_id_strThe room ID as a number and as a string. Use the string form, because large numbers can lose precision in some JSON parsers.
live_room_status.status_codeStatus code of the check. 0 appears in the sample response for a successful lookup.
live_room_status.extra.nowTimestamp of the check, shown as a 13-digit number (1793691862008). It looks like Unix time in milliseconds.
live_room_status.tt_chain_token / live_room_status.cookieA chain token value and the cookie string that carries it. These are session values, not stream data.

Notes

Pricing

$0.002 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
TikTok$0.002 mỗi lần gọiJSON
TikTok$0.001 mỗi lần gọiJSON
TikTok$0.001 mỗi lần gọiJSON
TikTok$0.001 mỗi lần gọiJSON
TikTok$0.001 mỗi lần gọiJSON
TikTok$0.05 mỗi lần gọiJSON

Hướng dẫn:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared

Câu hỏi

FAQ

Làm thế nào để dùng API TikTok Stream Status Check?

Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/tiktok/web/check-live-alive 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 TikTok Stream Status Check có giá bao nhiêu?

$0.002 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ý.

API TikTok Stream Status Check 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 TikTok Stream Status Check 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 TikTok không?

Không. TikTok Stream Status Check 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 TikTok.