handlestring必須
Truth Social handle without the @, e.g. "realDonaldTrump".
https://api.sandbase.ai/v1/api/truth-social/user-postsList a Truth Social account's recent posts by handle - text, engagement (likes, comments, shares), and timestamps as clean JSON.
出力はここに表示されます
入力を完了してから[実行]をクリックしてください。
Returns a Truth Social account's recent posts as JSON. Each post includes its text, like, comment and share counts, a Unix timestamp, and a link. You send the account handle without the @.
likes, comments and shares across posts to see which ones get the most reaction.curl -X POST "https://api.sandbase.ai/v1/api/truth-social/user-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"handle": "realDonaldTrump"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
handle | string | Yes | Truth Social handle without the @, e.g. "realDonaldTrump". |
cursor | string | No | Opaque pagination cursor from a previous response's nextCursor. Omit for the first page; a page holds 20 posts. |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"data": {
"nextCursor": "cur_UN9TOUrS7RQgenR7fVK2NQ",
"posts": [
{
"avatarUrl": "https://static-assets-1.truthsocial.com/tmtg:prime-ts-assets/accounts/avatars/10…",
"comments": 369,
"createdUtc": 1793686350,
"displayName": "Donald J. Trump",
"id": "117551028635722326",
"likes": 2088,
"shares": 707,
"text": "FAKE ALASKA CANDIDATE DANIAL J. SULLIVAN, JR., IS MISSING IN ACTION! HE HAS TOTA…",
"url": "https://truthsocial.com/@realDonaldTrump/117551028635722326",
"username": "realDonaldTrump",
"verified": true
}
]
},
"found": true
}
| Field | Meaning |
|---|---|
data.posts[].id | Unique ID of the post, as a string. |
data.posts[].text | Text of the post. In this sample it is cut with an ellipsis when long. A post that only shares a link shows that link as its text. |
data.posts[].url | Direct link to the post on truthsocial.com. |
data.posts[].createdUtc | Time the post was created, as a Unix timestamp in seconds. |
data.posts[].likes / data.posts[].comments / data.posts[].shares | Engagement counts for the post. |
data.posts[].username / data.posts[].displayName | Handle and display name of the account that wrote the post. |
data.posts[].verified | true if the account is shown as verified. |
data.posts[].avatarUrl | Link to the account's avatar image. |
data.nextCursor | Cursor to pass as cursor to get the next page of posts. |
found | true when the account was found. |
realDonaldTrump.handle with cursor set to the data.nextCursor value from the previous response.url.Billed at the actual cost of each call, about $0.0012 for the request above. Failed calls are not charged.
開発を始める
統一認証と使用状況の追跡を備えたプラットフォームAPIエンドポイントです。
curl -X POST "https://api.sandbase.ai/v1/api/truth-social/user-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"handle": "realDonaldTrump"
}'SandBaseのAPIキーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開しないでください。
handlestring必須Truth Social handle without the @, e.g. "realDonaldTrump".
cursorstringOpaque pagination cursor from a previous response's nextCursor. Omit for the first page; a page holds 20 posts.
このAPIの保存済みサンプルレスポンスです。表示時にライブリクエストは行われません。
保存済みレスポンスはまだ公開されていません。PlaygroundでAPIを実行し、レスポンスを確認してください。
さらに探索
| API | 価格 | レスポンス |
|---|---|---|
Truth Social User Postsこの API Truth Social | 1回あたり $0.0012 から | JSON |
Truth Social | 1回あたり $0.0011 から | JSON |
Truth Social | 1回あたり $0.0011 から | JSON |
質問
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/truth-social/user-posts に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
1回あたり $0.0012 から、SandBase 残高から課金されます。課金対象はご利用分のみで、サブスクリプションはありません。
必須: handle (string)。 任意: cursor (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
いいえ。Truth Social User Posts は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Truth Social の API アクセスを別途申請する必要はありません。