Sand AISand AI MAGI-2MAGI-2 現已登上 SandBase:支援原生音訊的 1080p 影片立即試用

TikTok Stream Status Check

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.

價格
$0.002美元/次呼叫
方法
POST
回應
JSON
參數
1 個必填 · 0 個選填

Playground

輸入
Live room ID
輸出範例
回應outputs · 443 B · 21 行
[
  {
    "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=="
      }
    }
  }
]

範例

選擇一個範例,將其輸入與結果載入 playground。

API README

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.

探索更多

相關 APIs

所有 APIs
API價格回應
TikTok每次呼叫 $0.002JSON
TikTok每次呼叫 $0.001JSON
TikTok每次呼叫 $0.001JSON
TikTok每次呼叫 $0.001JSON
TikTok每次呼叫 $0.001JSON
TikTok每次呼叫 $0.05JSON

指南:TikTok API pricing: official access vs per-call dataBest TikTok API in 2026: Pricing Compared

問題

常見問題

我要如何使用 TikTok Stream Status Check API?

使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/tiktok/web/check-live-alive。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。

TikTok Stream Status Check API 的費用是多少?

每次 $0.002,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。

TikTok Stream Status Check API 接受哪些參數?

必要:room_id (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。

TikTok Stream Status Check API 會回傳什麼?

在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。

我需要 TikTok 開發者帳號或 API 金鑰嗎?

不需要。TikTok Stream Status Check 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 TikTok API 存取權。