X
X Post API
获取 X 帖子详情及附带的作者、媒体和评论等数据。
接口说明
X Post API 获取 X 帖子详情及附带的作者、媒体和评论等数据。
使用 Pangolinfo API Key 调用,返回结构化 JSON 数据。
请求URL
请求头
| 参数名 | 参数值 | 类型 | 说明 |
|---|---|---|---|
| Content-Type | application/json | string | 数据格式 |
| Authorization | Bearer xxx | string | 认证凭证 |
采集最长约75秒,客户端超时建议设为90秒。
请求参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
| target | Yes | string | 帖子链接,也可直接传帖子 id(纯数字,如 20) |
仅处理本页列出的请求参数,其他字段忽略。分页游标原样传回,不编码、解码或转换格式。
附带评论限一页;需要继续获取评论时调用对应评论接口。
响应值
| 返回值 | 类型 | 说明 |
|---|---|---|
| code | integer | 状态码,0 表示成功 |
| message | string | 响应信息,成功时为 ok |
| pointCost | number | 本次请求实际消耗的积点 |
| data | object | 返回数据,结构见下表 |
| meta | object | 请求标识及耗时(毫秒) |
| billing | object | 计费条数、单价及规则版本 |
返回参数 data 说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| type | string | Type 可用值: [“post”] |
| poster | object | 作者 |
| post | object | Post |
| thread | object[] | 作者自己的连续推文 (含本帖), 按时间顺序 |
| comments | object[] | 首屏回复 |
| pagination | object | 评论分页 (只能看是否还有更多, 不能续取) |
data.poster 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| nickname | string | null | 显示名, 没有时用用户名 |
| username | string | null | 用户名 (@ 后面那段) |
| avatar | string | null | 头像 |
| profileUrl | string | null | 主页链接 |
| id | string | null | 用户 id |
| verified | boolean | 是否认证 (蓝标 / 金标 / 灰标) |
| verificationType | string | null | 认证类型: individual / business / government; 未认证为 null |
| followersCount | number | null | 粉丝数; 转发者信息里为 null |
| followingCount | number | null | 关注数; 转发者信息里为 null |
| protected | boolean | 是否锁推 (私密) |
data.post 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| id | string | null | 帖子 id |
| url | string | null | 帖子链接 |
| content | string | 正文 (t.co 短链已展开) |
| rawText | string | null | 原始正文 (含 t.co 短链) |
| publishedAt | object | null | 发布时间 (text 为 ISO) |
| likes | number | null | 点赞数 |
| commentsCount | number | null | 回复数 |
| reposts | number | null | 转发数 |
| quotes | number | null | 引用数 |
| bookmarks | number | null | 书签数 |
| views | number | null | 浏览数; 老帖子没有为 null |
| lang | string | null | 语言代码 |
| possiblySensitive | boolean | 是否可能含敏感内容 |
| isNoteTweet | boolean | 是否长文 (Note Tweet) |
| communityNote | any | 社区注释 (上游原样); 没有为 null |
| replyingTo | string | null | 回复的用户名; 不是回复为 null |
| replyingToStatus | string | null | 回复的帖子 id |
| source | string | null | 发布来源客户端; 通常为 null |
| media | object[] | 媒体 |
| mentions | object[] | 正文里的 @ 提及 |
| hashtags | string | null[] | 正文里的话题 (不含 #) |
| urls | object[] | 正文里的链接 |
| repostedBy | object | null | 时间线里的转推: 转发者; 原创为 null |
| quote | object | null | 引用的帖子 (字段同本帖, 另带 poster); 没有为 null |
data.post.publishedAt 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| text | string | null | 上游原始时间文本 |
| value | number | null | 解析后的毫秒时间戳; 解析失败为 null |
data.post.media[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| type | string | null | 媒体类型: photo / video / gif |
| id | string | null | 媒体 id |
| url | string | null | 图片 / 视频链接 |
| thumbnailUrl | string | null | 视频封面; 图片为 null |
| width | number | null | 宽 (px) |
| height | number | null | 高 (px) |
| durationSec | number | null | 视频时长 (秒); 图片为 null |
| format | string | null | 视频格式, 如 video/mp4; 图片为 null |
| variants | object[] | 视频各清晰度; 图片为空 |
data.post.mentions[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| username | string | null | 被提及用户名 |
| id | string | null | 被提及用户 id |
data.post.urls[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| url | string | null | 完整链接 |
| display | string | null | 显示文本 |
data.post.repostedBy 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| nickname | string | null | 显示名, 没有时用用户名 |
| username | string | null | 用户名 (@ 后面那段) |
| avatar | string | null | 头像 |
| profileUrl | string | null | 主页链接 |
| id | string | null | 用户 id |
| verified | boolean | 是否认证 (蓝标 / 金标 / 灰标) |
| verificationType | string | null | 认证类型: individual / business / government; 未认证为 null |
| followersCount | number | null | 粉丝数; 转发者信息里为 null |
| followingCount | number | null | 关注数; 转发者信息里为 null |
| protected | boolean | 是否锁推 (私密) |
data.post.quote 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| id | string | null | 帖子 id |
| url | string | null | 帖子链接 |
| content | string | 正文 (t.co 短链已展开) |
| rawText | string | null | 原始正文 (含 t.co 短链) |
| publishedAt | object | null | 发布时间 (text 为 ISO) |
| likes | number | null | 点赞数 |
| commentsCount | number | null | 回复数 |
| reposts | number | null | 转发数 |
| quotes | number | null | 引用数 |
| bookmarks | number | null | 书签数 |
| views | number | null | 浏览数; 老帖子没有为 null |
| lang | string | null | 语言代码 |
| possiblySensitive | boolean | 是否可能含敏感内容 |
| isNoteTweet | boolean | 是否长文 (Note Tweet) |
| communityNote | any | 社区注释 (上游原样); 没有为 null |
| replyingTo | string | null | 回复的用户名; 不是回复为 null |
| replyingToStatus | string | null | 回复的帖子 id |
| source | string | null | 发布来源客户端; 通常为 null |
| media | object[] | 媒体 |
| mentions | object[] | 正文里的 @ 提及 |
| hashtags | string | null[] | 正文里的话题 (不含 #) |
| urls | object[] | 正文里的链接 |
| repostedBy | object | null | 时间线里的转推: 转发者; 原创为 null |
| quote | any | 引用帖里的引用 (同形) |
| poster | object | Poster |
data.thread[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| id | string | null | 帖子 id |
| url | string | null | 帖子链接 |
| content | string | 正文 (t.co 短链已展开) |
| rawText | string | null | 原始正文 (含 t.co 短链) |
| publishedAt | object | null | 发布时间 (text 为 ISO) |
| likes | number | null | 点赞数 |
| commentsCount | number | null | 回复数 |
| reposts | number | null | 转发数 |
| quotes | number | null | 引用数 |
| bookmarks | number | null | 书签数 |
| views | number | null | 浏览数; 老帖子没有为 null |
| lang | string | null | 语言代码 |
| possiblySensitive | boolean | 是否可能含敏感内容 |
| isNoteTweet | boolean | 是否长文 (Note Tweet) |
| communityNote | any | 社区注释 (上游原样); 没有为 null |
| replyingTo | string | null | 回复的用户名; 不是回复为 null |
| replyingToStatus | string | null | 回复的帖子 id |
| source | string | null | 发布来源客户端; 通常为 null |
| media | object[] | 媒体 |
| mentions | object[] | 正文里的 @ 提及 |
| hashtags | string | null[] | 正文里的话题 (不含 #) |
| urls | object[] | 正文里的链接 |
| repostedBy | object | null | 时间线里的转推: 转发者; 原创为 null |
| quote | object | null | 引用的帖子 (字段同本帖, 另带 poster); 没有为 null |
data.thread[].publishedAt 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| text | string | null | 上游原始时间文本 |
| value | number | null | 解析后的毫秒时间戳; 解析失败为 null |
data.thread[].media[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| type | string | null | 媒体类型: photo / video / gif |
| id | string | null | 媒体 id |
| url | string | null | 图片 / 视频链接 |
| thumbnailUrl | string | null | 视频封面; 图片为 null |
| width | number | null | 宽 (px) |
| height | number | null | 高 (px) |
| durationSec | number | null | 视频时长 (秒); 图片为 null |
| format | string | null | 视频格式, 如 video/mp4; 图片为 null |
| variants | object[] | 视频各清晰度; 图片为空 |
data.thread[].mentions[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| username | string | null | 被提及用户名 |
| id | string | null | 被提及用户 id |
data.thread[].urls[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| url | string | null | 完整链接 |
| display | string | null | 显示文本 |
data.thread[].repostedBy 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| nickname | string | null | 显示名, 没有时用用户名 |
| username | string | null | 用户名 (@ 后面那段) |
| avatar | string | null | 头像 |
| profileUrl | string | null | 主页链接 |
| id | string | null | 用户 id |
| verified | boolean | 是否认证 (蓝标 / 金标 / 灰标) |
| verificationType | string | null | 认证类型: individual / business / government; 未认证为 null |
| followersCount | number | null | 粉丝数; 转发者信息里为 null |
| followingCount | number | null | 关注数; 转发者信息里为 null |
| protected | boolean | 是否锁推 (私密) |
data.thread[].quote 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| id | string | null | 帖子 id |
| url | string | null | 帖子链接 |
| content | string | 正文 (t.co 短链已展开) |
| rawText | string | null | 原始正文 (含 t.co 短链) |
| publishedAt | object | null | 发布时间 (text 为 ISO) |
| likes | number | null | 点赞数 |
| commentsCount | number | null | 回复数 |
| reposts | number | null | 转发数 |
| quotes | number | null | 引用数 |
| bookmarks | number | null | 书签数 |
| views | number | null | 浏览数; 老帖子没有为 null |
| lang | string | null | 语言代码 |
| possiblySensitive | boolean | 是否可能含敏感内容 |
| isNoteTweet | boolean | 是否长文 (Note Tweet) |
| communityNote | any | 社区注释 (上游原样); 没有为 null |
| replyingTo | string | null | 回复的用户名; 不是回复为 null |
| replyingToStatus | string | null | 回复的帖子 id |
| source | string | null | 发布来源客户端; 通常为 null |
| media | object[] | 媒体 |
| mentions | object[] | 正文里的 @ 提及 |
| hashtags | string | null[] | 正文里的话题 (不含 #) |
| urls | object[] | 正文里的链接 |
| repostedBy | object | null | 时间线里的转推: 转发者; 原创为 null |
| quote | any | 引用帖里的引用 (同形) |
| poster | object | Poster |
data.comments[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| id | string | null | 帖子 id |
| url | string | null | 帖子链接 |
| content | string | 正文 (t.co 短链已展开) |
| rawText | string | null | 原始正文 (含 t.co 短链) |
| publishedAt | object | null | 发布时间 (text 为 ISO) |
| likes | number | null | 点赞数 |
| commentsCount | number | null | 回复数 |
| reposts | number | null | 转发数 |
| quotes | number | null | 引用数 |
| bookmarks | number | null | 书签数 |
| views | number | null | 浏览数; 老帖子没有为 null |
| lang | string | null | 语言代码 |
| possiblySensitive | boolean | 是否可能含敏感内容 |
| isNoteTweet | boolean | 是否长文 (Note Tweet) |
| communityNote | any | 社区注释 (上游原样); 没有为 null |
| replyingTo | string | null | 回复的用户名; 不是回复为 null |
| replyingToStatus | string | null | 回复的帖子 id |
| source | string | null | 发布来源客户端; 通常为 null |
| media | object[] | 媒体 |
| mentions | object[] | 正文里的 @ 提及 |
| hashtags | string | null[] | 正文里的话题 (不含 #) |
| urls | object[] | 正文里的链接 |
| repostedBy | object | null | 时间线里的转推: 转发者; 原创为 null |
| quote | object | null | 引用的帖子 (字段同本帖, 另带 poster); 没有为 null |
| time | object | null | 回复时间 (同 publishedAt) |
| avatar | string | null | 回复者头像 |
| nickname | string | null | 回复者显示名 |
| profileUrl | string | null | 回复者主页 |
| replys | any[] | 不展开楼中楼, 恒为空 |
| replyCount | number | null | 该回复的回复数 (同 commentsCount) |
| poster | object | 回复者 |
data.comments[].publishedAt 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| text | string | null | 上游原始时间文本 |
| value | number | null | 解析后的毫秒时间戳; 解析失败为 null |
data.comments[].media[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| type | string | null | 媒体类型: photo / video / gif |
| id | string | null | 媒体 id |
| url | string | null | 图片 / 视频链接 |
| thumbnailUrl | string | null | 视频封面; 图片为 null |
| width | number | null | 宽 (px) |
| height | number | null | 高 (px) |
| durationSec | number | null | 视频时长 (秒); 图片为 null |
| format | string | null | 视频格式, 如 video/mp4; 图片为 null |
| variants | object[] | 视频各清晰度; 图片为空 |
data.comments[].mentions[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| username | string | null | 被提及用户名 |
| id | string | null | 被提及用户 id |
data.comments[].urls[] 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| url | string | null | 完整链接 |
| display | string | null | 显示文本 |
data.comments[].repostedBy 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| nickname | string | null | 显示名, 没有时用用户名 |
| username | string | null | 用户名 (@ 后面那段) |
| avatar | string | null | 头像 |
| profileUrl | string | null | 主页链接 |
| id | string | null | 用户 id |
| verified | boolean | 是否认证 (蓝标 / 金标 / 灰标) |
| verificationType | string | null | 认证类型: individual / business / government; 未认证为 null |
| followersCount | number | null | 粉丝数; 转发者信息里为 null |
| followingCount | number | null | 关注数; 转发者信息里为 null |
| protected | boolean | 是否锁推 (私密) |
data.comments[].quote 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| id | string | null | 帖子 id |
| url | string | null | 帖子链接 |
| content | string | 正文 (t.co 短链已展开) |
| rawText | string | null | 原始正文 (含 t.co 短链) |
| publishedAt | object | null | 发布时间 (text 为 ISO) |
| likes | number | null | 点赞数 |
| commentsCount | number | null | 回复数 |
| reposts | number | null | 转发数 |
| quotes | number | null | 引用数 |
| bookmarks | number | null | 书签数 |
| views | number | null | 浏览数; 老帖子没有为 null |
| lang | string | null | 语言代码 |
| possiblySensitive | boolean | 是否可能含敏感内容 |
| isNoteTweet | boolean | 是否长文 (Note Tweet) |
| communityNote | any | 社区注释 (上游原样); 没有为 null |
| replyingTo | string | null | 回复的用户名; 不是回复为 null |
| replyingToStatus | string | null | 回复的帖子 id |
| source | string | null | 发布来源客户端; 通常为 null |
| media | object[] | 媒体 |
| mentions | object[] | 正文里的 @ 提及 |
| hashtags | string | null[] | 正文里的话题 (不含 #) |
| urls | object[] | 正文里的链接 |
| repostedBy | object | null | 时间线里的转推: 转发者; 原创为 null |
| quote | any | 引用帖里的引用 (同形) |
| poster | object | Poster |
data.comments[].time 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| text | string | null | 上游原始时间文本 |
| value | number | null | 解析后的毫秒时间戳; 解析失败为 null |
data.comments[].poster 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| nickname | string | null | 显示名, 没有时用用户名 |
| username | string | null | 用户名 (@ 后面那段) |
| avatar | string | null | 头像 |
| profileUrl | string | null | 主页链接 |
| id | string | null | 用户 id |
| verified | boolean | 是否认证 (蓝标 / 金标 / 灰标) |
| verificationType | string | null | 认证类型: individual / business / government; 未认证为 null |
| followersCount | number | null | 粉丝数; 转发者信息里为 null |
| followingCount | number | null | 关注数; 转发者信息里为 null |
| protected | boolean | 是否锁推 (私密) |
data.pagination 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| comments | object | Comments |
data.pagination.comments 字段说明
| 返回值 | 类型 | 说明 |
|---|---|---|
| cursor | null | 恒为 null: FxTwitter 游客态回复续页不可用 |
| hasMore | boolean | 是否还有更多回复 |
请求示例
返回示例
下例截取实际响应中的首条列表记录,长文本与链接作了缩写;pointCost 为该次完整响应的实际费用。完整字段结构可在在线调试页查看。
积点消耗说明
每条帖子、视频或商家主体消耗 0.8 积点,附带评论、回复和作者资料免费。
空结果、失败响应不扣费。同一响应中相同 ID 只计一次,独立调用和续页分别计费。详见 社媒评论 API 计费说明。

