Weibo User following
https://api.sandbase.ai/v1/api/weibo/app/user-followingGet user following on Weibo. Returns the platform data as structured JSON.
- Prix
- $0.001USD / appel
- Méthode
- POST
- Réponse
- JSON
- Paramètres
- 1 obligatoires · 2 facultatifs
Bac à sable
Votre sortie apparaîtra ici
Complétez les entrées, puis cliquez sur Exécuter.
README de l'API
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.
Commencer à construire
Envoyez votre première requête
Point de terminaison de l'API de la plateforme avec authentification unifiée et suivi de l'utilisation.
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. Authentification
Définissez votre clé API SandBase dans l'environnement de votre serveur. Les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez votre clé côté serveur. Ne l'exposez pas dans le code du navigateur.
3. Paramètres
since_idstring
sort_typeinteger
Par défaut : 2
4. Réponse
Exemple de réponse enregistré pour cette API ; aucune requête en direct n'est effectuée lors de l'affichage.
Aucune réponse enregistrée n'a été publiée. Exécutez l'API dans Playground pour inspecter sa réponse.
Explorer plus
APIs associées
| API | Prix | Réponse |
|---|---|---|
Weibo User followingCette API Weibo | $0.001 par appel | JSON |
Weibo | $0.001 par appel | JSON |
Weibo | $0.001 par appel | JSON |
Weibo | $0.001 par appel | JSON |
Weibo | $0.001 par appel | JSON |
Weibo | $0.001 par appel | JSON |
Questions
FAQ
Comment utiliser l’API Weibo User following ?
Envoyez une requête POST à https://api.sandbase.ai/v1/api/weibo/app/user-following avec votre clé API SandBase dans l’en-tête Authorization (Bearer) et les paramètres dans un corps JSON. Vous pouvez aussi l’essayer dans le Playground sur cette page sans écrire de code.
Combien coûte l’API Weibo User following ?
$0.001 par appel, facturé depuis votre solde SandBase. Vous ne payez que les appels que vous effectuez ; aucun abonnement.
Quels paramètres l’API Weibo User following accepte-t-elle ?
Obligatoire : uid (string). Facultatif : since_id (string) et sort_type (integer). Le tableau des paramètres et le Playground sur cette page listent tous les champs.
Que renvoie l’API Weibo User following ?
Une réponse JSON renvoyée dans la même requête HTTP (synchrone). Le README sur cette page inclut un exemple de réponse.
Ai-je besoin d’un compte développeur ou d’une clé API Weibo ?
Non. Weibo User following fonctionne via SandBase, donc une seule clé API SandBase couvre ce point de terminaison ainsi que toutes les autres API et tous les modèles du catalogue. Vous n’avez pas besoin de demander un accès API Weibo séparément.
