SuperAPI AI 工具集

reddit-api

数据与分析

查看项目

更新于 10-15 21:41

技能介绍

用途:在无需注册 Reddit OAuth 应用、无需 client ID/secret、也不受 Reddit API 速率等级限制的前提下,按需获取 Reddit 数据。基础地址为 https://reddit.fetcher.sh,每次调用为一次普通 HTTP GET,按次付费。

身份验证:有两种付费方式,数据相同。其一为预付费额度,推荐使用,密钥可在 https://fetcher.sh/topup 或通过 POST /api/credits/topup 获取;设置 export FETCHER_API_KEY="bby_live_xxxxxxxxxxxx",请求时携带 Authorization: Bearer $FETCHER_API_KEY。其二为 x402 按次付费,省略该请求头即可,未付款的 GET 会返回 402 及机器可读的付款要求(USDC,支持 Base、Polygon、Arbitrum、Monad、Solana),@x402/fetch 可自动签名并重试。响应统一为 { "status": number, "message": string, "data": ... },HTTP 状态码与 status 一致。

主要能力:共 15 个接口,全部为 GET,每次 0.002 美元。搜索类包括 /api/search/post(按关键词跨所有子版块搜帖)、/api/search/subreddit、/api/search/user。子版块类包括 /api/subreddit/{name} 获取信息、/api/subreddit/{name}/posts 获取帖子流。帖子类包括 /api/post/{id} 单帖、/api/post/{id}/comments 评论树、/api/post/{id}/comments/{commentId}/replies 某条评论的回复。全站信息流包括 /api/posts/hot、/api/posts/new、/api/posts/top、/api/posts/best。用户类包括 /api/user/{username} 资料、/api/user/{username}/posts、/api/user/{username}/comments。{id}、{name}、{username} 为路径参数,可选 sort/cursor 用于排序和分页,搜索接口的 keyword 为必填。

使用方式:可用 curl 直接调用,例如搜索热门帖:curl -H "Authorization: Bearer $FETCHER_API_KEY" --data-urlencode "keyword=ai agents" -G --data-urlencode "sort=top" "https://reddit.fetcher.sh/api/search/post";/api/search/post 的其他 sort 值有 relevance、hot、comments、new。也可通过 MCP 接入,配置 mcpServers 中 reddit 的 url 为 https://reddit.fetcher.sh/mcp 并加 Authorization 请求头;免费工具含 search_endpoints、describe_endpoint、check_balance,付费工具含 fetch_data、topup_credits 及快捷工具 reddit_search_post,省略 headers 块即改用 x402 按次付费,完整流程见 fetcher skill。

错误与限制:400 为参数缺失或无效,401 为密钥未知或已轮换,402 为需要付款(x402 挑战)或额度耗尽(topup_required),404 为未定价路径。无速率限制;上游失败不退款(结算先于交付)。参考资料包括 https://reddit.fetcher.sh/skill.md、https://reddit.fetcher.sh/openapi.json、https://reddit.fetcher.sh/llms.txt。是否支持写入或发布等操作,资料暂未提供。