# X 官方 API 太贵时，怎么让 AI 读 X

X 官方 API 按返回的每条帖子、每个用户从预付额度扣费。SocialToAI 改为按调用计费读 X 上公开可见的帖子、评论、账号和热榜，每次 1 积分起，不需要 X 开发者账号：AI 客户端里填一个 MCP 地址，或用一把 Key 走 HTTP。失败不扣。

- 页面：https://socialtoai.com/zh/how-to/read-x-when-the-official-api-is-too-expensive/
- 最近更新：2026-10-29

## X 官方 API 怎么收费

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

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

X 按返回的资源数从预付额度扣费：每读一条帖子 $0.005，每读一个用户 $0.010。按量付费的方案每个账单周期最多读 300 万条帖子，超过要申请企业方案。X 注明价格可能调整。

来源：[X API 价格页（docs.x.com）](https://docs.x.com/x-api/getting-started/pricing)，读取于 2026-10-29。平台规则会调整，以它自己的页面为准。

## 读一千条帖子，两种算法

X 按返回的帖子数收费：按它每条 $0.005 的价格（读取于 2026-10-29），一千条是 $5.00。SocialToAI 按调用收费：`x.search` 一页最多 20 条（通常 20 条），2 积分一次，一千条约要 50 次调用、100 积分，按第一档约 $0.33。这是估算：一页可能不满。

| 帖子数 | X 官方 API | 这里的调用次数 | 这里按第一档 |
| --- | --- | --- | --- |
| 1,000 | $5.00 | 50 | $0.33 |
| 10,000 | $50.00 | 500 | $3.33 |
| 100,000 | $500.00 | 5,000 | $33.33 |
| 3,000,000 | $15,000.00 | 150,000 | $1,000.00 |

3,000,000 条是 X 按量付费方案每个账单周期能读的上限。要算你自己的调用组合，用[成本估算](https://socialtoai.com/zh/free-tools/api-cost-estimator.md) 或 [X 官方 API 价格计算器](https://socialtoai.com/zh/free-tools/x-api-cost-calculator.md)。

## 用 SocialToAI 读 X

| 调用 | 返回什么 | 价格键 | 积分 |
| --- | --- | --- | --- |
| [搜索](https://socialtoai.com/zh/x-search-api.md) | 按关键词找帖子：正文、作者、点赞数、评论数、播放或阅读数和发布时间。 | `x.search` | 2 |
| [搜索 · 按最新排序](https://socialtoai.com/zh/x-search-api.md) | 按关键词找帖子：正文、作者、点赞数、评论数、播放或阅读数和发布时间。 | `x.search:latest` | 2 |
| [搜索 · 搜账号](https://socialtoai.com/zh/x-search-api.md) | 按关键词找账号：名称、简介、粉丝数、关注数和作品数。 | `x.search:user` | 5 |
| [热榜](https://socialtoai.com/zh/x-trending-api.md) | 现在的热榜：标题、名次和热度。 | `x.trending` | 6 |
| [详情](https://socialtoai.com/zh/x-detail-api.md) | 用编号或链接取一条帖子：正文、作者、点赞数、评论数、播放或阅读数和发布时间。 | `x.detail` | 1 |
| [评论](https://socialtoai.com/zh/x-comments-api.md) | 一条帖子下的评论：正文、点赞数、回复数和时间。 | `x.comments` | 2 |
| [账号资料](https://socialtoai.com/zh/x-user-profile-api.md) | 一个账号：名称、简介、粉丝数、关注数和作品数。 | `x.user_profile` | 1 |
| [账号作品](https://socialtoai.com/zh/x-user-posts-api.md) | 一个账号最近发布的帖子。 | `x.user_posts` | 2 |
| [社群资料](https://socialtoai.com/zh/x-community-api.md) | 按社群编号取 X 社群的资料。 | `x.community` | 1 |
| [社群帖子](https://socialtoai.com/zh/x-community-posts-api.md) | 按社群编号取一页这个 X 社群里的帖子。 | `x.community_posts` | 4 |

**一次调用：搜索**

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

## 在 AI 客户端里

在你的 AI 客户端里添加一个 MCP 服务器：`https://mcp.socialtoai.com/mcp`。能登录授权的客户端（Claude、ChatGPT、Claude Code、Cursor、Codex）会弹出登录页：用邮箱验证码登录，点“允许”，不用复制 Key；其他客户端在请求头里放一把 Key。各客户端的详细步骤见 [MCP 页](https://socialtoai.com/zh/mcp.md)。

| 提问 | 价格键 | 积分 |
| --- | --- | --- |
| 在 X 上搜和“weather forecast”有关的帖子。 | `x.search` | 2 |
| 这个 X 账号最近发了什么：NASA | `x.user_posts` | 2 |
| 读一下这条 X 帖子：2108198226532708497 | `x.detail` | 1 |
| 读一下这条 X 帖子下的评论：2108198226532708497 | `x.comments` | 2 |

## 花多少

一次 `x.search` 调用 2 积分（≈ $0.004–$0.0067）；一千次是 2,000 积分，按第一档约 $6.67，按最大一档约 $4.00。失败不扣，每次返回都写明扣了多少。注册送 100 积分，不用绑卡。

- [X API](https://socialtoai.com/zh/platforms/x.md)：X 上的每个调用和积分。
- [X 有官方 API 吗？](https://socialtoai.com/zh/does-x-have-an-api.md)：官方 API 能做什么，带来源。
- [X API 费用计算器](https://socialtoai.com/zh/free-tools/x-api-cost-calculator.md)：按 X 的价格和按次调用，各算一个月的花费。
- [X MCP 服务器](https://socialtoai.com/zh/mcp/x.md)：录制的对话和花费。
