用户与粉丝

这一组覆盖「某个账号」以及「围绕它的人」的全部数据。

/v1/user/info 开始,用用户名换完整资料 —— 粉丝数、简介、认证状态、注册时间。如果手上只有数字 ID(比如粉丝采集拿到的),用 /v1/user/info_by_id 反查。

取推文时,直接选你真正要的那条时间线,不要「全抓回来再自己过滤」。/v1/user/last_tweets 返回主页完整时间线(原创、回复、转推、引用);加上 exclude=replies,retweets 就只剩这个账号自己写的内容,用法与 X 官方 API 一致。/v1/user/replies 能看出这个账号在跟谁互动;/v1/user/videos 直接返回可下载的 mp4、时长与缩略图。过滤先于截断执行,所以你要多少条就拿到多少条,只为真正返回的内容付费。

粉丝图谱方面,/v1/user/followers 每页 200 条完整资料且无深度上限。如果你在采集几百万粉丝、只需要身份标识,/v1/user/followers_ids 每条约 8 字节,比完整资料省约 18 倍流量。

/v1/user/mentions 回答的是反方向的问题:谁在 @ 这个账号。这是品牌、币种与 KOL 舆情监控的核心接口。

GET/v1/user/info

用户资料

完整资料:粉丝数、认证、简介、注册时间、位置。

参数
usernamestring必填X 用户名(不带 @)
响应
200 OK
https://socialapi.tech/v1/user/info
{
  "status": "success",
  "data": {
    "id": "44196397",
    "username": "elonmusk",
    "display_name": "Elon Musk",
    "followers_count": 240919741,
    "blue_verified": true,
    "created_at": "Tue Jun 02 2009",
    "url": "https://x.com/elonmusk"
  }
}
GET/v1/user/last_tweets

最新推文

某用户的最新推文,包含原创、回复、转推与引用,与其主页所见一致。受监控账户最多可取 1,000 条历史。

参数
usernamestring必填X 用户名
limitint可选默认 20
excludestring可选replies,retweets —— 先过滤后截断,仍返回足量结果
响应
200 OK
https://socialapi.tech/v1/user/last_tweets
{
  "status": "success",
  "data": [
    { "id": "2078...", "text": "...", "like_count": 12043,
      "author": { "username": "binance" } }
  ],
  "meta": { "count": 20 }
}
GET/v1/user/status

账号存活状态

账号是存活、被封、已删除还是不可用?一律返回 200 —— 「查到了它不存在」本身就是有效答案,而不是错误。用于审计粉丝名单、监测监控对象是否被封、批量清理失效账号。

参数
usernamestring必填X 用户名
响应
200 OK
https://socialapi.tech/v1/user/status
{ "status": "success", "data": {
  "username": "elonmusk",
  "status": "alive",
  "user_id": "44196397",
  "reason": null
} }

// 被封: { "status": "suspended", "user_id": null, "reason": "User has been suspended" }
// 不存在: { "status": "not_found", "user_id": null, "reason": null }
// 受保护等: { "status": "unavailable", "reason": "Protected" }
GET/v1/user/affiliates

组织关联账号

认证组织旗下的官方账号(员工、子品牌)。一次调用拿到某公司在 X 上的全部官方号。⚠️传组织本身的用户名,不是成员账号。

参数
usernamestring必填组织用户名
cursorstring可选翻页游标
limitnumber可选每页条数(默认 20)
响应
200 OK
https://socialapi.tech/v1/user/affiliates
{ "status": "success", "data": [
  { "user_id": "1526461000000000000", "username": "XCorp",
    "display_name": "X Corp.", "followers_count": 120000 }
], "meta": { "count": 47, "next_cursor": "..." } }
GET/v1/user/about

账号透明度

所在地区、连接来源 App、用户名更改次数、加入时间、认证信息。来自 X「关于此账号」透明度页。

参数
usernamestring必填X 用户名
响应
200 OK
https://socialapi.tech/v1/user/about
{ "status": "success", "data": {
  "screen_name": "elonmusk",
  "account_based_in": "United States",
  "based_in_accurate": true,
  "connected_via": "United States App Store",
  "username_changes": 0,
  "created_at": "Tue Jun 02 20:12:29 +0000 2009",
  "is_blue_verified": true,
  "is_verified": false,
  "is_identity_verified": false,
  "verified_since_msec": null,
  "affiliate": "X",
  "protected": false,
  "raw": { ... }
} }
GET/v1/user/media

媒体墙

只含图片/视频的推文。

参数
usernamestring必填X 用户名
limitint可选默认 20
响应
200 OK
https://socialapi.tech/v1/user/media
{ "status": "success", "data": [ ... ], "meta": { "count": 20 } }
GET/v1/user/highlights

精选推文

用户的精选推文 tab。

参数
usernamestring必填X 用户名
limitint可选默认 20
响应
200 OK
https://socialapi.tech/v1/user/highlights
{ "status": "success", "data": [ ... ] }
GET/v1/user/followers

粉丝列表

带完整资料的粉丝列表(分页)。

参数
usernamestring必填X 用户名
cursorstring可选分页游标
limitint可选默认 100
响应
200 OK
https://socialapi.tech/v1/user/followers
{ "status": "success", "data": [ ...users ],
  "meta": { "count": 100, "next_cursor": "..." } }
GET/v1/user/followings

关注列表

某用户关注的账号(分页)。

参数
usernamestring必填X 用户名
cursorstring可选游标
limitint可选默认 100
响应
200 OK
https://socialapi.tech/v1/user/followings
{ "status": "success", "data": [ ...users ], "meta": { "next_cursor": "..." } }
GET/v1/user/verified_followers

蓝V粉丝

仅蓝V认证粉丝。

参数
usernamestring必填X 用户名
cursorstring可选游标
limitint可选默认 100
响应
200 OK
https://socialapi.tech/v1/user/verified_followers
{ "status": "success", "data": [ ...verified users ] }
GET/v1/user/info_by_id

按 ID 查资料

反查:用数字 ID 拿完整资料。配合 follower_ids 使用。

参数
user_idstring必填X 数字用户 id
响应
200 OK
https://socialapi.tech/v1/user/info_by_id
{ "status": "success", "data": {
  "id": "44196397", "username": "elonmusk",
  "followers_count": 221000000 } }
GET/v1/user/replies

只看回复

只返回该账号的回复 —— 能看出它与谁互动。实测 57% 为回复。

参数
usernamestring必填X 用户名(不带 @)
limitint可选默认 20
cursorstring可选分页游标
响应
200 OK
https://socialapi.tech/v1/user/replies
{ "status": "success", "data": [
  { "id": "...", "text": "@adamcarolla Oh and btw...",
    "is_reply": true } ], "meta": { "count": 20 } }
GET/v1/user/photos

只看带图推文

只返回带图片的推文。实测 88% 带图,与普通时间线零重叠。

参数
usernamestring必填X 用户名(不带 @)
limitint可选默认 20
cursorstring可选分页游标
响应
200 OK
https://socialapi.tech/v1/user/photos
{ "status": "success", "data": [
  { "id": "...", "photos": ["https://pbs.twimg.com/..."] } ],
  "meta": { "count": 20 } }
GET/v1/user/videos

只看带视频推文

只返回带视频的推文,含可直接下载的 mp4、时长与缩略图。实测 100% 命中。

参数
usernamestring必填X 用户名(不带 @)
limitint可选默认 20
cursorstring可选分页游标
响应
200 OK
https://socialapi.tech/v1/user/videos
{ "status": "success", "data": [
  { "id": "...", "videos": [ { "url": "https://video.twimg.com/...mp4",
    "duration_ms": 21000, "thumbnail": "..." } ] } ] }
GET/v1/user/articles

长文

X 长文(Article),含完整正文。

参数
usernamestring必填X 用户名(不带 @)
limitint可选默认 20
响应
200 OK
https://socialapi.tech/v1/user/articles
{ "status": "success", "data": [
  { "id": "...", "text": "<full article text>" } ] }
GET/v1/user/mentions

提及

谁在 @ 这个账号 —— 品牌与舆情监控的核心接口。

参数
usernamestring必填X 用户名(不带 @)
limitint可选默认 20
响应
200 OK
https://socialapi.tech/v1/user/mentions
{ "status": "success", "data": [
  { "id": "...", "text": "@elonmusk The reason SpaceX..." } ],
  "meta": { "count": 20 } }
GET/v1/user/followers_ids

粉丝 ID(轻量)

只返回 ID 与用户名 —— 比完整资料省 18 倍流量。为大规模粉丝图谱采集设计。

参数
usernamestring必填X 用户名(不带 @)
limitint可选默认 100,最多 2000
cursorstring可选分页游标
响应
200 OK
https://socialapi.tech/v1/user/followers_ids
{ "status": "success", "data": [
  { "id": "2090864542075244544", "username": "KINGSCAR20hc" } ],
  "meta": { "count": 100, "next_cursor": "..." } }
GET/v1/user/relationship

关注关系

A 是否关注 B?对任意两个第三方账号都有效。

参数
sourcestring必填源账号
targetstring必填目标账号
响应
200 OK
https://socialapi.tech/v1/user/relationship
{ "status": "success", "data": {
  "source": "elonmusk", "target": "binance",
  "following": false, "followed_by": true } }
快速开始与鉴权直接试用第一个接口基址: https://api.socialapi.tech