Skip to Content

Reddit API

子版、貼文與用戶個人檔案。

  • 子版排序hot(預設)、newtoprising
  • 搜尋排序relevance(預設)、hottopnewcomments
  • 每次請求最多回傳 100 篇貼文
  • NSFW 子版可存取但會在回應中標記
  • 私人子版無法存取

子版

GET /reddit/subreddits/:name — 2 點數

取得子版資訊。

參數類型必填預設說明
namestring子版名稱
curl -H "x-api-key: sk_byc_xxx" \ https://api.bycrawl.com/reddit/subreddits/programming

回應

{ "name": "programming", "title": "programming", "description": "Computer Programming", "subscribers": 6847410, "activeUsers": null, "createdAt": "2006-02-28T18:19:29.000Z", "isNsfw": false, "icon": "https://...", "banner": "" }

GET /reddit/subreddits/:name/posts — 2 點數

取得子版的貼文。

參數類型必填預設說明
namestring子版名稱
sortstringhothotnewtoprising
tstringall時間篩選(sort=top 時使用):hourdayweekmonthyearall
countinteger25貼文數量(最多 100)
afterstring上次回應的分頁游標
curl -H "x-api-key: sk_byc_xxx" \ "https://api.bycrawl.com/reddit/subreddits/programming/posts?sort=top&count=10"

回應

{ "posts": [ { "id": "1qoxwdt", "title": "State of the Subreddit (January 2027): Mo...", "author": "ketralnis", "subreddit": "programming", "score": 113, "upvoteRatio": 0.94, "commentCount": 78, "createdAt": "2026-01-28T01:54:14.000Z", "url": "https://www.reddit.com/r/programming/comments/1qoxwdt/...", "permalink": "https://www.reddit.com/r/programming/comments/1qoxwdt/...", "selftext": "tl;dr: mods applications and minor rules ch...", "media": [] } // ... 更多貼文 ], "after": "t3_1rn5az3" }

貼文

GET /reddit/posts/:postId — 2 點數

依 ID 取得單一 Reddit 貼文。

參數類型必填預設說明
postIdstringReddit 貼文 ID
curl -H "x-api-key: sk_byc_xxx" \ https://api.bycrawl.com/reddit/posts/1qoxwdt

回應

{ "id": "1qoxwdt", "title": "State of the Subreddit (January 2027): Mo...", "author": "ketralnis", "subreddit": "programming", "score": 113, "upvoteRatio": 0.94, "commentCount": 78, "createdAt": "2026-01-28T01:54:14.000Z", "url": "https://www.reddit.com/r/programming/comments/1qoxwdt/...", "permalink": "https://www.reddit.com/r/programming/comments/1qoxwdt/...", "selftext": "tl;dr: mods applications and minor rules ch...", "media": [] }

GET /reddit/posts/search?q=xxx — 2 點數

搜尋 Reddit 貼文。

參數類型必填預設說明
qstring搜尋關鍵字
sortstringrelevancerelevancehottopnewcomments
tstringall時間篩選(sort=top 時使用):hourdayweekmonthyearall
countinteger25結果數量(最多 100)
afterstring上次回應的分頁游標
curl -H "x-api-key: sk_byc_xxx" \ "https://api.bycrawl.com/reddit/posts/search?q=bitcoin&count=5"

回應

{ "posts": [ { "id": "1rciij4", "title": "Bitcoin is a trap", "author": "tururururur134", "subreddit": "Buttcoin", "score": 123, "upvoteRatio": 0.89, "commentCount": 141, "createdAt": "2026-02-23T14:13:05.000Z", "url": "https://www.reddit.com/r/Buttcoin/comments/1rciij4/...", "permalink": "https://www.reddit.com/r/Buttcoin/comments/1rciij4/...", "selftext": "Bitcoin is a speculative and volatile trap...", "media": [] } // ... 更多貼文 ], "after": "t3_1r262za" }

用戶

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

取得 Reddit 用戶個人檔案。

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

回應

{ "name": "spez", "id": "1w72", "createdAt": "2005-06-06T04:00:00.000Z", "linkKarma": 181185, "commentKarma": 754451, "totalKarma": 935636, "icon": "https://...", "isGold": true, "isMod": true }

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

取得 Reddit 用戶發布的貼文。

參數類型必填預設說明
usernamestringReddit 用戶名稱
sortstringnewnewhottop
tstringall時間篩選(sort=top 時使用):hourdayweekmonthyearall
countinteger25貼文數量(最多 100)
afterstring上次回應的分頁游標
curl -H "x-api-key: sk_byc_xxx" \ "https://api.bycrawl.com/reddit/users/spez/posts?sort=top&count=10"

回應

{ "posts": [ { "id": "1qoxwdt", "title": "State of the Subreddit (January 2027): Mo...", "author": "spez", "subreddit": "reddit", "score": 113, "upvoteRatio": 0.94, "commentCount": 78, "createdAt": "2026-01-28T01:54:14.000Z", "url": "https://www.reddit.com/r/reddit/comments/1qoxwdt/...", "permalink": "https://www.reddit.com/r/reddit/comments/1qoxwdt/...", "selftext": "...", "media": [] } // ... more posts ], "after": "t3_1rn5az3" }