urlstring必填
Full Truth Social post URL, e.g. "https://truthsocial.com/@realDonaldTrump/posts/116824551176646175".
https://api.sandbase.ai/v1/api/truth-social/postGet a single Truth Social post by its URL - text, author, engagement (likes, comments, shares), and timestamp as clean JSON.
您的输出将显示在这里
完成输入,然后点击运行。
Returns one Truth Social post as JSON: its text, author details, like, comment and share counts, attached media, and a creation timestamp. The only input is the full post URL in url.
curl -X POST "https://api.sandbase.ai/v1/api/truth-social/post" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://truthsocial.com/@realDonaldTrump/posts/116824551176646175"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
url | string | Yes | Full Truth Social post URL, e.g. "https://truthsocial.com/@realDonaldTrump/posts/116824551176646175". |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"avatarUrl": "https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/accounts/avatars/10…",
"comments": 594,
"createdUtc": 1782601183,
"displayName": "Donald J. Trump",
"id": "116824551176646175",
"image": "https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/media_attachments/f…",
"likes": 15764,
"mediaUrls": [
"https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/media_attachments/f…"
],
"shares": 3961,
"text": "RT: https://truthsocial.com/users/realDonaldTrump/statuses/116824550355095950",
"username": "realDonaldTrump",
"verified": true
},
"found": true
}
| Field | Meaning |
|---|---|
found | true when the post was located. A lookup that finds nothing returns false. |
data.id | ID of the post. It matches the last part of the post URL. |
data.text | Text of the post. A repost can show only a RT: prefix followed by a link to the original status. |
data.username / data.displayName | Handle of the author and the name shown on the profile. |
data.verified | true if the author account is verified. |
data.likes / data.comments / data.shares | Engagement counts for the post. |
data.createdUtc | Time the post was created, as a Unix timestamp in seconds. |
data.mediaUrls[] | Links to the full-size media files attached to the post. |
data.image | Link to a smaller preview image of the attached media. |
data.avatarUrl | Link to the author's profile picture. |
https://truthsocial.com/@<username>/posts/<id>.outputs[0].data. Check found first, since a missing post returns found: false instead of an error.Billed at the actual cost of each call, about $0.0011 for the request above. Failed calls are not charged.
开始构建
具备统一身份验证和使用情况跟踪的平台 API 端点。
curl -X POST "https://api.sandbase.ai/v1/api/truth-social/post" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://truthsocial.com/@realDonaldTrump/posts/116824551176646175"
}'将您的 SandBase API 密钥设置到服务器环境中。请求使用 Bearer 身份验证。
export SANDBASE_API_KEY="YOUR_API_KEY"请将密钥保存在服务器端。不要在浏览器代码中暴露它。
urlstring必填Full Truth Social post URL, e.g. "https://truthsocial.com/@realDonaldTrump/posts/116824551176646175".
这是该 API 保存的示例响应;查看时不会发起实时请求。
尚未发布已保存的响应。请在 Playground 中运行 API 以查看其响应。
探索更多
| API | 价格 | 响应 |
|---|---|---|
Truth Social Post此 API Truth Social | 每次调用从 $0.0011 起 | JSON |
Truth Social | 每次调用从 $0.0011 起 | JSON |
Truth Social | 每次调用从 $0.0012 起 | JSON |
问题
向 https://api.sandbase.ai/v1/api/truth-social/post 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。
起价每次调用 $0.0011,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。
必填:url (string)。 Parameters 表和本页的 Playground 列出了每个字段。
在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。
不需要。Truth Social Post 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Truth Social API 访问权限。