Sand AISand AI MAGI-2MAGI-2 hiện đã có trên SandBase: video 1080p với âm thanh gốcDùng thử ngay

Truth Social Post

Tài liệu API
https://api.sandbase.ai/v1/api/truth-social/post

Get a single Truth Social post by its URL - text, author, engagement (likes, comments, shares), and timestamp as clean JSON.

Giá
Từ $0.0011USD / lượt gọi
Phương thức
POST
Phản hồi
JSON
Tham số
1 bắt buộc · 0 tùy chọn

Phòng thử nghiệm

Đầu vào
Full Truth Social post URL, e.g. "https://truthsocial.com/@realDonaldTrump/posts/116824551176646175".
Đầu raSẵn sàng

Đầu ra của bạn sẽ xuất hiện ở đây

Hoàn tất đầu vào, rồi nhấp Run.

README API

Truth Social Post API

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.

Use cases

  • Track how many likes, comments and shares a specific post has gathered.
  • Archive the text and media files of a post before it is edited or removed.
  • Check whether an account that posted is verified before citing the post.
  • Add post text and engagement numbers to a news or monitoring dashboard.

Request

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.

Parameters

NameTypeRequiredDescription
urlstringYesFull Truth Social post URL, e.g. "https://truthsocial.com/@realDonaldTrump/posts/116824551176646175".

Example response

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
}

Response fields

FieldMeaning
foundtrue when the post was located. A lookup that finds nothing returns false.
data.idID of the post. It matches the last part of the post URL.
data.textText of the post. A repost can show only a RT: prefix followed by a link to the original status.
data.username / data.displayNameHandle of the author and the name shown on the profile.
data.verifiedtrue if the author account is verified.
data.likes / data.comments / data.sharesEngagement counts for the post.
data.createdUtcTime the post was created, as a Unix timestamp in seconds.
data.mediaUrls[]Links to the full-size media files attached to the post.
data.imageLink to a smaller preview image of the attached media.
data.avatarUrlLink to the author's profile picture.

Notes

  • Copy the post URL from the Truth Social site. It has the form https://truthsocial.com/@<username>/posts/<id>.
  • Use the result from outputs[0].data. Check found first, since a missing post returns found: false instead of an error.
  • To see more from the same author, call Truth Social User Posts. For account details, call Truth Social Profile.

Pricing

Billed at the actual cost of each call, about $0.0011 for the request above. Failed calls are not charged.

Khám phá thêm

APIs liên quan

Tất cả APIs
APIGiáPhản hồi
Truth SocialTừ $0.0011 mỗi lần gọiJSON
Truth SocialTừ $0.0011 mỗi lần gọiJSON
Truth SocialTừ $0.0012 mỗi lần gọiJSON

Câu hỏi

FAQ

Làm thế nào để dùng API Truth Social Post?

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.

API Truth Social Post có giá bao nhiêu?

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ý.

API Truth Social Post chấp nhận những tham số nào?

Bắt buộc: url (string). Bảng Parameters và Playground trên trang này liệt kê mọi trường.

API Truth Social Post trả về gì?

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.

Tôi có cần tài khoản nhà phát triển hoặc API key của Truth Social không?

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.