fetch-tweet
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFetch Tweet
获取推文
You fetch tweet content using the fxtwitter API, which returns structured JSON without requiring JavaScript rendering or authentication.
你可以使用fxtwitter API获取推文内容,该API会返回结构化JSON数据,无需JavaScript渲染或身份验证。
Why fxtwitter
为何选择fxtwitter
X/Twitter requires JavaScript to render tweets. on returns an empty shell. The fxtwitter API () serves the same tweet data as plain JSON — no auth, no JS, no rate-limit friction for reasonable use.
WebFetchx.comapi.fxtwitter.comX/Twitter需要借助JavaScript来渲染推文。在x.com上使用只会返回空的页面框架。而fxtwitter API()会以纯JSON格式提供相同的推文数据——无需身份验证、无需JavaScript,合理使用情况下也不会有速率限制问题。
WebFetchapi.fxtwitter.comURL Conversion
URL转换
Given any tweet URL, convert it to the fxtwitter API endpoint:
| Input URL pattern | API URL |
|---|---|
| |
| |
| |
| |
Extract the and from the input URL, then construct .
<user><id>https://api.fxtwitter.com/<user>/status/<id>对于任意推文URL,可将其转换为fxtwitter API端点:
| 输入URL格式 | API地址 |
|---|---|
| |
| |
| |
| |
从输入URL中提取和,然后构造。
<user><id>https://api.fxtwitter.com/<user>/status/<id>How to Fetch
如何获取数据
Use with the converted API URL:
WebFetchWebFetch(url: "https://api.fxtwitter.com/<user>/status/<id>", prompt: "Extract the tweet JSON. Return: author name, handle, tweet text, date, media URLs (if any), likes, retweets, replies, views.")使用调用转换后的API地址:
WebFetchWebFetch(url: "https://api.fxtwitter.com/<user>/status/<id>", prompt: "Extract the tweet JSON. Return: author name, handle, tweet text, date, media URLs (if any), likes, retweets, replies, views.")Response Structure
响应结构
The fxtwitter API returns JSON with this structure:
json
{
"code": 200,
"message": "OK",
"tweet": {
"url": "https://x.com/user/status/123",
"text": "The tweet content...",
"author": {
"name": "Display Name",
"screen_name": "handle"
},
"created_at": "Thu Jan 30 12:00:00 +0000 2026",
"likes": 1000,
"retweets": 500,
"replies": 200,
"views": 50000,
"media": {
"photos": [...],
"videos": [...]
}
}
}fxtwitter API返回的JSON结构如下:
json
{
"code": 200,
"message": "OK",
"tweet": {
"url": "https://x.com/user/status/123",
"text": "The tweet content...",
"author": {
"name": "Display Name",
"screen_name": "handle"
},
"created_at": "Thu Jan 30 12:00:00 +0000 2026",
"likes": 1000,
"retweets": 500,
"replies": 200,
"views": 50000,
"media": {
"photos": [...],
"videos": [...]
}
}
}Usage Pattern
使用流程
When you receive a tweet URL (x.com, twitter.com, fxtwitter.com, or vxtwitter.com):
- Parse the URL to extract username and tweet ID
- Convert to
https://api.fxtwitter.com/<user>/status/<id> - Fetch using with the API URL
WebFetch - Present the tweet content in a readable format:
**Author Name** (@handle) — Date
"Tweet text here"
Engagement: X views, Y likes, Z retweets, W repliesIf the tweet contains media (photos/videos), include the URLs.
当你收到推文URL(x.com、twitter.com、fxtwitter.com或vxtwitter.com)时:
- 解析URL以提取用户名和推文ID
- 转换为格式
https://api.fxtwitter.com/<user>/status/<id> - 获取:使用调用转换后的API地址
WebFetch - 展示:以易读格式呈现推文内容:
**作者名称** (@用户名) — 发布日期
"推文文本内容"
互动数据:X次浏览,Y个点赞,Z次转发,W条回复如果推文包含媒体内容(图片/视频),请附上对应的链接。
Error Handling
错误处理
- If fxtwitter returns a non-200 status, the tweet may have been deleted or the account suspended
- If the URL doesn't match any known tweet URL pattern, ask the user for a valid tweet link
- 如果fxtwitter返回非200状态码,说明推文可能已被删除或账号已被封禁
- 如果URL不符合任何已知的推文URL格式,请要求用户提供有效的推文链接