POST
/v1/call/reddit.subreddit预览Reddit 社区资料接口
Reddit 独有的接口。
Reddit 社区资料 API(数据接口)按社区名取 Reddit 社区的资料:简介、成员数、最近一周的活跃用户数和发帖评论数、创建时间。每次调用 2 积分(约 $0.004–$0.0067),失败不扣。用 HTTP 调用,或让 AI 客户端通过 MCP 调用。最近实测:2026-10-17。
2 积分每次调用
一个对象每次调用返回
2026-10-17最近实测
754 B示例返回的体积(1 条)
最近更新:
预览:这个接口还没有标为稳定,参数和返回字段之后可能调整。计费和其他调用一样,调用失败不扣积分。
请求与返回
curl https://api.socialtoai.com/v1/call/reddit.subreddit \ -H "Authorization: Bearer $SOCIALTOAI_KEY" \ -H "Content-Type: application/json" \ -d '{ "id": "nasa" }'import osimport requestsresponse = requests.post( "https://api.socialtoai.com/v1/call/reddit.subreddit", headers={"Authorization": f"Bearer {os.environ['SOCIALTOAI_KEY']}"}, json={ "id": "nasa", },)print(response.json())# 已经通过 MCP 接好了?直接用大白话问。用“Reddit 社区资料”接口(reddit.subreddit),参数是 id: nasa。# 你的 AI 会调用 call 工具,参数是:{ "id": "nasa"}200 OK754 B2 积分
{ "op": "reddit.subreddit", "platform": "reddit", "status": "ok", "items": [ { "platform": "reddit", "id": "…", "ref": "…", "approx": [], "type": "entry", "entry_type": "community", "title": "…", "url": "https://example.com/…", "rank": null, "heat": null, "fields": { "description": "…", "nsfw": false, "created_at": "2008-05-10T16:54:23.304Z", "members": 127858 } } ], "unavailable": [], "cost_credits": 2}- entry_type
- community
- description
- …
- nsfw
- false
- created_at
- 2008-05-10T16:54:23.304Z
- members
- 127858
示例里的名称和正文已去掉,数字是录制时的真实值。
示例数据完整返回
1 个参数。
全部必填。
用 POST 发一个 JSON 请求体。Key 放在 Authorization 请求头里,不要放进网址。
| 名称 | 类型 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| id | string | 必填 | — | 社区名,不带 r/ |
这些值从哪里拿。
items 里每一条的字段。
Reddit 给不了的标出来了。
| 字段 | 类型 | 含义 |
|---|---|---|
| items[].title | string | 条目的标题或名称。 |
| items[].url | string | 能打开它的链接;平台的列表不带链接时为 null。 |
| items[].rank | integer | 榜上的名次,从 1 起。 |
| items[].heat | integer | 平台给的热度值。 |
| items[].fields.description | string | 社区简介。 |
| items[].fields.nsfw | boolean | 是否标为成人内容。 |
| items[].fields.created_at | string | 创建时间,ISO 8601(UTC)。 |
| items[].fields.members | integer | 成员数。 |
nullReddit 给不了的字段这个调用的字段 Reddit 都给得出;单条内容缺某个值时,那个字段是 null。
每一条另有 platform、id、ref、approx、type;items 外面的部分每个调用都一样。 返回格式
会发生什么。
一次调用返回一个对象,不翻页,2 积分。
每把 Key 每秒 1 次,购买后 5 次;超出不扣费。 频率限制
失败的调用 0 积分,不会自动重试。 错误码
接好 MCP 后,这样问就会用到它。
按社区名取 Reddit 社区的资料:nasa
2 积分call {"op":"reddit.subreddit","id":"nasa"}按用户名取这个 Reddit 用户活跃的社区:nasa,再对前 3 个结果:按社区名取 Reddit 社区的资料。
8 积分call {"op":"reddit.user_subreddits","username":"nasa"}call {"op":"reddit.subreddit","id":"<ref>"} × 3
常见问题。
简短回答。
Reddit 的全部接口需要 Reddit 账号,或者申请 Reddit 官方的 API 吗?
不需要,只要一把 SocialToAI 的 Key。返回的是 Reddit 上公开可见的内容和账号信息,你不用登录 Reddit,也不用在那边申请任何东西。
“预览”是什么意思?
预览:这个接口还没有标为稳定,参数和返回字段之后可能调整。计费和其他调用一样,调用失败不扣积分。