Skip to Content

PTT

台灣最大的 BBS(電子佈告欄系統)— 看板、文章與搜尋。

  • 看板:依看板名稱瀏覽(例如 GossipingStockNBA
  • 文章:完整文章內容含推文
  • 搜尋:在看板內搜尋文章

看板

GET /ptt/boards/:boardName — 1 點數

依名稱取得 PTT 看板資訊。

參數類型必填預設說明
boardNamestring看板名稱(例如 GossipingStock
curl -H "x-api-key: sk_byc_xxx" \ https://api.bycrawl.com/ptt/boards/Gossiping

回應

{ "name": "Gossiping", "title": "批踢踢實業坊", "url": "https://www.ptt.cc/bbs/Gossiping/index.html" }

GET /ptt/boards/:boardName/posts — 2 點數

取得 PTT 看板文章列表。

參數類型必填預設說明
boardNamestring看板名稱
pageinteger頁碼(PTT 索引頁碼),不填則取最新頁
countinteger20文章數量(最多 40)
curl -H "x-api-key: sk_byc_xxx" \ "https://api.bycrawl.com/ptt/boards/Gossiping/posts?count=10"

回應

{ "board": "Gossiping", "posts": [ { "title": "[問卦] 有沒有PTT的八卦", "author": "example_user", "date": "3/16", "url": "https://www.ptt.cc/bbs/Gossiping/M.1773638913.A.077.html", "pushCount": "10" } ], "prevPage": "https://www.ptt.cc/bbs/Gossiping/index38943.html", "nextPage": null }

文章

GET /ptt/posts — 2 點數

依 URL 取得 PTT 文章完整內容與推文。

參數類型必填預設說明
urlstringPTT 文章完整 URL 或路徑(例如 /bbs/Gossiping/M.1773638913.A.077.html
curl -H "x-api-key: sk_byc_xxx" \ "https://api.bycrawl.com/ptt/posts?url=/bbs/Gossiping/M.1773638913.A.077.html"

回應

{ "id": "M.1773638913.A.077", "title": "[問卦] 有沒有PTT的八卦", "author": "example_user (暱稱)", "board": "Gossiping", "datetime": "Mon Mar 16 13:28:31 2026", "content": "文章內容...", "url": "https://www.ptt.cc/bbs/Gossiping/M.1773638913.A.077.html", "pushes": [ { "type": "push", "author": "user1", "content": "推文內容", "datetime": "03/16 13:30" } ], "pushSummary": { "push": 10, "boo": 2, "arrow": 5, "total": 17 } }

搜尋

GET /ptt/boards/:boardName/search — 2 點數

在 PTT 看板內搜尋文章。

參數類型必填預設說明
boardNamestring看板名稱
qstring搜尋關鍵字
countinteger20結果數量(最多 40)
curl -H "x-api-key: sk_byc_xxx" \ "https://api.bycrawl.com/ptt/boards/Gossiping/search?q=台積電&count=10"

回應

{ "board": "Gossiping", "posts": [ { "title": "[新聞] 台積電法說會重點整理", "author": "stock_user", "date": "3/15", "url": "https://www.ptt.cc/bbs/Gossiping/M.1773552000.A.123.html", "pushCount": "55" } ], "prevPage": null, "nextPage": null }