接口说明

X Works API 获取 X 账号或频道的作品列表。

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

请求URL

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

请求头

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

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

请求参数

参数必填类型说明
targetYesstring主页链接,也可直接传用户名(可带 @)
optionsNoobject仅处理下列开放参数;未列出的字段忽略,内部参数不可覆盖。

options 参数说明

参数必填类型说明
cursorNostring续取时间线: 上次输出的 pagination.cursor

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

每次只取一页,用返回游标续取。

响应值

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

返回参数 data 说明

返回值类型说明
typestringType
可用值: [“works”]
worksobject[]时间线帖子 (含转推)
paginationobjectPagination

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-works \
  --header 'Authorization: Bearer YOUR_PANGOLINFO_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "target": "https://x.com/nasa"
}'

返回示例

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

{
  "code": 0,
  "message": "ok",
  "pointCost": 11.2,
  "data": {
    "type": "works",
    "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": 11195,
        "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": 92274999,
          "followingCount": 115,
          "protected": false
        }
      }
    ],
    "pagination": {
      "cursor": "DAAHCgABHWbdiFb___QLAAIAAAATMjExNzMzNTcyMDY0NTc1OTExMwgAAwAAAAIAAA",
      "hasMore": true
    }
  },
  "meta": {
    "requestId": "pg-audit-r1-x-works-1793954356444201400",
    "durationMs": 2029
  },
  "billing": {
    "unitPrice": 0.8,
    "ruleVersion": "social-primary-v2",
    "billedCount": 14,
    "pointCost": 11.2
  }
}

积点消耗说明

每条主体结果消耗 0.8 积点。

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

在线调试