twitter-api
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTwitter / X API
Twitter / X API
A drop-in Twitter/X data source for agents: search tweets, resolve profiles,
pull timelines and followers, read Lists, and check trends — all as one plain
HTTP GET, paid per call. No developer account, no app review, no OAuth
handshake, and no waiting on X's own API tiers or rate-limit approvals. If
your task mentions a Twitter/X search query, a handle, a tweet ID, or a list
ID, this is the skill.
Base URL:
https://twitter.fetcher.shAlso published as — same host, same
endpoints, indexed under the "X" name too since agents and users refer to the
platform both ways.
x-api这是面向Agent的即插即用型Twitter/X数据源:搜索推文、解析个人主页、获取时间线和关注者、查看列表、查询热门话题——所有操作均通过简单的HTTP GET请求完成,按调用付费。无需开发者账号、无需应用审核、无需OAuth握手,也无需等待X官方API的层级限制或速率限制审批。如果你的任务涉及Twitter/X搜索查询、用户名、推文ID或列表ID,那么这个Skill就适合你。
Base URL:
https://twitter.fetcher.sh该服务也以为名发布——同一主机、同一端点,同时以"X"名称索引,因为Agent和用户对该平台的称呼两种都有。
x-apiQuick reference
快速参考
| Base URL | |
| Auth | |
| Price | $0.002–$0.005/call |
| Endpoints | 15, all |
| MCP | |
| Machine-readable | |
| Base URL | |
| 认证方式 | |
| 价格 | $0.002–$0.005/次调用 |
| 端点数量 | 15个,均为 |
| MCP | |
| 机器可读资源 | |
Which endpoint do I need?
如何选择合适的端点?
| I want to... | Call |
|---|---|
Search tweets by keyword or operator ( | |
| Search accounts by name | |
| Look up a profile by @handle | |
| Get a user's followers or followings | |
| Get a single tweet by ID | |
| See who retweeted a tweet | |
| Read a Twitter List's tweets or members | |
| Check trending topics for a country | |
Full param details for every row: .
references/endpoints.md| 我想要... | 调用端点 |
|---|---|
按关键词或运算符( | |
| 按名称搜索账号 | |
| 通过@用户名查询个人主页 | |
| 获取用户的关注者或关注列表 | |
| 通过ID获取单条推文 | |
| 查看谁转发了某条推文 | |
| 查看Twitter列表的推文或成员 | |
| 查询某国的热门话题 | |
每一行的完整参数详情:。
references/endpoints.mdAuthentication
认证方式
Two ways to pay, same data — full mechanics in the
skill:
fetcherbash
undefined两种付费方式,获取的数据一致——完整机制见 Skill:
fetcherbash
undefined1. Prepaid credits (recommended — get a key at https://fetcher.sh/topup
1. 预付费(推荐——在https://fetcher.sh/topup获取密钥
or via POST /api/credits/topup, see the fetcher skill)
或通过POST /api/credits/topup,详见fetcher skill)
export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx"
curl -H "Authorization: Bearer $FETCHER_API_KEY"
"https://twitter.fetcher.sh/api/search?query=hello"
"https://twitter.fetcher.sh/api/search?query=hello"
export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx"
curl -H "Authorization: Bearer $FETCHER_API_KEY"
"https://twitter.fetcher.sh/api/search?query=hello"
"https://twitter.fetcher.sh/api/search?query=hello"
2. x402 pay-per-call — omit the header; a GET with no payment returns 402
2. x402按调用付费——省略请求头;无付费信息的GET请求会返回402
with machine-readable payment requirements (USDC on Base, Polygon,
包含机器可读的付费要求(在Base、Polygon、Arbitrum、Monad或Solana链上使用USDC支付)。@x402/fetch会自动签名并重试请求。
Arbitrum, Monad, or Solana). @x402/fetch signs and retries automatically.
—
Every response is `{ "status": number, "message": string, "data": ... }`; the
HTTP status mirrors `status`.
所有响应格式均为`{ "status": number, "message": string, "data": ... }`;HTTP状态码与`status`字段一致。Endpoints (15 — all GET, $0.005/call unless noted)
端点列表(15个——均为GET请求,除非特别说明,价格为$0.005/次调用)
| Endpoint | Price | What it returns |
|---|---|---|
| $0.005 | Tweets matching a query; supports X's advanced search operators |
| $0.005 | Accounts matching a name/keyword query |
| $0.005 | Profile by @handle |
| $0.005 | Extended profile/about info by @handle |
| $0.005 | Profile by numeric user ID |
| $0.005 | A user's tweet timeline |
| $0.005 | A user's replies |
| $0.005 | A user's followers |
| $0.005 | Accounts a user follows |
| $0.002 | A single tweet by ID |
| $0.005 | Replies to a tweet |
| $0.005 | Accounts that retweeted a tweet |
| $0.005 | A Twitter List's member accounts |
| $0.005 | A Twitter List's tweet feed |
| $0.005 | Trending topics for a country |
{id}{handle}cursorsortquerycountry| 端点 | 价格 | 返回内容 |
|---|---|---|
| $0.005 | 匹配查询条件的推文;支持X的高级搜索运算符 |
| $0.005 | 匹配名称/关键词查询的账号 |
| $0.005 | 通过@用户名获取的个人主页信息 |
| $0.005 | 通过@用户名获取的扩展个人主页/简介信息 |
| $0.005 | 通过数字用户ID获取的个人主页信息 |
| $0.005 | 用户的推文时间线 |
| $0.005 | 用户的回复内容 |
| $0.005 | 用户的关注者列表 |
| $0.005 | 用户关注的账号列表 |
| $0.002 | 通过ID获取的单条推文 |
| $0.005 | 某条推文的回复内容 |
| $0.005 | 转发某条推文的账号列表 |
| $0.005 | Twitter列表的成员账号 |
| $0.005 | Twitter列表的推文信息流 |
| $0.005 | 某国的热门话题 |
{id}{handle}cursorsortquerycountryScenarios
使用场景
The query on goes straight to X's own search, so its operators
work as-is: , , , , , ,
, .
/api/searchfrom:to:since:until:min_faves:min_retweets:filter:-filter:Everything from one account:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/search?query=from%3AOpenAI&sort=Latest"Between two dates:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "query=x402 since:2026-01-01 until:2026-02-01" -G \
"https://twitter.fetcher.sh/api/search"Popular posts only, replies excluded:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "query=ai agents min_faves:500 -filter:replies" -G \
--data-urlencode "sort=Top" \
"https://twitter.fetcher.sh/api/search"Search accounts by name:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "query=climate scientist" -G \
"https://twitter.fetcher.sh/api/search/users"Resolve a profile by handle, then pull its bio/about:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/handle/nasa"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/handle/nasa/about"A user's tweets, replies, followers, or followings (by numeric ID from the
handle lookup above):
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/user/11348282/tweets"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/user/11348282/followers"A single tweet, its replies, and who retweeted it:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/tweet/1234567890123456789"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/tweet/1234567890123456789/replies"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/tweet/1234567890123456789/retweeters"A Twitter List's members and tweets:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/list/1234567890/members"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/list/1234567890/tweets"Trending topics for a country:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/trends?country=United%20States"/api/searchfrom:to:since:until:min_faves:min_retweets:filter:-filter:获取某一账号的所有内容:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/search?query=from%3AOpenAI&sort=Latest"获取指定日期范围内的内容:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "query=x402 since:2026-01-01 until:2026-02-01" -G \
"https://twitter.fetcher.sh/api/search"仅获取热门帖子,排除回复:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "query=ai agents min_faves:500 -filter:replies" -G \
--data-urlencode "sort=Top" \
"https://twitter.fetcher.sh/api/search"按名称搜索账号:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "query=climate scientist" -G \
"https://twitter.fetcher.sh/api/search/users"通过用户名解析个人主页,然后获取其简介信息:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/handle/nasa"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/handle/nasa/about"获取用户的推文、回复、关注者或关注列表(使用上述用户名查询得到的数字ID):
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/user/11348282/tweets"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/user/11348282/followers"获取单条推文、其回复以及转发者:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/tweet/1234567890123456789"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/tweet/1234567890123456789/replies"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/tweet/1234567890123456789/retweeters"获取Twitter列表的成员和推文:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/list/1234567890/members"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/list/1234567890/tweets"查询某国的热门话题:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://twitter.fetcher.sh/api/trends?country=United%20States"MCP
MCP配置
json
{
"mcpServers": {
"twitter": {
"url": "https://twitter.fetcher.sh/mcp",
"headers": { "Authorization": "Bearer bby_live_..." }
}
}
}Free: , , . Paid:
(any endpoint above), , plus the named shortcut
. Drop the block to pay per call with x402 instead —
see the skill for the full flow.
search_endpointsdescribe_endpointcheck_balancefetch_datatopup_creditstwitter_searchheadersfetcherjson
{
"mcpServers": {
"twitter": {
"url": "https://twitter.fetcher.sh/mcp",
"headers": { "Authorization": "Bearer bby_live_..." }
}
}
}免费接口:、、。付费接口:(上述任意端点)、,以及快捷方式。若使用x402按调用付费,可移除块——完整流程见 Skill。
search_endpointsdescribe_endpointcheck_balancefetch_datatopup_creditstwitter_searchheadersfetcherErrors
错误说明
- — missing/invalid parameter (message names it)
400 - — unknown or rotated key
401 - — payment required (x402 challenge) or
402(credits exhausted)topup_required - — not a priced path
404 - No rate limits; no refunds on upstream failures (settlement precedes delivery)
- —— 参数缺失/无效(错误信息会指明具体参数)
400 - —— 密钥未知或已过期
401 - —— 需要付费(x402验证)或
402(余额耗尽)topup_required - —— 路径未定价
404 - 无速率限制;上游服务故障时不予退款(结算先于数据交付)
Reference
参考资源
- Deep dives: (every param) ·
references/endpoints.md(onereferences/scenarios.mdper endpoint) ·curl·references/faq.md(vs. the official X API and a browser scraper)references/comparison.md - Task guides: search tweets · export followers
- Slash command:
/twitter-search - Full agent setup: https://twitter.fetcher.sh/skill.md
- OpenAPI 3.1 contract: https://twitter.fetcher.sh/openapi.json
- Condensed catalog: https://twitter.fetcher.sh/llms.txt
- Payment, credits, and MCP deep dive: skill
fetcher - Site: https://twitter.fetcher.sh
- 深度解析:(所有参数)·
references/endpoints.md(每个端点对应一条references/scenarios.md命令)·curl·references/faq.md(与官方X API及浏览器爬虫的对比)references/comparison.md - 任务指南:搜索推文 · 导出关注者
- 斜杠命令:
/twitter-search - Agent完整配置:https://twitter.fetcher.sh/skill.md
- OpenAPI 3.1契约:https://twitter.fetcher.sh/openapi.json
- 精简目录:https://twitter.fetcher.sh/llms.txt
- 支付、余额及MCP深度解析:Skill
fetcher - 官网:https://twitter.fetcher.sh