user_idstring必須
User ID, for example: 63625256886, can be obtained from user profile API
https://api.sandbase.ai/v1/api/threads/web/user-postsReturns a list of posts from a specified Threads account. Accepts a user identifier and an optional pagination cursor to retrieve subsequent pages of data.
[
{
"data": null
}
]例を選択すると、その入力と結果がプレイグラウンドに読み込まれます。
Returns a list of text posts from a Threads account. It needs the numeric user_id of the account and takes an optional end_cursor to fetch the next page.
curl -X POST "https://api.sandbase.ai/v1/api/threads/web/user-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"user_id": "63625256886"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
user_id | string | Yes | User ID, for example: 63625256886, can be obtained from user profile API |
end_cursor | string | No | Pagination cursor (optional), used to get next page data |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"mediaData": {
"edges": [
{
"__typename": "XDTUserTextPostsResponseEdge",
"cursor": "",
"node": {
"__typename": "XDTThread",
"id": "4022095224599806479",
"thread_header_context": null,
"thread_items": [
{
"__typename": "XDTThreadItem",
"line_type": "none",
"post": {
"accessibility_caption": "How NATO states on the Black Sea are being drawn into Ukraine war escalation",
"audio": null,
"caption": {
"has_translation": null,
"pk": "18121968424969344",
"text": "How NATO states on the Black Sea are being drawn into Ukraine war escalation reu…"
},
"caption_add_on": null,
"caption_is_edited": false,
"carousel_media": null,
"code": "DfRWkv7EQIP",
"gen_ai_detection_method": {
"detection_method": "NONE"
}
},
"should_show_ephemeral_post_timer": null
}
],
"thread_type": "thread"
}
}
],
"page_info": {
"end_cursor": null,
"has_next_page": false,
"has_previous_page": false,
"start_cursor": null
}
}
}
| Field | Meaning |
|---|---|
mediaData.edges[] | One entry per thread in the account's post list. |
mediaData.edges[].node.id | ID of the thread, returned as a string. |
mediaData.edges[].node.thread_type | Type of the thread. The sample value is thread. |
mediaData.edges[].node.thread_items[].post.caption.text | Text of the post. Long text may be cut, and links appear as short URLs. |
mediaData.edges[].node.thread_items[].post.caption.pk | Numeric ID of the caption, returned as a string. |
mediaData.edges[].node.thread_items[].post.code | Short code of the post. It is the code that identifies the post on Threads. |
mediaData.edges[].node.thread_items[].post.accessibility_caption | Alt-text style description of the post. It is null when none is set. |
mediaData.edges[].node.thread_items[].post.caption_is_edited | true if the caption was edited after posting. |
mediaData.page_info.has_next_page | true if more posts are available on another page. |
mediaData.page_info.end_cursor | Cursor for the next page. It is null when there is no further page. |
user_id from Threads User Profile. The example value is 63625256886.end_cursor from mediaData.page_info as the end_cursor parameter. In the sample response it is null and has_next_page is false.$0.002 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
開発を始める
統一認証と使用状況の追跡を備えたプラットフォームAPIエンドポイントです。
curl -X POST "https://api.sandbase.ai/v1/api/threads/web/user-posts" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"user_id": "example"
}'SandBaseのAPIキーをサーバー環境に設定してください。リクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開しないでください。
user_idstring必須User ID, for example: 63625256886, can be obtained from user profile API
end_cursorstringPagination cursor (optional), used to get next page data
このAPIの保存済みサンプルレスポンスです。表示時にライブリクエストは行われません。
[
{
"data": null
}
]さらに探索
| API | 価格 | レスポンス |
|---|---|---|
Threads User Postsこの API Threads | $0.002 / 回 | JSON |
Threads | $0.002 / 回 | JSON |
Threads | $0.002 / 回 | JSON |
Threads | $0.003 / 回 | JSON |
Threads | $0.002 / 回 | JSON |
Threads | $0.002 / 回 | JSON |
質問
Authorization ヘッダー(Bearer)に SandBase API key を指定し、パラメータを JSON ボディで送信して https://api.sandbase.ai/v1/api/threads/web/user-posts に POST リクエストを送ります。このページの Playground で、コードを書かずに試すこともできます。
1回あたり $0.002。各組織には UTC 日ごとに 100 回の無料呼び出しが付与され、この API を含む対象の SandBase API 全体で共有されます。それ以降は、各呼び出しが SandBase 残高からこの料金で課金されます。サブスクリプションはありません。
必須: user_id (string)。 任意: end_cursor (string)。 このページの Parameters テーブルと Playground に、すべてのフィールドが一覧表示されています。
同じ HTTP リクエスト内で返される JSON レスポンスです(同期)。 このページの README にサンプルレスポンスがあります。
いいえ。Threads User Posts は SandBase 経由で動作するため、SandBase の API key 1つでこのエンドポイントと、カタログ内の他のすべての API とモデルを利用できます。Threads の API アクセスを別途申請する必要はありません。