room_idstring필수
Room room_id
https://api.sandbase.ai/v1/api/douyin/web/live-gift-rankingRetrieves the contributor gift ranking for a specific Douyin live stream room. Query by room ID and leaderboard type to inspect top gift givers.
[
{
"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
}
}
]예시를 선택하면 입력값과 결과가 플레이그라운드에 로드됩니다.
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.
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.
| Name | Type | Required | Description |
|---|---|---|---|
room_id | string | Yes | Room room_id |
rank_type | integer | No | Leaderboard type, default is 30, no need to modify. |
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
}
| Field | Meaning |
|---|---|
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.total | Total count for the leaderboard. It is 0 in this sample. |
data.user_count_desc | Text version of the user count shown on the leaderboard. It is "0" in this sample. |
data.has_more | Shows whether more ranking entries exist beyond the returned list. |
data.has_once_live | Boolean flag for the room. It is true in this sample. |
data.rules_url | Link to the leaderboard rules page, in a Douyin app sslocal:// format. |
data.self_info.rank / data.self_info.score | Rank and gift score of the requesting viewer. Both are 0 in this sample. |
data.self_info.score_description / data.self_info.exactly_score | Score as text. exactly_score is a string and score_description is a display string. |
data.self_info.user | User profile object for the requesting viewer, with many account setting flags. |
status_code | Request status. 0 means success. |
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.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.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
빌드를 시작하세요
통합 인증 및 사용량 추적이 있는 플랫폼 API 엔드포인트입니다.
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",
"rank_type": 30
}'서버 환경에 SandBase API 키를 설정하세요. 요청에는 Bearer 인증이 사용됩니다.
export SANDBASE_API_KEY="YOUR_API_KEY"키는 서버에 보관하세요. 브라우저 코드에 노출하지 마세요.
room_idstring필수Room room_id
rank_typeintegerLeaderboard type, default is 30, no need to modify.
기본값: 30
이 API의 저장된 예시 응답입니다. 확인할 때 라이브 요청은 실행되지 않습니다.
[
{
"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
}
}
]더 살펴보기
| API | 가격 | 응답 |
|---|---|---|
Douyin | $0.001 / 호출 | JSON |
Douyin | $0.001 / 호출 | JSON |
Douyin | $0.001 / 호출 | JSON |
Douyin | $0.001 / 호출 | JSON |
Douyin | $0.001 / 호출 | JSON |
Douyin | $0.03 / 호출 | JSON |
질문
Authorization 헤더(Bearer)에 SandBase API 키를 넣고, 매개변수를 JSON 본문으로 담아 https://api.sandbase.ai/v1/api/douyin/web/live-gift-ranking에 POST 요청을 보내세요. 이 페이지의 Playground에서도 코드를 작성하지 않고 직접 테스트할 수 있습니다.
호출당 $0.001, SandBase 잔액에서 청구됩니다. 사용한 호출에 대해서만 요금이 부과되며, 구독은 없습니다.
필수: room_id (string). 선택: rank_type (integer). 이 페이지의 Parameters 표와 Playground에 모든 필드가 나와 있습니다.
같은 HTTP 요청에서 반환되는 JSON 응답입니다(동기식). 이 페이지의 README에 샘플 응답이 포함되어 있습니다.
아니요. Douyin Live Room Gift User Ranking은 SandBase를 통해 실행되므로, SandBase API 키 하나로 이 엔드포인트와 카탈로그의 다른 모든 API 및 모델을 사용할 수 있습니다. Douyin API 액세스를 별도로 신청할 필요는 없습니다.