---
title: "X（推特）API 数据接口：按次计费 · SocialToAI"
canonical: https://socialtoai.app/zh/platforms/x/
updated: 2026-11-01
---

# X API 数据接口

X API（数据接口）可以搜帖子，读帖子详情、评论、账号资料、账号发布的帖子和热榜，不用登录 X 账号，也不用提供 Cookie。每次调用 1 到 6 积分（低至 $0.002），失败不扣。可以直接发 HTTP 请求，也可以通过 MCP 接到 AI 客户端里用。最近实测：2026-11-19。

- 页面：https://socialtoai.app/zh/platforms/x/
- 最近更新：2026-11-01
- 最近实测：2026-11-19

## 可用的动作

| 动作 | 返回什么 | 由什么参数选中 | 价格键 | 积分 | 参数和字段 |
| --- | --- | --- | --- | --- | --- |
| `search` | 按关键词找帖子：正文、作者、点赞数、评论数、播放或阅读数和发布时间。 | — | `x.search` | 2 | [X 搜索接口](https://socialtoai.app/zh/x-search-api.md) |
| `search` | 按最新排序 | `sort=latest` | `x.search:latest` | 2 | [X 搜索接口](https://socialtoai.app/zh/x-search-api.md) |
| `search` | 搜账号 | `type=user` | `x.search:user` | 5 | [X 搜索接口](https://socialtoai.app/zh/x-search-api.md) |
| `trending` | 现在的热榜：标题、名次和热度。 | — | `x.trending` | 6 | [X 热榜接口](https://socialtoai.app/zh/x-trending-api.md) |
| `detail` | 用编号或链接取一条帖子：正文、作者、点赞数、评论数、播放或阅读数和发布时间。 | — | `x.detail` | 1 | [X 详情接口](https://socialtoai.app/zh/x-detail-api.md) |
| `detail` | 视频的逐字稿 | `include=transcript` | `x.detail:transcript` | 2 | [X 详情接口](https://socialtoai.app/zh/x-detail-api.md) |
| `comments` | 一条帖子下的评论：正文、点赞数、回复数和时间。 | — | `x.comments` | 2 | [X 评论接口](https://socialtoai.app/zh/x-comments-api.md) |
| `user_profile` | 一个账号：名称、简介、粉丝数、关注数和作品数。 | — | `x.user_profile` | 1 | [X 账号资料接口](https://socialtoai.app/zh/x-user-profile-api.md) |
| `user_posts` | 一个账号最近发布的帖子。 | — | `x.user_posts` | 2 | [X 账号作品接口](https://socialtoai.app/zh/x-user-posts-api.md) |

和 Reddit 比，X 的帖子多给作者粉丝数、收藏、转发、播放或浏览和话题标签，少给标题和分享；账号资料多给粉丝数和关注数。

给 AI 读更省：21 个接口实测，同样的录制数据，平台原始 JSON 合计约 247,096 token，SocialToAI 返回约 88,867 token，少 64%（2026-11-06，方法见“测量方法”页）。

## 调用示例

```bash
curl https://socialtoai.app/v1/search \
  -H "Authorization: Bearer $SOCIALTOAI_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "x",
    "query": "weather forecast"
  }'
```

## X 独有的接口

每个接口用自己的 op，通过 `POST /v1/call/{op}` 调用；完整的参数和返回字段在它自己的页面。

### 社区与列表

| 接口 | 做什么 | 价格键 | 积分 | 参数和字段 |
| --- | --- | --- | --- | --- |
| 社群资料 | 按社群编号取 X 社群的资料。 | `x.community` | 1 | [X 社群资料接口](https://socialtoai.app/zh/x-community-api.md) |
| 社群帖子 | 按社群编号取一页这个 X 社群里的帖子。 | `x.community_posts` | 4 | [X 社群帖子接口](https://socialtoai.app/zh/x-community-posts-api.md) |
| 列表帖子 | 按列表编号取一页这个 X 列表时间线上的帖子，从最新的开始，每页约 100 条。 | `x.list_posts` | 2 | [X 列表帖子接口](https://socialtoai.app/zh/x-list-posts-api.md) |
| 社群成员 | 按社群编号取一页加入了这个 X 社群的账号，每页约 20 个。 | `x.community_members` | 5 | [X 社群成员接口](https://socialtoai.app/zh/x-community-members-api.md) |
| 列表关注者 | 按列表编号取关注了这个 X 列表的账号，最多 20 个。 | `x.list_followers` | 5 | [X 列表关注者接口](https://socialtoai.app/zh/x-list-followers-api.md) |
| 列表成员 | 按列表编号取一页这个 X 列表收录的账号，每页 20 个。 | `x.list_members` | 5 | [X 列表成员接口](https://socialtoai.app/zh/x-list-members-api.md) |

### 内容与账号

| 接口 | 做什么 | 价格键 | 积分 | 参数和字段 |
| --- | --- | --- | --- | --- |
| 长文详情 | 按帖子编号取这条 X 帖子附带的长文。 | `x.article` | 2 | [X 长文详情接口](https://socialtoai.app/zh/x-article-api.md) |
| 帖子引用列表 | 按帖子编号取一页引用它的 X 帖子，可按时间或按热门排。 | `x.quotes` | 4 | [X 帖子引用列表接口](https://socialtoai.app/zh/x-quotes-api.md) |
| 帖子转推用户 | 按帖子编号取一页转推了这条 X 帖子的账号。 | `x.retweeters` | 2 | [X 帖子转推用户接口](https://socialtoai.app/zh/x-retweeters-api.md) |
| 帖子对话串 | 按对话串里任意一条帖子的编号，取这条对话串的帖子。 | `x.thread` | 9 | [X 帖子对话串接口](https://socialtoai.app/zh/x-thread-api.md) |
| 用户粉丝列表 | 按账号名取一页关注该 X 用户的账号，每页最多 200 个，从最新关注的开始。 | `x.followers` | 12 | [X 用户粉丝列表接口](https://socialtoai.app/zh/x-followers-api.md) |
| 用户关注列表 | 按账号名取一页该 X 用户关注的账号，每页最多 200 个。 | `x.following` | 12 | [X 用户关注列表接口](https://socialtoai.app/zh/x-following-api.md) |
| 用户提及 | 按账号名取一页提及该 X 用户的帖子，从最新的开始。 | `x.mentions` | 4 | [X 用户提及接口](https://socialtoai.app/zh/x-mentions-api.md) |

## X 给不了的字段

这些字段在对应的调用里始终是 null，并列在返回的 `unavailable` 里。

| 字段 | 哪些动作 |
| --- | --- |
| `title` | search, detail, user_posts |
| `metrics.shares` | search, detail, user_posts |
| `is_pinned` | search, detail, user_posts |
| `id` | trending |
| `heat` | trending |
| `url` | trending |
| `parent_id` | comments |
| `root_id` | comments |

## 办成一件事多少钱

| 要做的事 | 怎么算 | 积分 | 约合 |
| --- | --- | --- | --- |
| 搜 1,000 条 X 结果 | 每页通常 20 条，50 页 | 100 积分 | 约 ¥2.4（$0.33） |
| 读 1,000 条 X 评论 | 每页通常 35 条，29 页 | 58 积分 | 约 ¥1.4（$0.19） |
| 回填一个 X 账号：200 条帖子列表加 20 条全文 | 10 页列表 + 20 次全文 | 40 积分 | 约 ¥0.96（$0.13） |
| 每天盯 1 个 X 账号，一个月最多 | 每次 9 积分 × 31 天 | 279 积分 | 约 ¥6.7（$0.93） |

按 $10 档算，买得越多单价越低。监控只在你开启时运行，随时可以暂停，没有订阅。

## 在 AI 里直接问

- 这周 X 上，家用咖啡和抹茶哪个更火？ → search, search: 4 积分

- 读一下这条 X 帖子的评论，告诉我大家在抱怨什么。 → detail, comments × 3: 7 积分

- 在 X 上找 5 个发露营咖啡内容的账号，看看他们最近发了什么。 → search, user_posts × 5: 15 积分

[X MCP 服务器](https://socialtoai.app/zh/mcp/x.md)

## 能读 X 的现成工具

- [品牌口碑](https://socialtoai.app/zh/tools/brand-buzz.md)：各平台上的态度占比、提到最多的事，以及背后的帖子
- [评论分析](https://socialtoai.app/zh/tools/comment-insights.md)：评论里的话题和各自占比，还有提问、想买和投诉
- [账号动态](https://socialtoai.app/zh/tools/account-watch.md)：每个账号最近发了什么，哪条明显好于平时
- [找达人](https://socialtoai.app/zh/tools/find-creators.md)：做这类内容的达人：体量、近期作品和契合度
- [达人档案](https://socialtoai.app/zh/tools/creator-card.md)：这个人在其他平台的账号、各自的数据，以及是同一人的把握
- [批量链接数据](https://socialtoai.app/zh/tools/batch-stats.md)：每条链接一行，给出现在的数字；失效的链接会标出来
- [爆款发现](https://socialtoai.app/zh/tools/viral-finder.md)：明显超出作者平时水平的内容

## 官方 API

X 提供官方 API，可读取帖子、用户和搜索结果。开发者在 X 开发者控制台注册即可使用，按调用量从预付额度中扣费；用量更大需申请企业方案。

来源：[X 官方开发者文档](https://docs.x.com/x-api/getting-started/pricing)，核对于 2026-10-17。

|  | 谁能用 | 费用 | 限制 | 来源 |
| --- | --- | --- | --- | --- |
| X API（按量付费） | 任何开发者：在 X 开发者控制台注册，买预付额度。 | 每读一条帖子 $0.005，每读一个用户 $0.010，按返回的资源数扣。 | 每个账单周期最多读 300 万条帖子，再多要申请企业方案。X 注明价格可能调整。 | [docs.x.com](https://docs.x.com/x-api/getting-started/pricing)，核对于 2026-10-29 |
| SocialToAI | 有 Key 就能用，不用你的 X 账号，也不用审核。 | 每次 1 积分起（约 $0.0033），失败不扣。 | 只读公开可见的内容；一次调用最多 60 条。 | https://socialtoai.app/zh/pricing.md |

在这里读 1,000 条帖子：约 50 次 `x.search` 调用（每页通常 20 条），共 100 积分，按第一档约 $0.33；X 官方按每条 $0.005 算是 $5。 [算一下要多少钱](https://socialtoai.app/zh/free-tools/api-cost-estimator.md)

[X 官方 API 的申请条件和价格](https://socialtoai.app/zh/does-x-have-an-api.md)

- [各平台评论接口对比](https://socialtoai.app/zh/comments-api.md)：哪些平台能取评论、每页多少条、多少积分。
- [各平台字幕接口对比](https://socialtoai.app/zh/transcript-api.md)：哪些平台能取字幕、带不带时间。
- [X 官方 API 太贵时，怎么让 AI 读 X](https://socialtoai.app/zh/how-to/read-x-when-the-official-api-is-too-expensive.md)：X 官方价格（带来源），以及改为按次读 X
- [视频评论分析：让 AI 读完评论，带上原话](https://socialtoai.app/zh/how-to/analyze-comments-with-quotes.md)：评论在说什么，带原话：用工具还是让 AI 读，各平台价格，一次录制
- [批量查几百条链接的互动数据](https://socialtoai.app/zh/how-to/check-stats-for-many-links.md)：一次查几百条链接的数字：各平台价格、赠送积分能跑多少、什么时候会停
- [怎么按日期搜 X：since 和 until](https://socialtoai.app/zh/how-to/search-x-by-date.md)：since 和 until 的两种写法，附实测，以及读一个月要多少钱
- [每天盯 X（Twitter）：一个月到底花多少](https://socialtoai.app/zh/monitors/x.md)：每天盯 X 的关键词或账号，每次 2 积分，和 X 官方价格对比的月成本
- [每天盯竞品账号：发了什么，哪条比平时好](https://socialtoai.app/zh/monitors/competitors.md)：每天盯竞品账号：新发了什么、哪条比平时好，每个账号 9 积分起
- [每天盯品牌口碑：新讨论和背后的原帖](https://socialtoai.app/zh/monitors/brand.md)：每天盯品牌口碑：态度占比和背后的原帖，每次 16 积分起
- [X 今日热榜](https://socialtoai.app/zh/trending/x.md)：每天更新的榜单，一页看全。
- [X MCP 服务器](https://socialtoai.app/zh/mcp/x.md)：让你的 AI 直接读 X。

[X API 费用计算器](https://socialtoai.app/zh/free-tools/x-api-cost-calculator.md)：按 X 的价格和按次调用，各算一个月的花费。
