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 |
問題
使用 POST 請求將您的 SandBase API 金鑰放在 Authorization 標頭(Bearer)中,並以 JSON 主體傳入參數,即可呼叫 https://api.sandbase.ai/v1/api/truth-social/post。您也可以直接在本頁的 Playground 試用,不必撰寫程式碼。
每次起 $0.0011,並從您的 SandBase 餘額中扣款。您只會為實際發出的呼叫付費;沒有訂閱方案。
必要:url (string)。 本頁的 Parameters 表格與 Playground 會列出每個欄位。
在同一個 HTTP 請求中回傳的 JSON 回應(同步)。 本頁的 README 包含範例回應。
不需要。Truth Social Post 是透過 SandBase 運作,因此一組 SandBase API 金鑰即可使用此端點以及目錄中的其他所有 API 和模型。您不需要另外申請 Truth Social API 存取權。