OpenAPI 文档/X (Twitter)GET

X (Twitter) — 用户主页

SpiderHubs OpenAPI 文档:X (Twitter) — 用户主页,分类 X (Twitter)。接口 GET /openapi/v1/contentcreator/twitter/web/fetch_user_profile。按用户名(screen_name)或数字 ID(rest_id)获取...

OpId: tw-user-profile · 最近更新: 2026-05-23

说明

按用户名(screen_name)或数字 ID(rest_id)获取用户资料,二选一。

基础信息

Endpoint:
GET /openapi/v1/contentcreator/twitter/web/fetch_user_profile
计费:
1 积分 / 次
限流:
300 次 / 分钟 / 用户

请求参数说明

参数类型必填说明
screen_namestring用户名(@ 后面的部分),与 rest_id 二选一
rest_idstring用户数字 ID,与 screen_name 二选一

响应字段说明

字段类型说明
codeint业务状态码,200 表示成功
request_idstring本次请求唯一标识,排查问题时可提供
dataobject业务数据容器,具体字段见下
data.profilestring用户名(screen_name,@ 后面的部分)
data.rest_idstring用户数字 ID(可作为 rest_id 参数使用)
data.namestring显示昵称
data.descstring简介
data.sub_countint粉丝数
data.friendsint关注数
data.statuses_countint推文总数
data.media_countint媒体推文数
data.blue_verifiedbool是否蓝 V
data.avatarstring头像 URL
data.header_imagestring主页横幅图 URL
data.websitestring主页外链
请求示例 · cURL
curl 'https://api.spiderhubs.com/openapi/v1/contentcreator/twitter/web/fetch_user_profile?screen_name=elonmusk' \
  -H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx'
响应示例
{
  "code": 200,
  "request_id": "44b7dbe5-3f18-4910-ae38-3f5cf51d9e41",
  "data": {
    "status": "active",
    "profile": "elonmusk",
    "rest_id": "44196397",
    "blue_verified": true,
    "avatar": "https://pbs.twimg.com/profile_images/...jpg",
    "header_image": "https://pbs.twimg.com/profile_banners/44196397/1774145451",
    "desc": "Starmind",
    "name": "Elon Musk",
    "website": "https://www.spacex.com/...",
    "protected": false,
    "location": "",
    "friends": 1370,
    "sub_count": 240919657,
    "statuses_count": 105668,
    "media_count": 4620,
    "id": "44196397"
  }
}

开始调用 SpiderHubs API

使用账户中心生成的 API Key,通过 Authorization: Bearer sk_live_xxx 调用接口。