Weibo User following
https://api.sandbase.ai/v1/api/weibo/app/user-followingGet user following on Weibo. Returns the platform data as structured JSON.
- 價格
- $0.001美元/次呼叫
- 方法
- POST
- 回應
- JSON
- 參數
- 1 個必填 · 2 個選填
Playground
您的輸出會顯示在這裡
完成輸入後,點擊執行。
API README
Weibo User following API
Returns the list of accounts a Weibo user follows. Each entry has the followed account's description, avatar URLs and follower count. The API needs the uid of the user whose following list you want.
Use cases
- Map which brands, media accounts and creators a given Weibo user follows.
- Build a list of accounts in one niche by reading the following lists of known accounts in that niche.
- Check whether the followed accounts also follow the queried user, using the
follow_meflag. - Rank followed accounts by audience size using
followers_count.
Request
curl -X POST "https://api.sandbase.ai/v1/api/weibo/app/user-following" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"uid": "1856404484", "sort_type": 2}'
The result is returned in outputs[0].data.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
uid | string | Yes | |
since_id | string | No | |
sort_type | integer | No |
Example response
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"has_filtered_attentions": false,
"since_id": "1793691972|20",
"total_cnt": 1510,
"uid": 1856404484,
"users": [
{
"flag": 0,
"itemid": "2310510024_1_ _0_7714083748_81e016ec",
"user": {
"avatar_hd": "https://tvax3.sinaimg.cn/crop.0.0.1080.1080.1024/008q3vzCly8ihevz7xuqjj30u00u0t9…",
"avatar_large": "https://tvax3.sinaimg.cn/crop.0.0.1080.1080.180/008q3vzCly8ihevz7xuqjj30u00u0t92…",
"descStruct": {
"labelDesc": [
{
"followers_count_str": "69.4万",
"name": "694402",
"suffix": "粉丝"
}
],
"textDesc": "简介:智在随心 奔赴热爱 · 新豪华 阿维塔"
},
"description": "智在随心 奔赴热爱 · 新豪华 阿维塔",
"follow_me": false,
"followers_count": 694402,
"followers_count_str": "69.4万",
"following": false
}
}
]
},
"http_code": 200,
"ok": 1
}
Response fields
| Field | Meaning |
|---|---|
data.total_cnt | Total number of accounts the user follows. |
data.uid | The numeric ID of the user whose following list was requested. |
data.since_id | Cursor value for the next page. It looks like 1793691972/20. |
data.has_filtered_attentions | Boolean flag on the list. It was false in this response. |
data.users[].user.description | Bio text of the followed account. |
data.users[].user.followers_count / data.users[].user.followers_count_str | Follower count of the followed account. The first is a number, the second is a short display string such as 69.4万. |
data.users[].user.follow_me | Whether the followed account follows back, as a boolean. |
data.users[].user.following | Boolean relation flag for the followed account. It was false for every user in this response. |
data.users[].user.avatar_hd / data.users[].user.avatar_large | Image URLs for the account avatar in two sizes. The URLs carry Expires and ssig query values. |
data.users[].user.descStruct.labelDesc[] | Label chips shown for the account, such as follower count text and topic tags like 科学科普博主. |
Notes
- Pass the numeric Weibo user ID as
uid. You can find it in the response of Weibo User Profile Information. - For the next page, send the
data.since_idvalue from the last response assince_id. sort_typedefaults to2. The docs do not describe other values.- Read
data.total_cntto see how many accounts the user follows in total.
Pricing
$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/weibo/app/user-following" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"uid": "1856404484",
"sort_type": 2
}'2. 驗證
請將您的 SandBase API 金鑰設定在伺服器環境中。請求使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開。
3. 參數
since_idstring
sort_typeinteger
預設:2
4. 回應
這是此 API 的已儲存範例回應;檢視時不會發出即時請求。
尚未發布已儲存回應。請在 Playground 中執行 API 以檢視其回應。
探索更多
相關 APIs
| API | 價格 | 回應 |
|---|---|---|
Weibo User following此 API Weibo | 每次呼叫 $0.001 | JSON |
Weibo | 每次呼叫 $0.001 | JSON |
Weibo | 每次呼叫 $0.001 | JSON |
Weibo | 每次呼叫 $0.001 | JSON |
Weibo | 每次呼叫 $0.001 | JSON |
Weibo | 每次呼叫 $0.001 | JSON |
問題
常見問題
我要如何使用 Weibo User following API?
使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/weibo/app/user-following。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
Weibo User following API 的費用是多少?
每次 $0.001,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。
Weibo User following API 接受哪些參數?
必要:uid (string)。 選填:since_id (string) 和 sort_type (integer)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
Weibo User following API 會回傳什麼?
在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。
我需要 Weibo 開發者帳號或 API 金鑰嗎?
不需要。Weibo User following 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Weibo API 存取權。
