handlestringbắt buộc
Truth Social handle without the @, e.g. "realDonaldTrump".
https://api.sandbase.ai/v1/api/truth-social/profileGet a Truth Social account's public profile by handle - display name, bio, follower/following counts, and post count 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.
This API returns the public profile of a Truth Social account. It needs one input, the account handle without the @. The response includes the display name, bio, follower and following counts, post count, and join date.
verified before you treat it as the real person or organization.id to use in other tools that need a stable account reference.curl -X POST "https://api.sandbase.ai/v1/api/truth-social/profile" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"handle": "DevinNunes"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | Yes | Truth Social handle without the @, e.g. "realDonaldTrump". |
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…",
"bio": "Wine Maker RT≠endorsement",
"displayName": "Devin Nunes",
"followers": 4461040,
"following": 712,
"id": "107777378958166346",
"joinedAt": "2022-02-11T04:04:53.373Z",
"postsCount": 21542,
"private": false,
"url": "https://truthsocial.com/@DevinNunes",
"username": "DevinNunes",
"verified": true
},
"found": true
}
| Field | Meaning |
|---|---|
data.displayName | The name shown on the profile. |
data.username | The account handle, without the @. |
data.bio | The profile bio text. |
data.followers / data.following | The number of accounts that follow this account, and the number of accounts it follows. |
data.postsCount | The total number of posts on the account. |
data.verified | true if the account is marked as verified. |
data.private | true if the account is private. It is false for an open account. |
data.joinedAt | The time the account was created, as an ISO 8601 timestamp in UTC. |
data.id | The numeric account ID, returned as a string. |
data.avatarUrl / data.url | The link to the avatar image, and the link to the profile page on Truth Social. |
found | true when the handle matched an account. |
DevinNunes from truthsocial.com/@DevinNunes. Leave out the @.found first. A handle that matches no account still returns a successful response with found: false.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/profile" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"handle": "DevinNunes"
}'Đặ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.
handlestringbắt buộcTruth Social handle without the @, e.g. "realDonaldTrump".
Đâ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 ProfileAPI 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/profile 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: handle (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 Profile 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.