urlstringbắt buộc
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.
Đầu ra của bạn sẽ xuất hiện ở đây
Hoàn tất đầu vào, rồi nhấp Run.
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.
Bắt đầu xây dựng
Endpoint API của nền tảng với xác thực và theo dõi mức sử dụng thống nhất.
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"
}'Đặt SandBase API key của bạn trong môi trường máy chủ. Các request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key của bạn trên máy chủ. Không hiển thị trong mã chạy trên trình duyệt.
urlstringbắt buộcFull Truth Social post URL, e.g. "https://truthsocial.com/@realDonaldTrump/posts/116824551176646175".
Đây là phản hồi ví dụ đã lưu cho API này; không có request thực nào được gửi khi xem mục này.
Chưa có phản hồi đã lưu nào được công bố. Chạy API trong Playground để xem phản hồi.
Khám phá thêm
| API | Giá | Phản hồi |
|---|---|---|
Truth Social PostAPI này Truth Social | Từ $0.0011 mỗi lần gọi | JSON |
Truth Social | Từ $0.0011 mỗi lần gọi | JSON |
Truth Social | Từ $0.0012 mỗi lần gọi | JSON |
Câu hỏi
Gửi yêu cầu POST đến https://api.sandbase.ai/v1/api/truth-social/post với khóa API SandBase của bạn trong tiêu đề Authorization (Bearer) và các tham số trong phần thân JSON. Bạn cũng có thể thử trực tiếp trong Playground trên trang này mà không cần viết code.
Từ $0.0011 mỗi lần gọi, được tính từ số dư SandBase của bạn. Bạn chỉ bị tính phí cho các lần gọi bạn thực hiện; không có gói đăng ký.
Bắt buộc: url (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.
Phản hồi JSON được trả về trong cùng một yêu cầu HTTP (đồng bộ). README trên trang này có ví dụ phản hồi.
Không. Truth Social Post chạy thông qua SandBase, nên chỉ cần một API key SandBase là đủ cho endpoint này và mọi API cùng model khác trong danh mục. Bạn không cần đăng ký riêng để có quyền truy cập API của Truth Social.