sec_user_idstring必填
User sec_user_id
https://api.sandbase.ai/v1/api/douyin/web/user-profileReturns profile details for a specified Douyin user using their secure user identifier. Retrieve account information such as user cover URLs by providing a sec_user_id.
[
{
"data": {
"extra": null,
"log_pb": {
"impr_id": "20260820174335613760344EE594E29789"
},
"status_code": 2,
"status_msg": "UserId不合法",
"user": {}
}
}
]選擇一個範例,將其輸入與結果載入 playground。
Returns the public profile of one Douyin account, including avatar images, cover images, video count and follower count. It needs one input, the account's sec_user_id.
user.dog_card_info block.user.follower_count changes for an account over time by calling the API on a schedule.curl -X POST "https://api.sandbase.ai/v1/api/douyin/web/user-profile" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"sec_user_id": "MS4wLjABAAAAr52fXcfmzqOZJM_smap9Uuxtm16h8BupkCVaCt89BENq3E91mHCvtz5Z5TkXPHq_"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
sec_user_id | string | Yes | User sec_user_id |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"extra": {
"fatal_item_ids": [],
"logid": "20261103153241C7B606B0314B371AFCD7",
"now": 1793691161000
},
"log_pb": {
"impr_id": "20261103153241C7B606B0314B371AFCD7"
},
"status_code": 0,
"status_msg": null,
"user": {
"account_cert_info": "{}",
"apple_account": 0,
"avatar_168x168": {
"height": 720,
"uri": "aweme-avatar/tos-cn-avt-0015_9186d2f6f96963551bd89aaa2c745843",
"url_list": [
"https://p3-pc.douyinpic.com/img/aweme-avatar/tos-cn-avt-0015_9186d2f6f96963551bd…"
],
"width": 720
},
"avatar_300x300": {
"height": 720,
"uri": "aweme-avatar/tos-cn-avt-0015_9186d2f6f96963551bd89aaa2c745843",
"url_list": [
"https://p3-pc.douyinpic.com/img/aweme-avatar/tos-cn-avt-0015_9186d2f6f96963551bd…"
],
"width": 720
},
"avatar_larger": {
"height": 720,
"uri": "aweme-avatar/tos-cn-avt-0015_9186d2f6f96963551bd89aaa2c745843",
"url_list": [
"https://p3-pc.douyinpic.com/aweme/1080x1080/aweme-avatar/tos-cn-avt-0015_9186d2f…"
],
"width": 720
},
"avatar_medium": {
"height": 720,
"uri": "aweme-avatar/tos-cn-avt-0015_9186d2f6f96963551bd89aaa2c745843",
"url_list": [
"https://p3-pc.douyinpic.com/aweme/720x720/aweme-avatar/tos-cn-avt-0015_9186d2f6f…"
],
"width": 720
},
"avatar_thumb": {
"height": 720,
"uri": "aweme-avatar/tos-cn-avt-0015_9186d2f6f96963551bd89aaa2c745843",
"url_list": [
"https://p3-pc.douyinpic.com/aweme/100x100/aweme-avatar/tos-cn-avt-0015_9186d2f6f…"
],
"width": 720
},
"aweme_count": 91,
"aweme_count_correction_threshold": -1,
"birthday_hide_level": 0,
"can_set_item_cover": false,
"can_show_group_card": 1
}
}
| Field | Meaning |
|---|---|
user.follower_count | Number of followers the account has. |
user.aweme_count | Number of videos the account has posted. |
user.avatar_thumb / user.avatar_168x168 / user.avatar_300x300 / user.avatar_medium / user.avatar_larger | Avatar image in different sizes. Each has url_list with image links, plus width, height and uri. |
user.cover_url[].url_list | Links to the profile cover images. Each entry in cover_url has its own uri and url_list. |
user.cover_and_head_image_info.profile_cover_list[].cover_url.url_list | Links to the profile cover image, repeated inside the cover info block. |
user.cover_and_head_image_info.profile_cover_list[].dark_cover_color / user.cover_and_head_image_info.profile_cover_list[].light_cover_color | Color codes for the cover, written as hex strings. |
user.dog_card_info.dog_card_text / user.dog_card_info.rank / user.dog_card_info.rank_type | Ranking label shown on the profile, with the rank number and rank type. In the example the text is 短剧最热榜, the rank is 11 and the type is hot. |
user.follow_status | Follow state value for the account. The example returns 0. |
status_code | Result code for the call. 0 appears in the example response. |
sec_user_id as a string. It starts with MS4wLjABAAAA in the example.cover_url carry x-expires and x-signature query values, so download them soon after you call the API.sec_user_id.$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/user-profile" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"sec_user_id": "example"
}'請將您的 SandBase API 金鑰設定在伺服器環境中。請求使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開。
sec_user_idstring必填User sec_user_id
這是此 API 的已儲存範例回應;檢視時不會發出即時請求。
[
{
"data": {
"extra": null,
"log_pb": {
"impr_id": "20260820174335613760344EE594E29789"
},
"status_code": 2,
"status_msg": "UserId不合法",
"user": {}
}
}
]探索更多
| 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 |
問題
使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/douyin/web/user-profile。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
每次 $0.001。每個組織每個 UTC 日可免費呼叫 100 次,並可在包含此 API 在內的所有符合資格之 SandBase APIs 間共用;超過後,每次呼叫都會從您的 SandBase 餘額中以此價格計費。沒有訂閱方案。
必要:sec_user_id (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。
不需要。Douyin User Profile (Web) 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Douyin API 存取權。