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

Douyin Live Room Gift User Ranking

API 文件
https://api.sandbase.ai/v1/api/douyin/web/live-gift-ranking

Retrieves the contributor gift ranking for a specific Douyin live stream room. Query by room ID and leaderboard type to inspect top gift givers.

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

Playground

輸入
Room room_id
Leaderboard type, default is 30, no need to modify.
輸出範例
回應outputs · 1.2 KB · 38 行
[
  {
    "data": {
      "data": {
        "currency": "",
        "has_more": false,
        "has_once_live": true,
        "invisible_total": 0,
        "label": "",
        "music_wave": "",
        "ranks": [],
        "rules_url": "sslocal://webcast_webview?url=https%3A%2F%2Faweme.snssdk.com%2Fmagic%2Fpage%2Fejs%2F5f27c6ca9950ec0307de9248%3FappType%3Ddouyin%26pull_down_indicator_color%3Ddark%26pull_down_indicator_not_show%3D0%26web_bg_color%3D%2523ffffffff&pull_down_close=0&pull_down_indicator_not_show=1&pull_down_indicator_color=dark&type=popup&gravity=bottom&height=450&radius=8&hide_more=0&hide_nav_bar=0&hide_status_bar=0&landscape_custom_width=1&rate_height=450",
        "seats": [],
        "self_info": {
          "app_name": "",
          "delta": 0,
          "exactly_score": "",
          "first_gift": false,
          "gap_description": "",
          "is_hidden": false,
          "rank": 0,
          "score": 0,
          "score_description": "",
          "team_id": "",
          "team_jump_schema": ""
        },
        "service_days": 0,
        "total": 0,
        "typography_type": 0,
        "user_count_desc": "0"
      },
      "extra": {
        "now": 1787219011073
      },
      "status_code": 0
    }
  }
]

範例

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

API README

Douyin Live Room Gift User Ranking API

Returns the gift contributor ranking for one Douyin live room. You send a room_id and, optionally, a rank_type. The response holds the ranked list, totals, and the ranking info for the requesting viewer.

Use cases

  • Check who gives the most gifts in a Douyin live room.
  • Compare the contributor count of a live room across repeated calls.
  • Read the ranking rules link that Douyin attaches to a live room leaderboard.
  • Check whether a room has had earlier live sessions using a single flag.

Request

curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/live-gift-ranking" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"room_id": "7356585666190461731"}'

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

Parameters

NameTypeRequiredDescription
room_idstringYesRoom room_id
rank_typeintegerNoLeaderboard type, default is 30, no need to modify.

Example response

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

{
  "data": {
    "currency": "",
    "has_more": false,
    "has_once_live": true,
    "invisible_total": 0,
    "label": "",
    "music_wave": "",
    "ranks": [],
    "rules_url": "sslocal://webcast_webview?url=https%3A%2F%2Faweme.snssdk.com%2Fmagic%2Fpage%2Fej…",
    "seats": [],
    "self_info": {
      "app_name": "",
      "delta": 1,
      "exactly_score": "0",
      "first_gift": false,
      "gap_description": "",
      "is_hidden": false,
      "rank": 0,
      "score": 0,
      "score_description": "0",
      "team_id": "",
      "team_jump_schema": "",
      "user": {
        "adversary_authorization_info": 0,
        "adversary_user_status": 0,
        "age_range": 0,
        "allow_be_located": false,
        "allow_find_by_contacts": false,
        "allow_others_download_video": false,
        "allow_others_download_when_sharing_video": false,
        "allow_share_show_profile": false
      }
    },
    "service_days": 0,
    "total": 0
  },
  "extra": {
    "now": 1793691146979
  },
  "status_code": 0
}

Response fields

FieldMeaning
data.ranks[]List of ranked gift contributors for the room. It is empty in this sample response, so a room with no gifts returns no rows.
data.totalTotal count for the leaderboard. It is 0 in this sample.
data.user_count_descText version of the user count shown on the leaderboard. It is "0" in this sample.
data.has_moreShows whether more ranking entries exist beyond the returned list.
data.has_once_liveBoolean flag for the room. It is true in this sample.
data.rules_urlLink to the leaderboard rules page, in a Douyin app sslocal:// format.
data.self_info.rank / data.self_info.scoreRank and gift score of the requesting viewer. Both are 0 in this sample.
data.self_info.score_description / data.self_info.exactly_scoreScore as text. exactly_score is a string and score_description is a display string.
data.self_info.userUser profile object for the requesting viewer, with many account setting flags.
status_codeRequest status. 0 means success.

Notes

  • Get room_id from a Douyin live room link. Douyin Webcast ID Extraction extracts webcast IDs, and Douyin Webcast ID to Room ID converts a webcast ID to a room_id.
  • Leave rank_type at its default of 30 unless you need another leaderboard type.
  • extra.now is a 13-digit timestamp, which looks like Unix time in milliseconds.
  • data.ranks and data.seats can be empty arrays, so handle empty lists in your code.

Pricing

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

探索更多

相關 APIs

所有 APIs
API價格回應
Douyin每次呼叫 $0.001JSON
Douyin每次呼叫 $0.001JSON
Douyin每次呼叫 $0.001JSON
Douyin每次呼叫 $0.001JSON
Douyin每次呼叫 $0.001JSON
Douyin每次呼叫 $0.03JSON

指南:Best Douyin API in 2026: Pricing Compared

問題

常見問題

我要如何使用 Douyin Live Room Gift User Ranking API?

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

Douyin Live Room Gift User Ranking API 的費用是多少?

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

Douyin Live Room Gift User Ranking API 接受哪些參數?

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

Douyin Live Room Gift User Ranking API 會回傳什麼?

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

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

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