Skip to content

微博 API - 用户关注者 (V1)

prod-global
GET
/api/weibo/get-followers/v1

获取指定微博用户关注的账户列表。 包含被关注账户的用户ID、昵称、头像及认证状态。

典型应用场景:

  • 关系图谱绘制与网络分析
  • 识别特定用户的兴趣偏好与社交关联

请求参数

参数名位置类型必填说明
tokenquerystringAPI 访问令牌。
uidquerystring微博用户ID (UID)。
pagequeryinteger页码,从1开始。

代码示例

💡 环境说明

默认示例使用 https://api.justoneapi.com (prod-global)。中国大陆地区建议替换为 http://47.117.133.51:30015 (prod-cn) 以获得更好的访问体验。详见 环境选择

bash
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
curl -X GET "https://api.justoneapi.com/api/weibo/get-followers/v1?token=YOUR_API_KEY&uid=VALUE"
text
我想使用 Just One API 提供的“用户关注者 (V1)”接口。
接口地址: https://api.justoneapi.com/api/weibo/get-followers/v1
HTTP 方法: GET
身份验证: 在 URL 后添加查询参数“?token=您的API密钥”。
OpenAPI 定义: https://docs.justoneapi.com/openapi/weibo-apis/user-followers-v1-zh.json

请求参数说明:
- token (query): API 访问令牌。 (必填)
- uid (query): 微博用户ID (UID)。 (必填)
- page (query): 页码,从1开始。

返回格式: JSON

响应处理与错误码:
1. 需通过返回体中的 "code" 字段判断业务结果(code 为 0 表示成功)。
2. 超时建议:建议将请求超时时间设置为至少 60 秒。
3. 业务码说明:
   - 0: 成功
   - 100: Token 无效或已失效
   - 301: 采集失败,请重试
   - 302: 超出速率限制
   - 303: 超出每日配额
   - 400: 参数错误
   - 500: 内部服务器错误
   - 600: 权限不足
   - 601: 余额不足

请帮我用我擅长的编程语言写一个脚本来调用这个接口,并处理返回结果。
python
# 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import requests

url = "https://api.justoneapi.com/api/weibo/get-followers/v1?token=YOUR_API_KEY&uid=VALUE"
response = requests.get(url)
print(response.json())
js
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
const response = await fetch("https://api.justoneapi.com/api/weibo/get-followers/v1?token=YOUR_API_KEY&uid=VALUE", {
  method: "GET"
});
const data = await response.json();
console.log(data);
java
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

public class Main {
    public static void main(String[] args) throws Exception {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder()
            .uri(URI.create("https://api.justoneapi.com/api/weibo/get-followers/v1?token=YOUR_API_KEY&uid=VALUE"))
            .method("GET", HttpRequest.BodyPublishers.noBody())
            .build();

        HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.body());
    }
}
go
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	client := &http.Client{}
	url := "https://api.justoneapi.com/api/weibo/get-followers/v1?token=YOUR_API_KEY&uid=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	body, _ := io.ReadAll(resp.Body)
	fmt.Println(string(body))
}
php
// 提示: 中国大陆地区建议将 https://api.justoneapi.com 替换为 http://47.117.133.51:30015
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.justoneapi.com/api/weibo/get-followers/v1?token=YOUR_API_KEY&uid=VALUE");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
curl_close($ch);
echo $response;

响应结果

json
{
  "code": 0,
  "data": {
    "users": [
      {
        "id": 5357651574,
        "idstr": "5357651574",
        "class": 1,
        "screen_name": "粉丝红包",
        "name": "粉丝红包",
        "province": "11",
        "city": "1000",
        "location": "北京",
        "description": "嘿嘿,你的红包,我承包了!请对我保持密切关注~",
        "url": "",
        "profile_image_url": "https://tvax4.sinaimg.cn/crop.0.0.178.178.50/005QA9V4ly8h8v3urfmc2j604y04yq2s02.jpg?KID=imgbed,tva&E...",
        "light_ring": false,
        "cover_image_phone": "https://wx2.sinaimg.cn/crop.0.0.640.640.640/006yCBGqgy1fieualk4vjj30yi0ykacx.jpg;https://ww4.sinaimg...",
        "profile_url": "u/5357651574",
        "domain": "",
        "weihao": "",
        "gender": "f",
        "followers_count": 65689867,
        "followers_count_str": "6569万",
        "friends_count": 106,
        "pagefriends_count": 3,
        "statuses_count": 6873,
        "video_status_count": 11,
        "video_play_count": 0,
        "super_topic_not_syn_count": 0,
        "favourites_count": 9,
        "created_at": "Tue Nov 04 11:52:49 +0800 2014",
        "following": false,
        "allow_all_act_msg": false,
        "geo_enabled": false,
        "verified": true,
        "verified_type": 7,
        "remark": "",
        "insecurity": {
          "sexual_content": false
        },
        "status_id": 5274203091896562,
        "status_idstr": "5274203091896562",
        "ptype": 0,
        "allow_all_comment": false,
        "avatar_large": "https://tvax4.sinaimg.cn/crop.0.0.178.178.180/005QA9V4ly8h8v3urfmc2j604y04yq2s02.jpg?KID=imgbed,tva&...",
        "avatar_hd": "https://tvax4.sinaimg.cn/crop.0.0.178.178.1024/005QA9V4ly8h8v3urfmc2j604y04yq2s02.jpg?KID=imgbed,tva...",
        "verified_reason": "新浪微博 粉丝红包产品 官方微博",
        "verified_trade": "",
        "verified_reason_url": "",
        "verified_source": "",
        "verified_source_url": "",
        "verified_state": 0,
        "verified_level": 3,
        "verified_type_ext": 0,
        "pay_remind": 0,
        "pay_date": "",
        "has_service_tel": false,
        "verified_reason_modified": "新浪微博 粉丝红包产品 官方微博",
        "verified_contact_name": "",
        "verified_contact_email": "",
        "verified_contact_mobile": "",
        "follow_me": false,
        "like": false,
        "like_me": false,
        "online_status": 0,
        "bi_followers_count": 54,
        "lang": "zh-cn",
        "star": 0,
        "mbtype": 12,
        "mbrank": 1,
        "svip": 1,
        "vvip": 1,
        "mb_expire_time": 1775404800,
        "block_word": 0,
        "block_app": 1,
        "chaohua_ability": 0,
        "brand_ability": 0,
        "nft_ability": 0,
        "vplus_ability": 0,
        "wenda_ability": 0,
        "live_ability": 0,
        "gongyi_ability": 0,
        "paycolumn_ability": 0,
        "newbrand_ability": 0,
        "ecommerce_ability": 0,
        "hardfan_ability": 0,
        "wbcolumn_ability": 0,
        "interaction_user": 0,
        "audio_ability": 2,
        "place_ability": 1,
        "credit_score": 80,
        "user_ability": 2359820,
        "avatargj_id": "gj_vip_860",
        "urank": 44,
        "story_read_state": -1,
        "vclub_member": 0,
        "is_teenager": 0,
        "is_guardian": 0,
        "is_teenager_list": 0,
        "pc_new": 7,
        "special_follow": false,
        "planet_video": 2,
        "video_mark": 2,
        "live_status": 0,
        "user_ability_extend": 64,
        "status_total_counter": {
          "total_cnt": 13709996,
          "repost_cnt": 1606303,
          "comment_cnt": 1665287,
          "like_cnt": 9859907,
          "comment_like_cnt": 578499
        },
        "video_total_counter": {
          "play_cnt": 9292448
        },
        "brand_account": 0,
        "hongbaofei": 0,
        "green_mode": 0,
        "green_mode_source": 0,
        "delete_mode_time": 0,
        "urisk": 8796093022208,
        "unfollowing_recom_switch": 1,
        "block": 0,
        "block_me": 0,
        "avatar_type": 0,
        "is_big": 0,
        "auth_status": 1,
        "auth_realname": null,
        "auth_career": null,
        "auth_career_name": null,
        "show_auth": 0,
        "is_auth": 0,
        "is_punish": 0,
        "avatar_hd_pid": "005QA9V4ly8h8v3urfmc2j604y04yq2s02",
        "like_display": 0,
        "comment_display": 0
      }
    ],
    "has_filtered_attentions": false,
    "next_cursor": 20,
    "previous_cursor": 0,
    "total_number": 424,
    "use_sink_stragety": false,
    "has_filtered_fans": false,
    "use_status_strategy": false,
    "show_related_topic": false,
    "sort_type": 0,
    "type": 0,
    "show_unread": false,
    "fill_material": 0,
    "screenName": "王牌对王牌",
    "ok": 1
  }
}

💡 提示:为简化展示,列表类数据样例仅保留 1-2 条记录,实际返回条数以接口响应为准。