Skip to Content
API 參考Threads

Threads

Meta 的文字社群平台。

無法取得的互動數、粉絲數與回覆總數為 null,不是 0。 貼文回應包含可為 null 的 canonicalId(公開 shortcode),用於跨擷取路徑的穩定識別。 原有數字 ID 仍可用於查詢。

  • 貼文 ID:使用 shortcode(例如 DQt-ox3kdE4)或數字 ID
  • 用戶查詢:所有用戶端點(個人檔案、貼文、回覆)使用用戶名稱
  • 搜尋範圍top 依相關性排序;recent 經受管供應商邊界提供真正時間排序;不支援 cursor 分頁
  • 結果數量:請求數量為上限,不保證命中筆數。

貼文

GET /threads/posts/:id — 2 點數

依 shortcode 或 ID 取得單一貼文。來源未提供的欄位(包括瀏覽次數)可能為 null。

參數類型必填預設說明
idstringThreads 貼文短代碼或數字 ID
curl -H "x-api-key: sk_byc_xxx" \ https://api.bycrawl.com/threads/posts/DQt-ox3kdE4

回應

{ "id": "3759936745132642616", "mediaId": "18062699315155466", "code": "DQt-ox3kdE4", "canonicalId": "DQt-ox3kdE4", "dedupKey": "threads:post:DQt-ox3kdE4", "text": "Priscilla and I started CZI almost 10 years ago...", "user": { "id": "314216", "username": "zuck", "profilePic": "https://...", "isVerified": true }, "media": [], "views": null, "stats": { "likes": 818, "replies": 927, "quotes": 16, "reposts": 112, "shares": 119 }, "createdAt": "2025-11-06T14:30:09.000Z", "replyTo": null, "threadChain": [], "isReply": false }

GET /threads/posts?ids=a,b,c — 每筆 2 點數

批次取得多篇貼文。若任一貼文經所有已設定的供應商 fallback 後仍無法取得, 整個請求會明確失敗;成功陣列不會混入隱藏的單筆錯誤占位資料。

參數類型必填預設說明
idsstring以逗號分隔的貼文 ID 或 短代碼
curl -H "x-api-key: sk_byc_xxx" \ "https://api.bycrawl.com/threads/posts?ids=DQt-ox3kdE4,DQEmdfkkSNE"

回應

[ { "id": "3759936745132642616", "mediaId": "18062699315155466", "code": "DQt-ox3kdE4", "canonicalId": "DQt-ox3kdE4", "dedupKey": "threads:post:DQt-ox3kdE4", "text": "Priscilla and I started CZI almost 10 years ago...", "user": { "id": "314216", "username": "zuck", "profilePic": "https://...", "isVerified": true }, "media": [], "views": 166996, "stats": { "likes": 818, "replies": 927, "quotes": 16, "reposts": 112, "shares": 119 }, "createdAt": "2025-11-06T14:30:09.000Z", "replyTo": null, "threadChain": [], "isReply": false } ]

GET /threads/posts/:id/replies — 3 點數

取得 Threads 貼文的留言。totalReplies 未知時為 null;數值為觀測到的總數,不保證已擷取全部留言。hasMore 標示截斷。目前不支援翻頁取得更多留言。

參數類型必填預設說明
maxbooleanfalse使用已登入模式以取得更完整資料
curl -H "x-api-key: sk_byc_xxx" \ "https://api.bycrawl.com/threads/posts/DW4Gb79kQc0/replies"

回應

{ "rootPost": { "id": "3870872187813562164", "code": "DW4Gb79kQc0", "text": "原始貼文內容...", "user": { "id": "314216", "username": "zuck", "profilePic": "https://...", "isVerified": true }, "stats": { "likes": 2613, "replies": 476, "quotes": 55, "reposts": 189, "shares": 336 }, "createdAt": "2026-04-09T14:00:00.000Z" }, "replies": [ { "id": "3870872993254359647", "code": "DW4Hqm0AMge", "text": "這是對原貼文的留言", "user": { "id": "63125302142", "username": "justincookphoto", "profilePic": "https://...", "isVerified": false }, "media": [], "stats": { "likes": 92, "replies": 5, "quotes": 0, "reposts": 0, "shares": 0 }, "createdAt": "2026-04-09T15:00:00.000Z", "replyTo": null, "threadChain": [], "isReply": true } // ...更多項目 ], "totalReplies": 476, "hasMore": true }

GET /threads/posts/search?q=xxxtoprecent 每次均為 3 點

依關鍵字搜尋貼文。top 使用公開相關性搜尋頁;recent 使用真正支援時間排序的 provider,不會再把相關性樣本重新排序後冒充最新搜尋。

參數類型必填預設說明
qstring搜尋關鍵字
countinteger10最多回傳貼文數(top 最多 25,recent 最多 200)
search_typestringtoptop(相關性)或 recent(時間排序)
sincestringrecent 的 ISO 日期時間下界
untilstringrecent 的 ISO 日期時間上界

toprecent 使用有時間限制與失敗復原的託管擷取。 recent 不會降級為只有相關性排序的結果。擷取失敗且沒有可用資料時, 請求會明確失敗;正常的少量或空結果不是錯誤。

請檢查 search.partialreasonrequestedCountreturnedCount。 擷取不完整時保留已取得資料,標示 partial: truereason: "incomplete_results"; 否則 reason 為 null。partial: false 不保證找齊所有結果。日期在本地過濾, 關鍵字不是完整字串精確匹配。擷取診斷只保留在內部,不再回傳 sourcesourcesfallbackAttempted。 請用 canonicalId(公開 shortcode)作為持久識別碼及貼文/回覆/批次查詢參數, 或用 dedupKeythreads:post: 加 shortcode)跨來源去重。 原有 id 保持相容,但不同擷取路徑可能回傳不同值。 缺少 shortcode 與有效 Threads permalink 時,canonicalId 和 dedupKey 為 null; 保留原 id,但不可假設跨來源相等。

相同搜尋共用最長 60 秒快取;復原結果可能使用較短快取。toprecent 的快取分開。 同時發出的相同搜尋會跨 worker 共用處理結果;協調服務故障時回傳暫時無法使用, 不會重複呼叫上游,請間隔後重試。每個成功 API 請求(包含快取命中)仍照常計費。

無法取得的互動數回傳 null,不會假裝成 0;數值代表實際觀測值。 此 endpoint 不接受分頁,因此不回傳無法使用的 cursor。

toprecent 每次成功請求均為 3 點,不受 count 或實際回傳筆數影響。 失敗請求會由 Gateway 退款。

curl -H "x-api-key: sk_byc_xxx" \ "https://api.bycrawl.com/threads/posts/search?q=threads&search_type=recent"

回應

{ "posts": [ { "id": "3847614751430661572", "mediaId": "17913742854319868", "code": "DVleTsbk9XE", "text": "Artists! Show me your most recent artwork!...", "user": { "id": "63436967516", "username": "koshino.yoshihiro", "profilePic": "https://...", "isVerified": true }, "media": [], "stats": { "likes": 41, "replies": 118, "quotes": 0, "reposts": 0, "shares": 0 }, "createdAt": "2026-03-07T13:50:42.000Z" } // ...more items ] }

用戶

GET /threads/users/:username — 2 點數

取得用戶個人檔案。

參數類型必填預設說明
usernamestringThreads 用戶名稱
curl -H "x-api-key: sk_byc_xxx" \ https://api.bycrawl.com/threads/users/zuck

回應

{ "id": "314216", "username": "zuck", "fullName": "Mark Zuckerberg", "profilePic": "https://...", "bio": "I build stuff", "isVerified": true, "followerCount": 5439848, "followingCount": 0 }

GET /threads/users/:username/posts — 2 點數

取得用戶貼文的第一批公開 SSR 結果。目前不支援自訂筆數與分頁。

這不是完整貼文歷史;重複請求會再次取得第一批,而不是下一頁。 不回傳可用的 cursor 或代表已抓完的旗標,少量/空結果不代表沒有更舊的貼文。 傳入 cursorcountpageafterbeforelimitoffset 會回傳 HTTP 400。

參數類型必填預設說明
usernamestringThreads 用戶名稱
curl -H "x-api-key: sk_byc_xxx" \ https://api.bycrawl.com/threads/users/zuck/posts

回應

{ "posts": [ { "id": "3759936745132642616", "code": "DQt-ox3kdE4", "text": "Priscilla and I started CZI almost 10 years ago...", "user": { "id": "314216", "username": "zuck", "profilePic": "https://...", "isVerified": true }, "stats": { "likes": 818, "replies": 927, "quotes": 16, "reposts": 112, "shares": 119 }, "hasMedia": false, "createdAt": "2025-11-06T14:30:09.000Z" } // ...more items ] }

GET /threads/users/:username/replies — 2 點數

取得用戶回覆的第一批公開 SSR 結果。目前不支援自訂筆數與分頁。

參數類型必填預設說明
usernamestringThreads 用戶名稱

回應

{ "replies": [ { "type": "others", "replyId": "3848726738042452746", "replyCode": "DVpbJOqkXsK", "replyText": "Congrats! This is wild...", "replyTimestamp": "2026-03-09T02:40:01.000Z", "stats": { "likes": 60, "replies": 12, "quotes": 0, "reposts": 0, "shares": 5 }, "replier": { "id": "314216", "username": "zuck", "profilePic": "https://...", "isVerified": true }, "replyTo": { "postId": "3848622568860907884", "postCode": "DVpDdXjgXls", "postText": "Original post text...", "postUrl": "https://www.threads.com/@otheruser/post/DVpDdXjgXls", "author": { "id": "63215166896", "username": "otheruser", "profilePic": "https://...", "isVerified": true } } } // ...more items ] }

GET /threads/users/search?q=xxx — 2 點數

依用戶名稱或姓名搜尋用戶。

參數類型必填預設說明
qstring搜尋關鍵字

回應

{ "users": [ { "id": "314216", "username": "zuck", "fullName": "Mark Zuckerberg", "profilePic": "https://...", "isVerified": null }, { "id": "43015418666", "username": "zuckubus", "fullName": "Memes | Comedy | Entertainment", "profilePic": "https://...", "isVerified": null } // ...more items ] }

動態

GET /threads/feed/public — 2 點數

取得公開的「為你推薦」動態。

參數類型必填預設說明
countinteger10回傳項目數量

回應

{ "posts": [ { "id": "3847150142294366101", "code": "DVj0qvdDJeV", "text": "Why they ain't got on no white gloves touching...", "user": { "id": "63446067958", "username": "candicebenbow", "profilePic": "https://...", "isVerified": true }, "stats": { "likes": 42, "replies": 3, "reposts": 2, "quotes": 0, "shares": 0 }, "createdAt": "2026-03-06T22:27:36.000Z", "media": [] } // ...more items ] }
Last updated on