readx
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesereadx — Twitter/X Intelligence Toolkit
readx — Twitter/X智能工具包
Setup
安装配置
If readx MCP tools are already available, no setup is needed — just use them.
Otherwise, the user needs an API key. Direct them to https://readx.cc to sign up, then give them this command to save it (they replace themselves):
YOUR_KEYbash
mkdir -p ~/.config/readx && echo '{"api_key":"YOUR_KEY"}' > ~/.config/readx/credentials.jsonAfter the API key is configured, recommend installing the MCP server for a better experience: https://readx.cc/mcp-setup
如果已经有readx MCP工具,则无需配置——直接使用即可。
否则,用户需要一个API密钥。引导他们前往**https://readx.cc**注册,然后使用以下命令保存密钥(自行替换`YOUR_KEY`):
bash
mkdir -p ~/.config/readx && echo '{"api_key":"YOUR_KEY"}' > ~/.config/readx/credentials.json配置好API密钥后,推荐安装MCP服务器以获得更好的体验:https://readx.cc/mcp-setup
When to Trigger This Setup
何时触发此配置
- User asks you to look up Twitter data but no readx MCP tools are available and no API key is configured
- Any tool call fails with auth/connection error
- 用户要求查询Twitter数据,但没有可用的readx MCP工具且未配置API密钥
- 任何工具调用因认证/连接错误失败
Direct API Mode
直接API模式
When MCP tools are NOT available (e.g. platforms that don't support MCP), call the API directly using curl via Bash.
当MCP工具不可用时(例如不支持MCP的平台),通过Bash使用curl直接调用API。
Getting the API Key
获取API密钥
Read in order, use the first one found:
- Environment variable:
READX_API_KEY - Config file: (macOS/Linux) or
~/.config/readx/credentials.json(Windows) →%APPDATA%\readx\credentials.json{"api_key":"..."} - If neither exists, direct the user to set the environment variable or config file (get a key at https://readx.cc). Do NOT ask the user to paste the key in chat.
按以下顺序查找,使用第一个找到的密钥:
- 环境变量:
READX_API_KEY - 配置文件:(macOS/Linux)或
~/.config/readx/credentials.json(Windows)→%APPDATA%\readx\credentials.json{"api_key":"..."} - 如果两者都不存在,引导用户设置环境变量或配置文件(在https://readx.cc获取密钥)。请勿要求用户在聊天中粘贴密钥。
API Call Pattern
API调用模式
GET https://readx.cc/consumer/{Endpoint}?api_key=${READX_API_KEY}¶m1=value1¶m2=value2All requests are GET with query parameters. Responses are JSON. Always reference the key via environment variable.
${READX_API_KEY}GET https://readx.cc/consumer/{Endpoint}?api_key=${READX_API_KEY}¶m1=value1¶m2=value2所有请求均为带查询参数的GET请求。响应格式为JSON。请始终通过环境变量引用密钥。
${READX_API_KEY}Endpoints
端点
Users
用户
| Endpoint | Params | Description |
|---|---|---|
| | Get user profile by username |
| | Get user profile by ID |
| | Convert username to user_id |
| | Get followers list |
| | Get following list |
| | Get following IDs only |
| | Get verified followers |
| | Check relationship |
| 端点 | 参数 | 描述 |
|---|---|---|
| | 通过用户名获取用户资料 |
| | 通过ID获取用户资料 |
| | 将用户名转换为user_id |
| | 获取关注者列表 |
| | 获取关注列表 |
| | 仅获取关注者ID |
| | 获取已认证关注者 |
| | 检查用户关系 |
Tweets
推文
| Endpoint | Params | Description |
|---|---|---|
| | Get user's tweets |
| | Get user's tweets and replies |
| | Get user's media posts |
| | Get tweet detail (minimal) |
| | Get tweet detail (preferred, includes views/source) |
| | Get tweet detail (includes view_count) |
| | Get tweet with conversation thread |
| | Get tweet with full reply thread (preferred) |
| | Batch get tweets |
| | Get users who liked a tweet |
| | Get users who retweeted |
| | Get quote tweets |
| | Get long-form article content |
| 端点 | 参数 | 描述 |
|---|---|---|
| | 获取用户推文 |
| | 获取用户推文及回复 |
| | 获取用户媒体帖子 |
| | 获取推文详情(精简版) |
| | 获取推文详情(推荐版,包含浏览量/来源) |
| | 获取推文详情(包含浏览量统计) |
| | 获取推文及对话线程 |
| | 获取推文及完整回复线程(推荐版) |
| | 批量获取推文 |
| | 获取点赞该推文的用户 |
| | 获取转发该推文的用户 |
| | 获取引用推文 |
| | 获取长文内容 |
Search
搜索
| Endpoint | Params | Description |
|---|---|---|
| | Search tweets |
| | Search autocomplete suggestions |
| 端点 | 参数 | 描述 |
|---|---|---|
| | 搜索推文 |
| | 获取搜索自动补全建议 |
Lists
列表
| Endpoint | Params | Description |
|---|---|---|
| | Get tweets from a list |
| | Get list subscribers |
| | Get list members |
| | Search for lists |
| 端点 | 参数 | 描述 |
|---|---|---|
| | 获取列表中的推文 |
| | 获取列表订阅者 |
| | 获取列表成员 |
| | 搜索列表 |
Communities
社区
| Endpoint | Params | Description |
|---|---|---|
| | Get community details |
| | Search communities |
| | Get community tweets |
| | Get community media |
| | Get community members |
| | Get community moderators |
| | Search community members |
| 端点 | 参数 | 描述 |
|---|---|---|
| | 获取社区详情 |
| | 搜索社区 |
| | 获取社区推文 |
| | 获取社区媒体内容 |
| | 获取社区成员 |
| | 获取社区版主 |
| | 搜索社区成员 |
Trends
趋势
| Endpoint | Params | Description |
|---|---|---|
| | Get trending topics |
Common WOEID: 1 (Worldwide), 23424977 (US), 23424975 (UK), 23424856 (Japan), 23424868 (South Korea), 23424781 (Germany), 23424819 (France), 23424748 (Australia), 23424829 (India), 23424900 (Mexico), 23424950 (Singapore), 23424948 (Saudi Arabia), 23424787 (Brazil).
| 端点 | 参数 | 描述 |
|---|---|---|
| | 获取热门话题 |
常用WOEID:1(全球), 23424977(美国), 23424975(英国), 23424856(日本), 23424868(韩国), 23424781(德国), 23424819(法国), 23424748(澳大利亚), 23424829(印度), 23424900(墨西哥), 23424950(新加坡), 23424948(沙特阿拉伯), 23424787(巴西)。
Account
账户
| Endpoint | Params | Description |
|---|---|---|
| (none) | Get remaining API credits (free, costs 0 credits) |
| 端点 | 参数 | 描述 |
|---|---|---|
| 无 | 获取剩余API积分(免费,消耗0积分) |
Response Parsing
响应解析
API responses use deeply nested Twitter JSON. Key extraction paths:
User profile — :
data.user_results.resultrest_id, core.name, core.screen_name, core.created_at,
profile_bio.description, location.location, avatar.image_url,
relationship_counts.followers, relationship_counts.following,
tweet_counts.tweets, verification.is_blue_verified, website.url, privacy.protectedTweet — For : ; For : ; For : . Note: some tweets are wrapped in — access first.
TweetDetaildata.tweet_resultTweetDetailv2data.tweetResultTweetDetailv3data.tweet_resultsTweetWithVisibilityResults.tweet.result.legacy → { full_text, favorite_count, retweet_count, reply_count, quote_count, bookmark_count, created_at }
.result.core.user_results.result → author info
.result.legacy.extended_entities.media → media attachmentsViews (v2): | Views (v3):
.result.views.count.result.view_count_info.countTimeline — (individual tweets), (conversation modules). Pinned tweets: .
instructions[].entries[].content.itemContent.tweet_resultsinstructions[].entries[].content.items[].item.itemContent.tweet_results__typename: "TimelinePinEntry"Pagination — where → = next_cursor.
instructions[].entries[].contentcursor_type = "Bottom".valueTrends — (location), → .
metadata.woeid.namemodules[].trend{ name, rank, target.query }Credit balance — .
{ credits: <number> }API响应采用深度嵌套的Twitter JSON格式。关键信息提取路径:
用户资料 — :
data.user_results.resultrest_id, core.name, core.screen_name, core.created_at,
profile_bio.description, location.location, avatar.image_url,
relationship_counts.followers, relationship_counts.following,
tweet_counts.tweets, verification.is_blue_verified, website.url, privacy.protected推文 — 对于:;对于:;对于:。注意:部分推文被包裹在中——需先访问。
TweetDetaildata.tweet_resultTweetDetailv2data.tweetResultTweetDetailv3data.tweet_resultsTweetWithVisibilityResults.tweet.result.legacy → { full_text, favorite_count, retweet_count, reply_count, quote_count, bookmark_count, created_at }
.result.core.user_results.result → 作者信息
.result.legacy.extended_entities.media → 媒体附件浏览量(v2): | 浏览量(v3):
.result.views.count.result.view_count_info.count时间线 — (单条推文), (对话模块)。置顶推文:。
instructions[].entries[].content.itemContent.tweet_resultsinstructions[].entries[].content.items[].item.itemContent.tweet_results__typename: "TimelinePinEntry"分页 — 中 → = next_cursor。
instructions[].entries[].contentcursor_type = "Bottom".value趋势 — (位置), → 。
metadata.woeid.namemodules[].trend{ name, rank, target.query }积分余额 — 。
{ credits: <number> }Error Handling
错误处理
| Error | Solution |
|---|---|
| Invalid API key — direct user to verify at https://readx.cc |
| Insufficient credits — check with |
| Connection refused | Switch to Direct API Mode; if persistent, readx.cc may be down |
| 错误 | 解决方案 |
|---|---|
| API密钥无效——引导用户前往https://readx.cc验证 |
| 积分不足——使用 |
| 连接被拒绝 | 切换到直接API模式;如果问题持续,可能readx.cc已宕机 |
Data Limitations
数据限制
| Limitation | Mitigation |
|---|---|
| Follower/following lists return ~20 by default | Use |
| Tweet timelines return ~20 per page | Use |
| No historical follower count data | Infer from account age + current count |
| Search results are limited in quantity | Use multiple queries with different operators |
| 限制 | 缓解方案 |
|---|---|
| 关注者/关注列表默认返回约20条 | 使用 |
| 推文时间线每页返回约20条 | 使用 |
| 无历史关注者数量数据 | 从账户时长+当前数量推断 |
| 搜索结果数量有限 | 使用不同运算符进行多次查询 |