urlstring必填
Canonical x.com or twitter.com URL of the public wrapper post for an X Article.
https://api.sandbase.ai/v1/api/twitter/articleGet a public X long-form article from its wrapper post URL, including its author, engagement, cover image, and structured content blocks.
您的输出将显示在这里
完成输入,然后点击运行。
Returns a public X long-form article, including its title, author profile, engagement counts, cover image and content blocks. It needs one input: the url of the public wrapper post that carries the article.
views, likes, replies and quotes on an article over repeated lookups.contentBlocks of an article into your own page or summary format.curl -X POST "https://api.sandbase.ai/v1/api/twitter/article" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://x.com/Decentralisedco/status/1905545699552375179"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Canonical x.com or twitter.com URL of the public wrapper post for an X Article. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"author": {
"avatarUrl": "https://pbs.twimg.com/profile_images/1766132688316973056/LB-8W7_d_normal.jpg",
"bio": "Crypto Research and Investing",
"blueVerified": true,
"coverUrl": "https://pbs.twimg.com/profile_banners/1764631141926002689/1773416426",
"createdUtc": 1709555838,
"followers": 14176,
"following": 465,
"handle": "Decentralisedco",
"id": "1764631141926002689",
"location": "Writing →",
"mediaCount": 520,
"name": "DCo"
},
"contentBlocks": [
{
"entities": [],
"inlineStyles": [
{
"length": 65,
"offset": 0,
"style": "Italic"
}
],
"text": "Breaking down how crypto protocols approach revenue and cash flow",
"type": "unstyled"
}
],
"coverImage": "https://pbs.twimg.com/media/GnHXrznXUAEs-v5.jpg",
"createdUtc": 1743152472,
"id": "QXJ0aWNsZUVudGl0eToxOTA1NTQxMTM5MTQ0Mjk4NDk4",
"likes": 156,
"previewText": "Breaking down how crypto protocols approach revenue and cash flow\nThis is a summ…",
"quotes": 8,
"replies": 16,
"title": "When Tokens Burn",
"views": 44386
},
"found": true
}
| Field | Meaning |
|---|---|
data.title | Title of the article. |
data.previewText | Short plain-text preview of the start of the article. The text is cut off with an ellipsis. |
data.contentBlocks[].text | Text of one block of the article body. Blocks appear in reading order. |
data.contentBlocks[].type | Block type, for example unstyled for a plain paragraph. |
data.contentBlocks[].inlineStyles[] | Style ranges inside the block text. Each row has a style such as Italic, an offset and a length. |
data.contentBlocks[].entities[] | Entity ranges inside the block text, with a key, an offset and a length. They mark spans of text such as links. |
data.views / data.likes / data.replies / data.quotes | Engagement counts for the article. |
data.createdUtc | Creation time of the article as a Unix timestamp in seconds. |
data.coverImage | URL of the article cover image. |
data.author.handle / data.author.name / data.author.followers | Handle, display name and follower count of the author. Other author fields include bio, blueVerified, location and posts. |
createdUtc format (Unix seconds) is used for both the article and data.author.found: false.Billed at the actual cost of each call, about $0.00054 for the request above. Failed calls are not charged.
开始构建
具备统一身份验证和使用情况跟踪的平台 API 端点。
curl -X POST "https://api.sandbase.ai/v1/api/twitter/article" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://x.com/Decentralisedco/status/1905545699552375179"
}'将您的 SandBase API 密钥设置到服务器环境中。请求使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_KEY"请将密钥保存在服务器端。不要在浏览器代码中暴露它。
urlstring必填Canonical x.com or twitter.com URL of the public wrapper post for an X Article.
这是该 API 保存的示例响应;查看时不会发起实时请求。
尚未发布已保存的响应。请在 Playground 中运行 API 以查看其响应。
探索更多
| API | 价格 | 响应 |
|---|---|---|
X / Twitter Article此 API X (Twitter) | 每次调用从 $0.00054 起 | JSON |
Twitter | 每次调用从 $0.0006 起 | 异步 JSON |
X (Twitter) | 每次调用从 $0.0001 起 | JSON |
X (Twitter) | 每次调用从 $0.0036 起 | JSON |
X (Twitter) | 每次调用从 $0.00045 起 | JSON |
X (Twitter) | 每次调用从 $0.00045 起 | JSON |
指南:X API alternative: pay per call, not per postBest Twitter API in 2026: X API Pricing Compared
问题
向 https://api.sandbase.ai/v1/api/twitter/article 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。
起价每次调用 $0.00054,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。
必填:url (string)。 Parameters 表和本页的 Playground 列出了每个字段。
在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。
不需要。X / Twitter Article 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 X (Twitter) API 访问权限。