接口说明

X Home API 获取 X 主页资料及首屏作品数据。

使用 Pangolinfo API Key 调用,返回结构化 JSON 数据。

请求URL

POST https://scrapeapi.pangolinfo.com/api/v1/social/x-home

请求头

参数名参数值类型说明
Content-Typeapplication/jsonstring数据格式
AuthorizationBearer xxxstring认证凭证

采集最长约75秒,客户端超时建议设为90秒。

请求参数

参数必填类型说明
targetYesstring主页链接,也可直接传用户名(可带 @)

仅处理本页列出的请求参数,其他字段忽略。分页游标原样传回,不编码、解码或转换格式。

附带首屏作品;更多作品请使用对应作品接口(如提供)。

响应值

返回值类型说明
codeinteger状态码,0 表示成功
messagestring响应信息,成功时为 ok
pointCostnumber本次请求实际消耗的积点
dataobject返回数据,结构见下表
metaobject请求标识及耗时(毫秒)
billingobject计费条数、单价及规则版本

返回参数 data 说明

返回值类型说明
typestringType
可用值: [“home”]
profileobject资料; 前半为整理后的字段, 后半为 FxTwitter 原始字段原样展开 (上游新增字段也会出现)
worksobject[]时间线首页帖子 (含转推)
paginationobject作品分页

data.profile 字段说明

返回值类型说明
usernamestring | null用户名
screen_namestring | null用户名 (同 username)
displayNamestring | null显示名
namestring | null显示名 (同 displayName)
biostring | null简介
descriptionstring | null简介 (t.co 已展开)
avatarstring | null头像
avatar_urlstring | null头像 (同 avatar)
profileUrlstring | null主页链接
urlstring | null主页链接 (同 profileUrl)
isVerifiedboolean是否认证
verifiedboolean是否认证 (同 isVerified)
followersCountnumber | null粉丝数
followers_countnumber | null粉丝数 (兼容旧键)
followingCountnumber | null关注数
friends_countnumber | null关注数 (兼容旧键)
accountIdstring | null用户 id
idstring | null用户 id (同 accountId)
isPrivateboolean是否锁推
externalLinksobject[]个人网站
likesCountnumber | null点赞过的帖子数
mediaCountnumber | null媒体帖数
statusesCountnumber | null发帖数
locationstring | null所在地 (用户填写)
bannerUrlstring | null横幅图
joinedAtobject | null注册时间
verificationTypestring | null认证类型: individual / business / government
verifiedAtstring | null认证时间
basedInstring | null账号所在国家 / 地区 (关于此账号)
usernameChangesnumber | null用户名修改次数
followersnumber | null粉丝数 (FxTwitter 原始)
followingnumber | null关注数 (FxTwitter 原始)
likesnumber | null点赞数 (FxTwitter 原始)
media_countnumber | null媒体帖数 (FxTwitter 原始)
statusesnumber | null发帖数 (FxTwitter 原始)
raw_descriptionobject | null简介原文 (FxTwitter 原始)
banner_urlstring | null横幅图 (FxTwitter 原始)
joinedstring | null注册时间原文, 如 Wed Dec 19 20:20:32 +0000 2007
protectedboolean是否锁推 (FxTwitter 原始)
websiteobject | null个人网站 (FxTwitter 原始)
verificationobject认证信息 (FxTwitter 原始)
typestring | nullFxTwitter 对象类型, 固定 profile
about_accountobject关于此账号 (FxTwitter 原始)

data.profile.externalLinks[] 字段说明

返回值类型说明
urlstring | null链接
display_urlstring | null显示文本

data.profile.joinedAt 字段说明

返回值类型说明
textstring | null上游原始时间文本
valuenumber | null解析后的毫秒时间戳; 解析失败为 null

data.profile.raw_description 字段说明

返回值类型说明
textstring | null简介原文
facetsany[]简介里的链接 / 提及位置

data.profile.website 字段说明

返回值类型说明
urlstring | null链接
display_urlstring | null显示文本

data.profile.verification 字段说明

返回值类型说明
verifiedboolean是否认证
verified_atstring | null认证时间
typestring | null认证类型

data.profile.about_account 字段说明

返回值类型说明
location_accurateboolean所在地是否准确
based_instring | null所在国家 / 地区
username_changesobject用户名修改记录

data.works[] 字段说明

返回值类型说明
idstring | null帖子 id
urlstring | null帖子链接
contentstring正文 (t.co 短链已展开)
rawTextstring | null原始正文 (含 t.co 短链)
publishedAtobject | null发布时间 (text 为 ISO)
likesnumber | null点赞数
commentsCountnumber | null回复数
repostsnumber | null转发数
quotesnumber | null引用数
bookmarksnumber | null书签数
viewsnumber | null浏览数; 老帖子没有为 null
langstring | null语言代码
possiblySensitiveboolean是否可能含敏感内容
isNoteTweetboolean是否长文 (Note Tweet)
communityNoteany社区注释 (上游原样); 没有为 null
replyingTostring | null回复的用户名; 不是回复为 null
replyingToStatusstring | null回复的帖子 id
sourcestring | null发布来源客户端; 通常为 null
mediaobject[]媒体
mentionsobject[]正文里的 @ 提及
hashtagsstring | null[]正文里的话题 (不含 #)
urlsobject[]正文里的链接
repostedByobject | null时间线里的转推: 转发者; 原创为 null
quoteobject | null引用的帖子 (字段同本帖, 另带 poster); 没有为 null
posterobject作者 (转推时为原帖作者)

data.works[].publishedAt 字段说明

返回值类型说明
textstring | null上游原始时间文本
valuenumber | null解析后的毫秒时间戳; 解析失败为 null

data.works[].media[] 字段说明

返回值类型说明
typestring | null媒体类型: photo / video / gif
idstring | null媒体 id
urlstring | null图片 / 视频链接
thumbnailUrlstring | null视频封面; 图片为 null
widthnumber | null宽 (px)
heightnumber | null高 (px)
durationSecnumber | null视频时长 (秒); 图片为 null
formatstring | null视频格式, 如 video/mp4; 图片为 null
variantsobject[]视频各清晰度; 图片为空

data.works[].mentions[] 字段说明

返回值类型说明
usernamestring | null被提及用户名
idstring | null被提及用户 id

data.works[].urls[] 字段说明

返回值类型说明
urlstring | null完整链接
displaystring | null显示文本

data.works[].repostedBy 字段说明

返回值类型说明
nicknamestring | null显示名, 没有时用用户名
usernamestring | null用户名 (@ 后面那段)
avatarstring | null头像
profileUrlstring | null主页链接
idstring | null用户 id
verifiedboolean是否认证 (蓝标 / 金标 / 灰标)
verificationTypestring | null认证类型: individual / business / government; 未认证为 null
followersCountnumber | null粉丝数; 转发者信息里为 null
followingCountnumber | null关注数; 转发者信息里为 null
protectedboolean是否锁推 (私密)

data.works[].quote 字段说明

返回值类型说明
idstring | null帖子 id
urlstring | null帖子链接
contentstring正文 (t.co 短链已展开)
rawTextstring | null原始正文 (含 t.co 短链)
publishedAtobject | null发布时间 (text 为 ISO)
likesnumber | null点赞数
commentsCountnumber | null回复数
repostsnumber | null转发数
quotesnumber | null引用数
bookmarksnumber | null书签数
viewsnumber | null浏览数; 老帖子没有为 null
langstring | null语言代码
possiblySensitiveboolean是否可能含敏感内容
isNoteTweetboolean是否长文 (Note Tweet)
communityNoteany社区注释 (上游原样); 没有为 null
replyingTostring | null回复的用户名; 不是回复为 null
replyingToStatusstring | null回复的帖子 id
sourcestring | null发布来源客户端; 通常为 null
mediaobject[]媒体
mentionsobject[]正文里的 @ 提及
hashtagsstring | null[]正文里的话题 (不含 #)
urlsobject[]正文里的链接
repostedByobject | null时间线里的转推: 转发者; 原创为 null
quoteany引用帖里的引用 (同形)
posterobjectPoster

data.works[].poster 字段说明

返回值类型说明
nicknamestring | null显示名, 没有时用用户名
usernamestring | null用户名 (@ 后面那段)
avatarstring | null头像
profileUrlstring | null主页链接
idstring | null用户 id
verifiedboolean是否认证 (蓝标 / 金标 / 灰标)
verificationTypestring | null认证类型: individual / business / government; 未认证为 null
followersCountnumber | null粉丝数; 转发者信息里为 null
followingCountnumber | null关注数; 转发者信息里为 null
protectedboolean是否锁推 (私密)

data.pagination 字段说明

返回值类型说明
cursorstring | null下一页游标, 传回 options.cursor 续取
hasMoreboolean是否还有更多

请求示例

curl --request POST \
  --url https://scrapeapi.pangolinfo.com/api/v1/social/x-home \
  --header 'Authorization: Bearer YOUR_PANGOLINFO_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "target": "https://x.com/nasa"
}'

返回示例

下例截取实际响应中的首条列表记录,长文本与链接作了缩写;pointCost 为该次完整响应的实际费用。完整字段结构可在在线调试页查看。

{
  "code": 0,
  "message": "ok",
  "pointCost": 0.8,
  "data": {
    "type": "home",
    "profile": {
      "username": "NASA",
      "screen_name": "NASA",
      "displayName": "NASA",
      "name": "NASA",
      "bio": "Making the seemingly impossible, possible. ✨",
      "description": "Making the seemingly impossible, possible. ✨",
      "avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
      "avatar_url": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_normal.jpg",
      "profileUrl": "https://x.com/NASA",
      "url": "https://x.com/NASA",
      "isVerified": true,
      "verified": true,
      "followersCount": 92275004,
      "followers_count": 92275004,
      "followingCount": 115,
      "friends_count": 115,
      "accountId": "11348282",
      "id": "11348282",
      "isPrivate": false,
      "externalLinks": [
        {
          "url": "http://www.nasa.gov/",
          "display_url": "nasa.gov"
        }
      ],
      "likesCount": 17062,
      "mediaCount": 28235,
      "statusesCount": 74504,
      "location": "Pale Blue Dot",
      "bannerUrl": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
      "joinedAt": {
        "text": "2007-12-19T20:20:32.000Z",
        "value": 1198095632000
      },
      "verificationType": "government",
      "verifiedAt": null,
      "basedIn": null,
      "usernameChanges": 0,
      "followers": 92275004,
      "following": 115,
      "likes": 17062,
      "media_count": 28235,
      "statuses": 74504,
      "raw_description": {
        "text": "Making the seemingly impossible, possible. ✨",
        "facets": []
      },
      "banner_url": "https://pbs.twimg.com/profile_banners/11348282/1788992290",
      "joined": "Wed Dec 19 20:20:32 +0000 2007",
      "protected": false,
      "website": {
        "url": "http://www.nasa.gov/",
        "display_url": "nasa.gov"
      },
      "verification": {
        "verified": true,
        "verified_at": null,
        "type": "government"
      },
      "type": "profile",
      "about_account": {
        "location_accurate": true,
        "username_changes": {
          "count": 0,
          "last_changed_at": null
        }
      }
    },
    "works": [
      {
        "id": "2118449337814352016",
        "url": "https://x.com/NASA/status/2118449337814352016",
        "content": "Flying high!\n\nToday, our X-59 quiet supersonic X-59 aircraft traveled from Birmingham, Alabama, to Daytona Beach, Florida. The aircraft aims to fly faster th...",
        "rawText": "Flying high!\n\nToday, our X-59 quiet supersonic X-59 aircraft traveled from Birmingham, Alabama, to Daytona Beach, Florida. The aircraft aims to fly faster th...",
        "publishedAt": {
          "text": "2026-11-05T21:04:15.000Z",
          "value": 1793912655000
        },
        "likes": 11193,
        "commentsCount": 314,
        "reposts": 1352,
        "quotes": 121,
        "bookmarks": 594,
        "views": 822324,
        "lang": "en",
        "possiblySensitive": false,
        "isNoteTweet": true,
        "communityNote": null,
        "replyingTo": null,
        "replyingToStatus": null,
        "source": null,
        "media": [
          {
            "type": "photo",
            "id": "2118447998266941440",
            "url": "https://pbs.twimg.com/media/HWY9OvvWoAA7DBr.jpg?name=orig",
            "thumbnailUrl": null,
            "width": 4096,
            "height": 2730,
            "durationSec": null,
            "format": null,
            "variants": []
          }
        ],
        "mentions": [],
        "hashtags": [],
        "urls": [],
        "quote": null,
        "repostedBy": null,
        "poster": {
          "nickname": "NASA",
          "username": "NASA",
          "avatar": "https://pbs.twimg.com/profile_images/1321163587679784960/0ZxKlEKB_200x200.jpg",
          "profileUrl": "https://x.com/NASA",
          "id": "11348282",
          "verified": true,
          "verificationType": "government",
          "followersCount": 92275004,
          "followingCount": 115,
          "protected": false
        }
      }
    ],
    "pagination": {
      "cursor": "DAAHCgABHWbdgMg___QLAAIAAAATMjExNzMzNTcyMDY0NTc1OTExMwgAAwAAAAIAAA",
      "hasMore": true
    }
  },
  "meta": {
    "requestId": "pg-audit-r1-x-home-1793954342314006300",
    "durationMs": 8459
  },
  "billing": {
    "unitPrice": 0.8,
    "ruleVersion": "social-primary-v2",
    "billedCount": 1,
    "pointCost": 0.8
  }
}

积点消耗说明

每份主页资料消耗 0.8 积点,附带作品免费。

空结果、失败响应不扣费。同一响应中相同 ID 只计一次,独立调用和续页分别计费。详见 社媒评论 API 计费说明。

在线调试