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