Skip to content

最后更新

更新日志

reddit.com API

正常只读

来自 reddit.com 的结构化数据。 来源: reddit.com.

基础 URL
https://api.maviapi.com/v1/sites/reddit
8
端点
17 min ago
最近验证
100%
可用率 / 7 天
6593ms
p50 延迟
GET/list_popular_posts5 credits per call

列出热门帖子

返回 Reddit 首页(r/popular,即全站最热门的帖子)的一页帖子,以及下一页的游标。

Bearer auth. Pass your key as Authorization: Bearer <key> on every request.
stringOptionalin query

hot, new, top or rising

stringOptionalin query

period for sort=top: hour, day, week, month, year or all

stringOptionalin query

two-letter country code (e.g. GB, DE, IN) for that country's popular posts; null for everywhere

stringOptionalin query

next_after from a previous call (or a post id like t3_1y4vjxp) to get the page after it

feedstringe.g."popular"
sortstringe.g."hot"
returnedintegere.g.28
postsobject[]18 fields
idstringe.g."t3_1y4gqzi"
titlestringe.g."What's an \"UNWRITTEN RULE\" of society that you accidentally broke and immediately realized how serious people take it ?"
authorstringe.g."prettywhenimmean"
subredditstringe.g."askteddit"
scoreintegere.g.1632
upvote_rationumbere.g.0.9037886340977069
comment_countintegere.g.1718
award_countintegere.g.1
createdstringe.g."2026-11-24T15:52:46.359000+0000"
post_typestringe.g."text"
flairnull
domainstringe.g."self.askteddit"
urlstringe.g."https://www.reddit.com/r/askteddit/comments/1y4gqzi/whats_an_unwritten_rule_of_society_that_you/"
permalinkstringe.g."https://www.reddit.com/r/askteddit/comments/1y4gqzi/whats_an_unwritten_rule_of_society_that_you/"
body_previewstringe.g.""
imagesstring[]
nsfwbooleane.g.false
spoilerbooleane.g.false
next_afterstringe.g."t3_1y4gc8r"
Try itLive
GET
https://api.maviapi.com/v1/sites/reddit/list_popular_posts?sort=hot&time_filter=day
Request
curl "https://api.maviapi.com/v1/sites/reddit/list_popular_posts?sort=hot&time_filter=day" \
-H "Authorization: Bearer $MAVI_KEY"
Example944 B
{
  "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.

How to connect
https://mcp.maviapi.com/mcp

Or 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 import

Paste 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 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    sortstring / query否hot, new, top or rising
    time_filterstring / query否period for sort=top: hour, day, week, month, year or all
    countrystring / query否two-letter country code (e.g. GB, DE, IN) for that country's popular posts; null for everywhere
    afterstring / query否next_after from a previous call (or a post id like t3_1y4vjxp) to get the page after it
    响应字段
    字段类型说明
    feedstring
    sortstring
    returnedinteger
    postsobject[]
    posts[].idstring
    posts[].titlestring
    posts[].authorstring
    posts[].subredditstring
    posts[].scoreinteger
    posts[].upvote_rationumber
    posts[].comment_countinteger
    posts[].award_countinteger
    posts[].createdstring
    posts[].post_typestring
    posts[].flairnull
    posts[].domainstring
    posts[].urlstring
    posts[].permalinkstring
    posts[].body_previewstring
    posts[].imagesstring[]
    posts[].nsfwboolean
    posts[].spoilerboolean
    next_afterstring
  • 获取帖子评论 GET /get_post_comments

    返回一个 Reddit 帖子及其下的评论和回复,最多 `limit` 条。

    GET /get_post_comments 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    poststring / query否post URL (any reddit.com/.../comments/<id>/... link, a comment permalink or redd.it/<id>) or a bare post id like 1xyl6xo
    sortstring / query否comment order: confidence (Reddit's "Best"), top, new, old, controversial or qa
    limitinteger / query否maximum number of comments to return, 1 to 5000; use a high value to get the whole thread
    响应字段
    字段类型说明
    postobject
    post.idstring
    post.titlestring
    post.authorstring
    post.subredditstring
    post.scoreinteger
    post.upvote_rationumber
    post.comment_countinteger
    post.createdstring
    post.post_typestring
    post.urlstring
    post.permalinkstring
    post.bodystring
    returnedinteger
    completeboolean
    commentsobject[]
    comments[].idstring
    comments[].parent_idstring
    comments[].depthinteger
    comments[].authorstring
    comments[].scoreinteger
    comments[].createdstring
    comments[].bodystring
    comments[].body_htmlstring
    comments[].award_countinteger
    comments[].permalinkstring
    comments[].deletedboolean
  • 搜索帖子 GET /search_posts

    搜索 Reddit 帖子,返回匹配的帖子,以及用于获取后续结果的游标。

    GET /search_posts 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    querystring / query否search words; Reddit operators such as author:name, flair:name, site:example.com, self:yes and title:word work
    subredditstring / query否subreddit name to search within (e.g. python); null searches all of Reddit
    sortstring / query否relevance, hot, top, new or comments (most commented)
    time_filterstring / query否only posts from the last hour, day, week, month, year, or all
    limitinteger / query否number of results to return, 1 to 50 (results come in batches of about 7, so larger values take longer)
    cursorstring / query否next_cursor from a previous call with the same query, to continue after its results
    响应字段
    字段类型说明
    querystring
    subredditnull
    returnedinteger
    resultsobject[]
    results[].idstring
    results[].titlestring
    results[].authorstring
    results[].subredditstring
    results[].scoreinteger
    results[].comment_countinteger
    results[].createdstring
    results[].permalinkstring
    results[].thumbnailnull
    results[].matching_snippetnull
    results[].nsfwboolean
    results[].spoilerboolean
    next_cursorstring
  • 列出用户帖子 GET /list_user_posts

    返回某个 Reddit 用户发布的一页帖子(约 25 条),以及下一页的游标。

    GET /list_user_posts 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    usernamestring / query否Reddit username, with or without the u/ prefix
    sortstring / query否new, hot, top or controversial
    time_filterstring / query否period for sort=top and sort=controversial: hour, day, week, month, year or all
    afterstring / query否next_after from a previous call (or a post id like t3_fy0ah5) to get the page after it
    响应字段
    字段类型说明
    usernamestring
    sortstring
    returnedinteger
    postsobject[]
    posts[].idstring
    posts[].titlestring
    posts[].authorstring
    posts[].subredditstring
    posts[].scoreinteger
    posts[].upvote_rationumber
    posts[].comment_countinteger
    posts[].award_countnull
    posts[].createdstring
    posts[].post_typestring
    posts[].flairnull
    posts[].domainstring
    posts[].urlstring
    posts[].permalinkstring
    posts[].body_previewstring
    posts[].imagesstring[]
    posts[].nsfwboolean
    posts[].spoilerboolean
    next_afterstring
  • 列出 subreddit 帖子 GET /list_subreddit_posts

    返回某个 subreddit 信息流中的一页帖子(约 25 条),以及下一页的游标。

    GET /list_subreddit_posts 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    subredditstring / query否subreddit name, with or without the r/ prefix, e.g. python or r/AskReddit
    sortstring / query否hot, new, top, rising or controversial
    time_filterstring / query否period for sort=top and sort=controversial: hour, day, week, month, year or all
    afterstring / query否cursor from a previous call's next_after (or a post id like t3_1y4iysc) to get the page after it
    响应字段
    字段类型说明
    subredditstring
    sortstring
    returnedinteger
    postsobject[]
    posts[].idstring
    posts[].titlestring
    posts[].authorstring
    posts[].subredditstring
    posts[].scoreinteger
    posts[].upvote_rationumber
    posts[].comment_countinteger
    posts[].award_countinteger
    posts[].createdstring
    posts[].post_typestring
    posts[].flairstring
    posts[].domainstring
    posts[].urlstring
    posts[].permalinkstring
    posts[].body_previewstring
    posts[].imagesstring[]
    posts[].nsfwboolean
    posts[].spoilerboolean
    next_afterstring
  • 获取 subreddit GET /get_subreddit

    返回某个 subreddit 的基本资料:名称、id(t5_...)、链接、描述、weekly_visitors、weekly_contributions、图标和横幅图片的 URL,以及状态消息(或 null)。

    GET /get_subreddit 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    subredditstring / query否subreddit name, with or without the r/ prefix, e.g. python
    响应字段
    字段类型说明
    namestring
    idstring
    urlstring
    descriptionstring
    weekly_visitorsinteger
    weekly_contributionsinteger
    iconstring
    bannerstring
    statusstring
  • 列出用户评论 GET /list_user_comments

    返回某个 Reddit 用户的一页评论(约 25 条,默认最新的在前),以及下一页的游标。

    GET /list_user_comments 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    usernamestring / query否Reddit username, with or without the u/ prefix
    sortstring / query否new, hot, top or controversial
    time_filterstring / query否period for sort=top and sort=controversial: hour, day, week, month, year or all
    afterstring / query否next_after from a previous call (or a comment id like t1_os9obnq) to get the page after it
    响应字段
    字段类型说明
    usernamestring
    sortstring
    returnedinteger
    commentsobject[]
    comments[].idstring
    comments[].post_idstring
    comments[].post_titlestring
    comments[].subredditstring
    comments[].authorstring
    comments[].scoreinteger
    comments[].createdstring
    comments[].bodystring
    comments[].body_htmlstring
    comments[].permalinkstring
    comments[].stickiedboolean
    next_afterstring
  • 搜索 subreddit GET /search_subreddits

    按名称和主题搜索 Reddit 社区,返回匹配的 subreddit,以及用于获取更多结果的游标。

    GET /search_subreddits 的参数和响应字段
    请求参数
    名称类型 / 位置必填说明
    querystring / query否search words, e.g. python or hiking
    cursorstring / query否next_cursor from a previous call with the same query, to continue after its results
    响应字段
    字段类型说明
    querystring
    returnedinteger
    subredditsobject[]
    subreddits[].namestring
    subreddits[].idstring
    subreddits[].urlstring
    subreddits[].descriptionstring
    subreddits[].weekly_visitorsinteger
    subreddits[].weekly_contributionsinteger
    subreddits[].iconstring
    subreddits[].nsfwboolean
    next_cursorstring

将 reddit.com 数据导出为 CSV

下面的每个列表都可以下载为 CSV 文件,每条记录一行。用上方控制台下面的 "Get all the data, no code" 卡片把列表收集到数据集中。数据集会逐页读取列表,之后可下载为 CSV、JSON 或 JSONL。

列表CSV 列
列出热门帖子GET /list_popular_postsid, 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_commentsid, parent_id, depth, author, score, created, body, body_html, award_count, permalink, deleted
搜索帖子GET /search_postsid, title, author, subreddit, score, comment_count, created, permalink, thumbnail, matching_snippet, nsfw, spoiler
列出用户帖子GET /list_user_postsid, 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_postsid, 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_commentsid, post_id, post_title, subreddit, author, score, created, body, body_html, permalink, stickied
搜索 subredditGET /search_subredditsname, 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
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 修改页面时,maviapi 会让 reddit.com API 保持可用,您继续调用同样的端点,并得到本页文档所述结构的 JSON。它当前的运行状况见状态页,变更记录见它的更新日志。

更新会破坏我的 reddit.com API 集成吗?

不会。您正在使用的端点,其结构永远不会改变:新的字段、可选参数和端点只会加在旁边,会破坏调用的变更则作为新端点发布。请忽略您不认识的响应字段,新内容请关注更新日志。

  • Tripadvisor API

    来自 Tripadvisor 的行程规划数据:支持地点搜索,并可按地点(geo_id)获取景点、餐厅和酒店,包含评分、评论、价格和坐标。先用 /search 解析地名,再通过…

  • Google Maps API

    来自 maps.google.com 的结构化数据。

  • Kiwi.com API

    搜索并比较 Kiwi.com 上的航班:返回带实时价格、航空公司、航线和起降时间的行程,还可查询地点和航线。