reddit-api
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReddit API
Reddit API
Reddit data on demand: cross-subreddit post search, subreddit and user search,
subreddit info and feeds, single posts with full comment trees, sitewide
best/hot/new/top feeds, and user profiles/posts/comments — one plain HTTP GET
per call, paid as you go. No OAuth app registration, no client ID/secret pair,
no Reddit API rate-limit tier.
Base URL:
https://reddit.fetcher.sh按需获取Reddit数据:跨subreddit帖子搜索、subreddit与用户搜索、subreddit信息及帖子流、带完整评论树的单条帖子、全站最佳/热门/最新/置顶帖子流,以及用户资料/帖子/评论——每次调用仅需一个简单的HTTP GET请求,按需付费。无需注册OAuth应用,无需客户端ID/密钥对,不受Reddit API速率限制层级约束。
基础URL:
https://reddit.fetcher.shAuthentication
认证
Two ways to pay, same data — full mechanics in the
skill:
fetcherbash
undefined两种付费方式,获取相同数据——完整机制请查看技能:
fetcherbash
undefined1. Prepaid credits (recommended — get a key at https://fetcher.sh/topup
1. 预付费额度(推荐——可在https://fetcher.sh/topup获取密钥
or via POST /api/credits/topup, see the fetcher skill)
或通过POST /api/credits/topup,详情见fetcher技能)
export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx"
curl -H "Authorization: Bearer $FETCHER_API_KEY"
"https://reddit.fetcher.sh/api/search/post?keyword=hello"
"https://reddit.fetcher.sh/api/search/post?keyword=hello"
export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx"
curl -H "Authorization: Bearer $FETCHER_API_KEY"
"https://reddit.fetcher.sh/api/search/post?keyword=hello"
"https://reddit.fetcher.sh/api/search/post?keyword=hello"
2. x402 pay-per-call — omit the header; a GET with no payment returns 402
2. x402按调用付费——省略请求头;未付费的GET请求会返回402状态码
with machine-readable payment requirements (USDC on Base, Polygon,
并附带机器可读的付费要求(支持在Base、Polygon、
Arbitrum, Monad, or Solana). @x402/fetch signs and retries automatically.
Arbitrum、Monad或Solana链上使用USDC支付)。@x402/fetch会自动签名并重试请求。
Every response is `{ "status": number, "message": string, "data": ... }`; the
HTTP status mirrors `status`.
每个响应格式均为`{ "status": number, "message": string, "data": ... }`;HTTP状态码与`status`字段一致。Endpoints (15 — all GET, $0.002/call)
接口(共15个——均为GET请求,每次调用$0.002)
| Endpoint | What it returns |
|---|---|
| Posts across every subreddit matching a keyword |
| Subreddits matching a keyword |
| Users matching a keyword |
| A subreddit's info |
| A subreddit's post feed |
| A single post |
| A post's comment tree |
| Replies to a comment |
| Sitewide hot feed |
| Sitewide new feed |
| Sitewide top feed |
| Sitewide best feed |
| A user's profile |
| A user's posts |
| A user's comments |
{id}{name}{username}sortcursorkeyword| 接口 | 返回内容 |
|---|---|
| 所有subreddit中匹配关键词的帖子 |
| 匹配关键词的subreddit |
| 匹配关键词的用户 |
| 某个subreddit的信息 |
| 某个subreddit的帖子流 |
| 单条帖子 |
| 某条帖子的评论树 |
| 某条评论的回复 |
| 全站热门帖子流 |
| 全站最新帖子流 |
| 全站置顶帖子流 |
| 全站最佳帖子流 |
| 用户资料 |
| 用户发布的帖子 |
| 用户发布的评论 |
{id}{name}{username}sortcursorkeywordScenarios
使用场景
Top posts about a topic, across every subreddit:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=ai agents" -G \
--data-urlencode "sort=top" \
"https://reddit.fetcher.sh/api/search/post"Most discussed (highest comment count):
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=stablecoin payments" -G \
--data-urlencode "sort=comments" \
"https://reddit.fetcher.sh/api/search/post"Newest first:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=x402" -G \
--data-urlencode "sort=new" \
"https://reddit.fetcher.sh/api/search/post"Other values for : , .
sort/api/search/postrelevancehotSearch subreddits or users by keyword:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=machine learning" -G \
"https://reddit.fetcher.sh/api/search/subreddit"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=spez" -G \
"https://reddit.fetcher.sh/api/search/user"A subreddit's info, then its hot/new/top feed:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://reddit.fetcher.sh/api/subreddit/MachineLearning"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "sort=top" -G \
"https://reddit.fetcher.sh/api/subreddit/MachineLearning/posts"A single post, its comment tree, and replies to one comment:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://reddit.fetcher.sh/api/post/1abcde2"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "sort=top" -G \
"https://reddit.fetcher.sh/api/post/1abcde2/comments"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://reddit.fetcher.sh/api/post/1abcde2/comments/fghij3k/replies"Sitewide feeds:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://reddit.fetcher.sh/api/posts/hot"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://reddit.fetcher.sh/api/posts/best"A user's profile, posts, and comments:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://reddit.fetcher.sh/api/user/spez"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "sort=new" -G \
"https://reddit.fetcher.sh/api/user/spez/posts"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "sort=top" -G \
"https://reddit.fetcher.sh/api/user/spez/comments"跨所有subreddit获取某主题的置顶帖子:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=ai agents" -G \
--data-urlencode "sort=top" \
"https://reddit.fetcher.sh/api/search/post"获取讨论量最高(评论数最多)的帖子:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=stablecoin payments" -G \
--data-urlencode "sort=comments" \
"https://reddit.fetcher.sh/api/search/post"按最新排序:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=x402" -G \
--data-urlencode "sort=new" \
"https://reddit.fetcher.sh/api/search/post"/api/search/postsortrelevancehot按关键词搜索subreddit或用户:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=machine learning" -G \
"https://reddit.fetcher.sh/api/search/subreddit"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "keyword=spez" -G \
"https://reddit.fetcher.sh/api/search/user"获取某subreddit的信息,以及其热门/最新/置顶帖子流:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://reddit.fetcher.sh/api/subreddit/MachineLearning"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "sort=top" -G \
"https://reddit.fetcher.sh/api/subreddit/MachineLearning/posts"获取单条帖子、其评论树,以及某条评论的回复:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://reddit.fetcher.sh/api/post/1abcde2"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "sort=top" -G \
"https://reddit.fetcher.sh/api/post/1abcde2/comments"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://reddit.fetcher.sh/api/post/1abcde2/comments/fghij3k/replies"全站帖子流:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://reddit.fetcher.sh/api/posts/hot"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://reddit.fetcher.sh/api/posts/best"获取用户资料、帖子及评论:
bash
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
"https://reddit.fetcher.sh/api/user/spez"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "sort=new" -G \
"https://reddit.fetcher.sh/api/user/spez/posts"
curl -H "Authorization: Bearer $FETCHER_API_KEY" \
--data-urlencode "sort=top" -G \
"https://reddit.fetcher.sh/api/user/spez/comments"MCP
MCP
json
{
"mcpServers": {
"reddit": {
"url": "https://reddit.fetcher.sh/mcp",
"headers": { "Authorization": "Bearer bby_live_..." }
}
}
}Free: , , . Paid:
(any endpoint above), , plus the named shortcut
. Drop the block to pay per call with x402
instead — see the skill for the full flow.
search_endpointsdescribe_endpointcheck_balancefetch_datatopup_creditsreddit_search_postheadersfetcherjson
{
"mcpServers": {
"reddit": {
"url": "https://reddit.fetcher.sh/mcp",
"headers": { "Authorization": "Bearer bby_live_..." }
}
}
}免费接口:、、。付费接口:(上述任意接口)、,以及命名快捷方式。若要使用x402按调用付费,可删除块——完整流程请查看技能。
search_endpointsdescribe_endpointcheck_balancefetch_datatopup_creditsreddit_search_postheadersfetcherErrors
错误码
- — missing/invalid parameter (message names it)
400 - — unknown or rotated key
401 - — payment required (x402 challenge) or
402(credits exhausted)topup_required - — not a priced path
404 - No rate limits; no refunds on upstream failures (settlement precedes delivery)
- —— 参数缺失/无效(消息中会指明具体参数)
400 - —— 密钥未知或已过期
401 - —— 需要付费(x402验证)或
402(额度耗尽)topup_required - —— 路径未定价
404 - 无速率限制;上游请求失败不予退款(结算优先于交付)
Reference
参考链接
- Full agent setup: https://reddit.fetcher.sh/skill.md
- OpenAPI 3.1 contract: https://reddit.fetcher.sh/openapi.json
- Condensed catalog: https://reddit.fetcher.sh/llms.txt
- Payment, credits, and MCP deep dive: skill
fetcher - Site: https://reddit.fetcher.sh
- 完整Agent设置:https://reddit.fetcher.sh/skill.md
- OpenAPI 3.1契约:https://reddit.fetcher.sh/openapi.json
- 精简目录:https://reddit.fetcher.sh/llms.txt
- 支付、额度及MCP深度解析:技能
fetcher - 官网:https://reddit.fetcher.sh