Weibo-App-API

获取用户关注列表/Get user following

Changed on

[中文]

用途:

  • 获取指定用户的关注列表,返回被关注用户的信息(昵称、头像、简介、粉丝数、最新微博等)。

参数:

  • uid: 用户ID(必填)
  • since_id: 翻页游标,格式为 "时间戳|偏移量",首次请求不传,后续请求使用返回的since_id值
    • since_id json path: $.data.since_id
  • sort_type: 排序类型
    • 1: 按最新微博时间倒序(最近发博的排在前面)
    • 2: 按关注时间倒序(最近关注的排在前面,默认)

返回:

  • 关注列表数据
    • data.users: 关注用户数组,每个元素的用户信息在 user 字段中(data.users[].user)
    • data.since_id: 下一页翻页游标,没有更多数据时该字段不返回
    • data.total_cnt: 关注总数

注意:

  • 该接口走微博移动端(m.weibo.cn)H5接口,依赖服务端缓存的已登录Cookie,Cookie失效时会返回错误
  • 每页返回约20条,使用 since_id 游标翻页,不使用页码翻页
  • 响应中不再返回 since_id 即表示已翻到底,此时 users 可能仍有不足20条的最后一批数据
  • 用户信息嵌套在 data.users[].user 中,与粉丝列表接口的结构不同

[English]

Purpose:

  • Get the following list of the specified user, returning the profiles of followed users (nickname, avatar, bio, followers count, latest post, etc.).

Parameters:

  • uid: User ID (required)
  • since_id: Pagination cursor in "timestamp|offset" format. Don't pass for the first request, use the returned since_id for subsequent requests
    • since_id json path: $.data.since_id
  • sort_type: Sort type
    • 1: Sort by latest post time in descending order (recently posted first)
    • 2: Sort by following time in descending order (recently followed first, default)

Return:

  • Following list data
    • data.users: Array of followed users, each item holds the profile in its user field (data.users[].user)
    • data.since_id: Next pagination cursor, absent when there is no more data
    • data.total_cnt: Total following count

Note:

  • This endpoint uses the Weibo mobile (m.weibo.cn) H5 API and relies on the server-side cached logged-in cookie; an expired cookie results in an error
  • About 20 items per page. Uses cursor pagination (since_id), not page numbers
  • The absence of since_id in the response means the end of the list has been reached; that last response may still carry a final batch of fewer than 20 items
  • User profiles are nested under data.users[].user, which differs from the followers endpoint

[示例/Example]

uid = "1856404484" since_id = None # First page

since_id = "1787913903|40" # Next page

sort_type = 2

get/api/v1/weibo/app/fetch_user_following

Request

  • Base URL
    https://api.tikhub.io (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Query parameters

uidstring required

用户ID

since_idstring nullable

翻页游标,格式为"时间戳|偏移量",首次请求不传,后续请求使用返回的since_id值

sort_typeinteger

排序类型: 1=按最新微博时间排序, 2=按关注时间排序(默认)

Response

Successful Response

codeinteger

HTTP status code | HTTP状态码

request_idstring nullable

Unique request identifier | 唯一请求标识符

messagestring

Response message (EN-US) | 响应消息 (English)

message_zhstring

Response message (ZH-CN) | 响应消息 (中文)

supportstring

Support message | 支持消息

timestring

The time the response was generated | 生成响应的时间

time_stampinteger

The timestamp the response was generated | 生成响应的时间戳

time_zonestring

The timezone of the response time | 响应时间的时区

docsstring nullable

Link to the API Swagger documentation for this endpoint | 此端点的 API Swagger 文档链接

cache_messagestring nullable

Cache message (EN-US) | 缓存消息 (English)

cache_message_zhstring nullable

Cache message (ZH-CN) | 缓存消息 (中文)

cache_urlstring nullable

The URL to access the cached result | 访问缓存结果的 URL

routerstring

The endpoint that generated this response | 生成此响应的端点

paramsunknown
dataunknown

Changes