最后更新
更新日志/list_popular_posts5 credits per call列出热门帖子
返回 Reddit 首页(r/popular,即全站最热门的帖子)的一页帖子,以及下一页的游标。
Authorization: Bearer <key> on every request.Parameters
hot, new, top or rising
period for sort=top: hour, day, week, month, year or all
two-letter country code (e.g. GB, DE, IN) for that country's popular posts; null for everywhere
next_after from a previous call (or a post id like t3_1y4vjxp) to get the page after it
Response fields
feede.g."popular"sorte.g."hot"returnede.g.28posts
ide.g."t3_1y4gqzi"titlee.g."What's an \"UNWRITTEN RULE\" of society that you accidentally broke and immediately realized how serious people take it ?"authore.g."prettywhenimmean"subreddite.g."askteddit"scoree.g.1632upvote_ratioe.g.0.9037886340977069comment_counte.g.1718award_counte.g.1createde.g."2026-11-24T15:52:46.359000+0000"post_typee.g."text"flairdomaine.g."self.askteddit"urle.g."https://www.reddit.com/r/askteddit/comments/1y4gqzi/whats_an_unwritten_rule_of_society_that_you/"permalinke.g."https://www.reddit.com/r/askteddit/comments/1y4gqzi/whats_an_unwritten_rule_of_society_that_you/"body_previewe.g.""imagesnsfwe.g.falsespoilere.g.falsenext_aftere.g."t3_1y4gc8r"curl "https://api.maviapi.com/v1/sites/reddit/list_popular_posts?sort=hot&time_filter=day" \-H "Authorization: Bearer $MAVI_KEY"
{
"feed": "popular",
"sort": "hot",
"returned": 28,
"posts": [
{
"id": "t3_1y4gqzi",
"title": "What's an \"UNWRITTEN RULE\" of society that you accidentally broke and immediately realized how serious people take it ?",
"author": "prettywhenimmean",
"subreddit": "askteddit",
"score": 1632,
"upvote_ratio": 0.9037886340977069,
"comment_count": 1718,
"award_count": 1,
"created": "2026-11-24T15:52:46.359000+0000",
"post_type": "text",
"flair": null,
"domain": "self.askteddit",
"url": "https://www.reddit.com/r/askteddit/comments/1y4gqzi/whats_an_unwritten_rule_of_society_that_you/",
"permalink": "https://www.reddit.com/r/askteddit/comments/1y4gqzi/whats_an_unwritten_rule_of_society_that_you/",
"body_preview": "",
"images": [
null
],
"nsfw": false,
"spoiler": false
}
],
"next_after": "t3_1y4gc8r"
}Get all the data, no code
Collect every page of GET /list_popular_posts into a dataset, for one request or for a whole list of them, then download it as CSV or JSON. A page costs the same as one call of the endpoint; the download is free.
Use reddit.com API from Claude, ChatGPT and your coding tools
Add this URL as a custom connector and sign in to maviapi. Nothing to install.
https://mcp.maviapi.com/mcpOr run it locally, with each endpoint of reddit.com API as its own tool:
claude mcp add maviapi -e MAVIAPI_TOOLS=reddit -- npx -y '@maviapi/mcp'Import reddit.com API into Postman and other tools
How to importPaste a link into Postman, Insomnia, an agent framework or a no-code tool to get every endpoint with its parameters and response fields. The link always serves the current endpoints, so importing it again picks up new ones.
- OpenAPI 3.1
https://api.maviapi.com/v1/apis/reddit/openapi.json - Postman
https://api.maviapi.com/v1/apis/reddit/postman.json
The Postman collection sends the shared demo key until you put your own key in its maviapi_key variable.
使用 reddit.com API 进行开发
选择一个端点开始
- 列出热门帖子
GET /list_popular_posts返回 Reddit 首页(r/popular,即全站最热门的帖子)的一页帖子,以及下一页的游标。
GET /list_popular_posts 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 sort string / query 否 hot, new, top or rising time_filter string / query 否 period for sort=top: hour, day, week, month, year or all country string / query 否 two-letter country code (e.g. GB, DE, IN) for that country's popular posts; null for everywhere after string / query 否 next_after from a previous call (or a post id like t3_1y4vjxp) to get the page after it 响应字段 字段 类型 说明 feed string sort string returned integer posts object[] posts[].id string posts[].title string posts[].author string posts[].subreddit string posts[].score integer posts[].upvote_ratio number posts[].comment_count integer posts[].award_count integer posts[].created string posts[].post_type string posts[].flair null posts[].domain string posts[].url string posts[].permalink string posts[].body_preview string posts[].images string[] posts[].nsfw boolean posts[].spoiler boolean next_after string - 获取帖子评论
GET /get_post_comments返回一个 Reddit 帖子及其下的评论和回复,最多 `limit` 条。
GET /get_post_comments 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 post string / query 否 post URL (any reddit.com/.../comments/<id>/... link, a comment permalink or redd.it/<id>) or a bare post id like 1xyl6xo sort string / query 否 comment order: confidence (Reddit's "Best"), top, new, old, controversial or qa limit integer / query 否 maximum number of comments to return, 1 to 5000; use a high value to get the whole thread 响应字段 字段 类型 说明 post object post.id string post.title string post.author string post.subreddit string post.score integer post.upvote_ratio number post.comment_count integer post.created string post.post_type string post.url string post.permalink string post.body string returned integer complete boolean comments object[] comments[].id string comments[].parent_id string comments[].depth integer comments[].author string comments[].score integer comments[].created string comments[].body string comments[].body_html string comments[].award_count integer comments[].permalink string comments[].deleted boolean - 搜索帖子
GET /search_posts搜索 Reddit 帖子,返回匹配的帖子,以及用于获取后续结果的游标。
GET /search_posts 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 query string / query 否 search words; Reddit operators such as author:name, flair:name, site:example.com, self:yes and title:word work subreddit string / query 否 subreddit name to search within (e.g. python); null searches all of Reddit sort string / query 否 relevance, hot, top, new or comments (most commented) time_filter string / query 否 only posts from the last hour, day, week, month, year, or all limit integer / query 否 number of results to return, 1 to 50 (results come in batches of about 7, so larger values take longer) cursor string / query 否 next_cursor from a previous call with the same query, to continue after its results 响应字段 字段 类型 说明 query string subreddit null returned integer results object[] results[].id string results[].title string results[].author string results[].subreddit string results[].score integer results[].comment_count integer results[].created string results[].permalink string results[].thumbnail null results[].matching_snippet null results[].nsfw boolean results[].spoiler boolean next_cursor string - 列出用户帖子
GET /list_user_posts返回某个 Reddit 用户发布的一页帖子(约 25 条),以及下一页的游标。
GET /list_user_posts 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 username string / query 否 Reddit username, with or without the u/ prefix sort string / query 否 new, hot, top or controversial time_filter string / query 否 period for sort=top and sort=controversial: hour, day, week, month, year or all after string / query 否 next_after from a previous call (or a post id like t3_fy0ah5) to get the page after it 响应字段 字段 类型 说明 username string sort string returned integer posts object[] posts[].id string posts[].title string posts[].author string posts[].subreddit string posts[].score integer posts[].upvote_ratio number posts[].comment_count integer posts[].award_count null posts[].created string posts[].post_type string posts[].flair null posts[].domain string posts[].url string posts[].permalink string posts[].body_preview string posts[].images string[] posts[].nsfw boolean posts[].spoiler boolean next_after string - 列出 subreddit 帖子
GET /list_subreddit_posts返回某个 subreddit 信息流中的一页帖子(约 25 条),以及下一页的游标。
GET /list_subreddit_posts 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 subreddit string / query 否 subreddit name, with or without the r/ prefix, e.g. python or r/AskReddit sort string / query 否 hot, new, top, rising or controversial time_filter string / query 否 period for sort=top and sort=controversial: hour, day, week, month, year or all after string / query 否 cursor from a previous call's next_after (or a post id like t3_1y4iysc) to get the page after it 响应字段 字段 类型 说明 subreddit string sort string returned integer posts object[] posts[].id string posts[].title string posts[].author string posts[].subreddit string posts[].score integer posts[].upvote_ratio number posts[].comment_count integer posts[].award_count integer posts[].created string posts[].post_type string posts[].flair string posts[].domain string posts[].url string posts[].permalink string posts[].body_preview string posts[].images string[] posts[].nsfw boolean posts[].spoiler boolean next_after string - 获取 subreddit
GET /get_subreddit返回某个 subreddit 的基本资料:名称、id(t5_...)、链接、描述、weekly_visitors、weekly_contributions、图标和横幅图片的 URL,以及状态消息(或 null)。
GET /get_subreddit 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 subreddit string / query 否 subreddit name, with or without the r/ prefix, e.g. python 响应字段 字段 类型 说明 name string id string url string description string weekly_visitors integer weekly_contributions integer icon string banner string status string - 列出用户评论
GET /list_user_comments返回某个 Reddit 用户的一页评论(约 25 条,默认最新的在前),以及下一页的游标。
GET /list_user_comments 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 username string / query 否 Reddit username, with or without the u/ prefix sort string / query 否 new, hot, top or controversial time_filter string / query 否 period for sort=top and sort=controversial: hour, day, week, month, year or all after string / query 否 next_after from a previous call (or a comment id like t1_os9obnq) to get the page after it 响应字段 字段 类型 说明 username string sort string returned integer comments object[] comments[].id string comments[].post_id string comments[].post_title string comments[].subreddit string comments[].author string comments[].score integer comments[].created string comments[].body string comments[].body_html string comments[].permalink string comments[].stickied boolean next_after string - 搜索 subreddit
GET /search_subreddits按名称和主题搜索 Reddit 社区,返回匹配的 subreddit,以及用于获取更多结果的游标。
GET /search_subreddits 的参数和响应字段
请求参数 名称 类型 / 位置 必填 说明 query string / query 否 search words, e.g. python or hiking cursor string / query 否 next_cursor from a previous call with the same query, to continue after its results 响应字段 字段 类型 说明 query string returned integer subreddits object[] subreddits[].name string subreddits[].id string subreddits[].url string subreddits[].description string subreddits[].weekly_visitors integer subreddits[].weekly_contributions integer subreddits[].icon string subreddits[].nsfw boolean next_cursor string
将 reddit.com 数据导出为 CSV
下面的每个列表都可以下载为 CSV 文件,每条记录一行。用上方控制台下面的 "Get all the data, no code" 卡片把列表收集到数据集中。数据集会逐页读取列表,之后可下载为 CSV、JSON 或 JSONL。
| 列表 | CSV 列 |
|---|---|
列出热门帖子GET /list_popular_posts | id, title, author, subreddit, score, upvote_ratio, comment_count, award_count, created, post_type, flair, domain, url, permalink, body_preview, images, nsfw, spoiler |
获取帖子评论GET /get_post_comments | id, parent_id, depth, author, score, created, body, body_html, award_count, permalink, deleted |
搜索帖子GET /search_posts | id, title, author, subreddit, score, comment_count, created, permalink, thumbnail, matching_snippet, nsfw, spoiler |
列出用户帖子GET /list_user_posts | id, title, author, subreddit, score, upvote_ratio, comment_count, award_count, created, post_type, flair, domain, url, permalink, body_preview, images, nsfw, spoiler |
列出 subreddit 帖子GET /list_subreddit_posts | id, title, author, subreddit, score, upvote_ratio, comment_count, award_count, created, post_type, flair, domain, url, permalink, body_preview, images, nsfw, spoiler |
列出用户评论GET /list_user_comments | id, post_id, post_title, subreddit, author, score, created, body, body_html, permalink, stickied |
搜索 subredditGET /search_subreddits | name, id, url, description, weekly_visitors, weekly_contributions, icon, nsfw |
嵌套的值(列表或对象)以 JSON 写入同一个单元格。 数据集和导出如何工作
reddit.com API 常见问题
能获取什么数据、费用多少、如何调用。
reddit.com 有官方 API 吗?
这个 reddit.com API 不是官方 API。它是 maviapi 针对 reddit.com 上的公开数据提供的独立托管 API,并非由 reddit.com 开发、认可或支持。reddit.com 是否提供自己的开发者 API,请向 reddit.com 咨询。这个 API 用一个 maviapi 密钥即可调用,它的每个端点和返回的每个字段都在本页有文档说明。
reddit.com API 可以获取哪些数据?
reddit.com API 有 8 个端点。每个端点都返回 JSON,参数和字段见上方的文档:
- GET
/list_popular_posts: 返回 Reddit 首页(r/popular,即全站最热门的帖子)的一页帖子,以及下一页的游标。 - GET
/get_post_comments: 返回一个 Reddit 帖子及其下的评论和回复,最多 `limit` 条。 - GET
/search_posts: 搜索 Reddit 帖子,返回匹配的帖子,以及用于获取后续结果的游标。 - GET
/list_user_posts: 返回某个 Reddit 用户发布的一页帖子(约 25 条),以及下一页的游标。 - GET
/list_subreddit_posts: 返回某个 subreddit 信息流中的一页帖子(约 25 条),以及下一页的游标。 - GET
/get_subreddit: 返回某个 subreddit 的基本资料:名称、id(t5_...)、链接、描述、weekly_visitors、weekly_contributions、图标和横幅图片的 URL,以及状态消息(或 null)。 - GET
/list_user_comments: 返回某个 Reddit 用户的一页评论(约 25 条,默认最新的在前),以及下一页的游标。 - GET
/search_subreddits: 按名称和主题搜索 Reddit 社区,返回匹配的 subreddit,以及用于获取更多结果的游标。
reddit.com API 的价格是多少?
调用用您 maviapi 套餐中的积分支付,只有成功的调用才会计费。此 API 的每个端点每次调用消耗 5 个积分。在 Hobby 套餐下(每月 $49,含 250,000 个积分),1,000 次调用约 $0.98。失败的调用不收费。Free 套餐每月提供 1,000 个积分,无需信用卡。超出部分请查看套餐和积分价格。
如何调用 reddit.com API?
向端点发送 HTTPS 请求,并在 Authorization 请求头中带上您的 API 密钥。例如 GET /list_popular_posts:
curl 'https://api.maviapi.com/v1/sites/reddit/list_popular_posts' \
-H "Authorization: Bearer $MAVI_KEY"在您的 API 密钥页面创建密钥,或者先在上方的控制台中用免费测试密钥试用任意端点。
以 JSON 获取 reddit.com 数据有哪些方式?
以 JSON 获取 reddit.com 数据的每种方式适合不同的需求:
- 自己写爬虫: 完全由自己掌控,不依赖任何服务商,但解析、被拦截的请求以及 reddit.com 每次改版后的修复都要自己负责。更适合从很少变化的页面一次性获取数据。
- Apify: 一个 Actor 市场,Actor 由您自己运行,输入、输出和价格由各个 Actor 决定。当已有 Actor 能返回您需要的数据,或者您想托管自己的代码时更合适。参见maviapi 与 Apify 的对比。
- RapidAPI: 一个汇集了众多提供方 API 的平台,用一个 RapidAPI 密钥调用,每个 API 单独定价。当您已经在使用该平台,并且其中某个 API 能满足需求时更合适。来源:RapidAPI docs。
- maviapi: 本页的 reddit.com API:8 个带文档的端点、公开的响应结构,以及一个可用于整个目录的密钥。当这些数据是您产品的一部分,而您不想维护爬虫时更合适。
reddit.com 改版后会怎样?
更新会破坏我的 reddit.com API 集成吗?
不会。您正在使用的端点,其结构永远不会改变:新的字段、可选参数和端点只会加在旁边,会破坏调用的变更则作为新端点发布。请忽略您不认识的响应字段,新内容请关注更新日志。
相关 API
- Tripadvisor API
来自 Tripadvisor 的行程规划数据:支持地点搜索,并可按地点(geo_id)获取景点、餐厅和酒店,包含评分、评论、价格和坐标。先用 /search 解析地名,再通过…
- Google Maps API
来自 maps.google.com 的结构化数据。
- Kiwi.com API
搜索并比较 Kiwi.com 上的航班:返回带实时价格、航空公司、航线和起降时间的行程,还可查询地点和航线。