API 文档

Reddit 用户评论 API

Reddit 用户评论 API 参数、分页、真实响应与计费说明。

测试 API

查询公开数据,使用明确的参数与真实响应示例。

打开产品页并测试
POST https://api.goanyapi.com/api/v1/reddit/user/comments

请求与鉴权

同步 POST JSON 接口,不生成任务、无需轮询。使用 Authorization: Bearer YOUR_API_KEY。没有 Path 或 Query 参数。

输入参数

参数 位置 类型 必填 默认值 范围与说明
Authorization Header string 是 — Bearer YOUR_API_KEY
Content-Type Header string 是 application/json application/json
url JSON body string 是 — 完整资源链接,按接口填写 Threads 帖子、Reddit 帖子、版块或用户主页链接。 maxLength: 2048
sort JSON body string 否 new 结果排序;完整取值见下方枚举,区分大小写。 enum: "new" maxLength: 2048
cursor JSON body string 否 — 首次不传;下一页将 data.result.next_cursor 原样传入,不自行构造游标。 maxLength: 16384
feedLength JSON body integer 否 0 此前累计返回的记录条数,首次为 0,翻页加上上一页实际列表长度;不是每页条数。 minimum: 0 maximum: 1000000

使用完整资源 URL 优先;Threads 用户接口也接受用户名或 @用户名,内部标识无需自行获取,不额外收费。first、count、limit 不作为公开输入,使用服务默认条数;实际返回可能更少。

sort

值 默认
"new" 是

请求示例

POST /api/v1/reddit/user/comments
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "url": "https://www.reddit.com/user/spez/",
  "sort": "new",
  "feedLength": 0
}

输出字段

成功返回 HTTP 200,业务数据位于 data.result。null、空字符串、空数组、缺失字段原样保留,不补造数据。false 和 0 是合法业务值,不等于空结果。

字段 类型 说明
code string 成功为 ok,失败为公开错误码
message string 请求状态说明
data.result object / null 实际公开结果,可为空
data.creditsUsed integer 本次实际扣费,空结果为 0;非空价格来自数据库
data.remainingCredits number 结算后的账户积分余额
data.result.comments array 实际公开业务字段;保留 null、空值与字段缺失
data.result.comments[].author string 实际公开业务字段;保留 null、空值与字段缺失
data.result.comments[].createdAt string 实际公开业务字段;保留 null、空值与字段缺失
data.result.comments[].depth null 实际公开业务字段;保留 null、空值与字段缺失
data.result.comments[].id string 实际公开业务字段;保留 null、空值与字段缺失
data.result.comments[].parentId string 实际公开业务字段;保留 null、空值与字段缺失
data.result.comments[].score number 实际公开业务字段;保留 null、空值与字段缺失
data.result.comments[].text string 实际公开业务字段;保留 null、空值与字段缺失
data.result.comments[].url string 实际公开业务字段;保留 null、空值与字段缺失
data.result.count number 当前页记录数,不是全部记录总数
data.result.has_more boolean 是否仍有后续结果;没有有效游标时不可自行构造分页
data.result.next_cursor string 下一页不透明游标;仅在非空、不同且允许继续时原样传回

分页与结果边界

首次不传 cursor。下一页保持相同筛选条件,将 data.result.next_cursor 原样传入 cursor。每页独立请求,只有非空成功结果计费。has_more 为 false、游标为空或与本页相同时停止;不猜造游标。

feedLength 是此前累计返回的记录条数,首次为 0;翻页时加上上一页实际列表长度。count 仅表示当前页条数,不代表全量总数。

真实响应示例

采集时间: 2026-11-18T09:32:38Z

保存自真实成功请求,完整保留公开结果列表。结构省略 data.creditsUsed 与 data.remainingCredits,实际响应包含按当前配置计算的费用与余额。保存示例不会请求或扣费;媒体地址可能过期。

{
  "code": "ok",
  "message": "ok",
  "data": {
    "result": {
      "comments": [
        {
          "id": "t1_19ruo33ofgh8i",
          "parentId": "t3_1xiupuc",
          "author": "spez",
          "score": -7,
          "depth": null,
          "createdAt": "2026-10-29T22:42:06.463000+0000",
          "url": "https://www.reddit.com/r/RDDT/comments/1xiupuc/comment/19ruo33ofgh8i/?context=3",
          "text": "Pretty simple. For people who are already coming to Reddit every week, we have to give them a reason to come back everyday. If you come for sports and entertainment, or food and fashion, or new and trends, or something fun and funny, can you find it simply once you’re here. If the answer is yes, well, then you’re probably going to come back. If the answer is no, you might not.\n    \n      We’ve got a lot we’ll be testing in the coming months towards this end. For example, where we have For You and Following today in the app, we’ll be adding other feeds and topics so you can hopefully more easily get the vibe you’re looking for."
        },
        {
          "id": "t1_19ruo2bw7d6ps",
          "parentId": "t3_1xiupuc",
          "author": "spez",
          "score": -9,
          "depth": null,
          "createdAt": "2026-10-29T22:41:37.623000+0000",
          "url": "https://www.reddit.com/r/RDDT/comments/1xiupuc/comment/19ruo2bw7d6ps/?context=3",
          "text": "At a high level, however people want to communicate on the internet, they should be able to do so on Reddit.\n    \n      We’ve continually evolved over the years, from just links to text to images (becoming a home for early memes and GIFs) to video and now some audio and beyond.\n    \n      We’ve seen progress with some of the new video formats that we’ve been testing this year. Video creation, video consumption and chained video views grow. I’m very excited to expand on video AMAs, text-to-speech for background listening, and more new Devvit experiences."
        },
        {
          "id": "t1_19ruo0i3k53he",
          "parentId": "t3_1xiupm0",
          "author": "spez",
          "score": 23,
          "depth": null,
          "createdAt": "2026-10-29T22:40:29.330000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1xiupm0/comment/19ruo0i3k53he/?context=3",
          "text": "me too, Gary, me too…"
        },
        {
          "id": "t1_19runzmofvco5",
          "parentId": "t3_1xiupm0",
          "author": "spez",
          "score": 24,
          "depth": null,
          "createdAt": "2026-10-29T22:39:56.717000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1xiupm0/comment/19runzmofvco5/?context=3",
          "text": "On Reddit, we target ads based on your interests that are expressed through the subreddits you spend time in. When I say we don’t know you, I mean, we don’t know your name or real world identity. And when there is something like an ID check for age verification, we only do this through third-parties, so we never see that information at all."
        },
        {
          "id": "t1_19runy506ezfl",
          "parentId": "t3_1xiupm0",
          "author": "spez",
          "score": 8,
          "depth": null,
          "createdAt": "2026-10-29T22:39:01.004000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1xiupm0/comment/19runy506ezfl/?context=3",
          "text": "I think you did a good job answering your own question. I totally agree. We have to find the right balance. That said, the majority of new community discovery today happens through the personalized home feed, which only works if you’re logged in."
        },
        {
          "id": "t1_19runxce4jc9x",
          "parentId": "t3_1xiupm0",
          "author": "spez",
          "score": 5,
          "depth": null,
          "createdAt": "2026-10-29T22:38:31.306000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1xiupm0/comment/19runxce4jc9x/?context=3",
          "text": "Regardless of the shift to logged-in, streamlining the whole registration and onboarding process is important. Believe it or not, it’s much faster than it was a year ago, but I think there is a lot of room for improvement still. My dream is to have onboarding-less onboarding. You register quickly and get to a feed that is easy to get dialed in for you."
        },
        {
          "id": "t1_19runwkcgtuqq",
          "parentId": "t3_1xiupm0",
          "author": "spez",
          "score": 4,
          "depth": null,
          "createdAt": "2026-10-29T22:38:02.195000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1xiupm0/comment/19runwkcgtuqq/?context=3",
          "text": "That would be in the spirit of that feature, yes."
        },
        {
          "id": "t1_19runvxrpd8f6",
          "parentId": "t3_1xiupm0",
          "author": "spez",
          "score": 25,
          "depth": null,
          "createdAt": "2026-10-29T22:37:38.761000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1xiupm0/comment/19runvxrpd8f6/?context=3",
          "text": "We’re going to have to test and find the right balance. The one-off visitor from a shared link or search referred user aren’t the primary target here. \n    \n      And, this will make scraping Reddit more difficult generally."
        },
        {
          "id": "t1_p1wosm9",
          "parentId": "t3_1vgbkge",
          "author": "spez",
          "score": 20,
          "depth": null,
          "createdAt": "2026-08-05T18:31:50.140000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1vgbkge/comment/p1wosm9/?context=3",
          "text": "That was the thinking. Otherwise it would be easier to just replicate the UI."
        },
        {
          "id": "t1_p1w9sot",
          "parentId": "t3_1vgbkge",
          "author": "spez",
          "score": 27,
          "depth": null,
          "createdAt": "2026-08-05T17:30:18.963000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1vgbkge/comment/p1w9sot/?context=3",
          "text": "If we replace every line of code but the output is the same, is it still old Reddit?"
        },
        {
          "id": "t1_p1w9j2v",
          "parentId": "t3_1vgbkge",
          "author": "spez",
          "score": 28,
          "depth": null,
          "createdAt": "2026-08-05T17:29:13.273000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1vgbkge/comment/p1w9j2v/?context=3",
          "text": "Karma and Age gates are really blunt tools that, while we understand why they are used today, end up with a blast radius making the it hard for (good) new users finding a way to participate. That makes a bad experience. Our plan is to build tools so you no longer feel the need to rely on hammers like those. But we’ll make sure you can see it working better before proceeding."
        },
        {
          "id": "t1_p1vy2h1",
          "parentId": "t3_1vgbkge",
          "author": "spez",
          "score": 68,
          "depth": null,
          "createdAt": "2026-08-05T16:42:20.041000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1vgbkge/comment/p1vy2h1/?context=3",
          "text": "I am once again coming to you to ask you to spend more time in this app."
        },
        {
          "id": "t1_p1vttld",
          "parentId": "t3_1vgbkge",
          "author": "spez",
          "score": 15,
          "depth": null,
          "createdAt": "2026-08-05T16:24:51.522000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1vgbkge/comment/p1vttld/?context=3",
          "text": "Yep. We'll work closely with mod teams to test the new tools along side your old tools. We want our new tools to have fewer false positives, while still catching all the crud that should be kept out of your spaces, and you should be able to see this before we go forward. Our teams will also be working alongside your to help make the transitions once we're ready."
        },
        {
          "id": "t1_p1vrya9",
          "parentId": "t3_1vgbkge",
          "author": "spez",
          "score": 40,
          "depth": null,
          "createdAt": "2026-08-05T16:17:14.643000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1vgbkge/comment/p1vrya9/?context=3",
          "text": "I'm sorry what"
        },
        {
          "id": "t1_p1vrf3r",
          "parentId": "t3_1vgbkge",
          "author": "spez",
          "score": 72,
          "depth": null,
          "createdAt": "2026-08-05T16:15:03.911000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1vgbkge/comment/p1vrf3r/?context=3",
          "text": "My only hope is that karma and account age filters don’t disappear before Reddit has actually proven that its own abuse detection tools work in the real world.\n    \n    \n      That's the plan. We're testing it now with a few volunteer mods / subs. Still have some work to do."
        },
        {
          "id": "t1_p0rih9t",
          "parentId": "t3_1vb4oe8",
          "author": "spez",
          "score": 18,
          "depth": null,
          "createdAt": "2026-07-30T22:39:07.795000+0000",
          "url": "https://www.reddit.com/r/RDDT/comments/1vb4oe8/comment/p0rih9t/?context=3",
          "text": "Reddit is for people talking to people, and protecting that trust is a top priority. I gave a more thorough update on this in March, but the TL;DR is we’re fighting bad bots and spam on several fronts: making Reddit harder to scrape at scale, using proactive models that prevent up to 23 million spam views per day, and revoking nearly 2 million inauthentic votes per day.\n    \n      Useful bots will be clearly labeled. Suspicious accounts may be asked to confirm there’s a human behind them, without requiring people to reveal their real-world identity. Communities will continue setting their own rules for AI-generated content—but a recent report by Pangram found that Reddit had one of the lowest scores for prevalence of AI-generated content of any platform.\n    \n      The hoodies are real; handwritten letters are fan fiction—but a good idea. Wish we had thought of it, but we were moving fast."
        },
        {
          "id": "t1_p0ri6c3",
          "parentId": "t3_1vb4oe8",
          "author": "spez",
          "score": 16,
          "depth": null,
          "createdAt": "2026-07-30T22:37:36.676000+0000",
          "url": "https://www.reddit.com/r/RDDT/comments/1vb4oe8/comment/p0ri6c3/?context=3",
          "text": "Thank you for your support of RDDT.\n    \n      About a year ago we began rolling limits on moderation, including the limitation for redditors to moderate up to five communities with over 100k weekly visitors. We also changed our primary metric of a community’s activity from subscribers to weekly visitors, which is more indicative of traffic. We’ll continue to keep an eye on this."
        },
        {
          "id": "t1_p0ri0bd",
          "parentId": "t3_1vb4oe8",
          "author": "spez",
          "score": 15,
          "depth": null,
          "createdAt": "2026-07-30T22:36:44.998000+0000",
          "url": "https://www.reddit.com/r/RDDT/comments/1vb4oe8/comment/p0ri0bd/?context=3",
          "text": "Our long-term goal hasn’t changed: 1 billion daily users globally and 100 million in the US. To get there, Reddit needs to become a daily destination, not a site people mainly discover through third-party search.\n    \n      We made good progress this quarter in a few areas that really matter here. New-user retention in the app improved 50% year over year on a relative basis, more communities are reaching a thriving state, and we’re getting better at turning people who first visit on the web into higher-quality app users who come back more often.\n    \n      We’re focused on what we can control, which is the core app experience. This is what will get us to that goal."
        },
        {
          "id": "t1_p0rhxmo",
          "parentId": "t3_1vb4oe8",
          "author": "spez",
          "score": 18,
          "depth": null,
          "createdAt": "2026-07-30T22:36:22.351000+0000",
          "url": "https://www.reddit.com/r/RDDT/comments/1vb4oe8/comment/p0rhxmo/?context=3",
          "text": "We saw some impact after the initial launch of age verification in the UK about a year ago, but as we’ve gotten better at identifying users who should be ID’d, this has settled.  \n    \n      The vast majority of Reddit users are adults, but we're committed to providing a safe experience for everyone who uses the platform, regardless of how regulations evolve globally. And we’re continuing to explore ways to strengthen safeguards for teens on the platform."
        },
        {
          "id": "t1_p0rhup4",
          "parentId": "t3_1vb4oe8",
          "author": "spez",
          "score": 22,
          "depth": null,
          "createdAt": "2026-07-30T22:35:57.807000+0000",
          "url": "https://www.reddit.com/r/RDDT/comments/1vb4oe8/comment/p0rhup4/?context=3",
          "text": "This is something we’ve discussed internally, but it’s not a priority at the moment. Our main focus continues to be making Reddit the best version of itself (faster, easier, better to use), versus layering in new features and experiences.\n    \n      I’m glad the carabiner found its audience."
        },
        {
          "id": "t1_p0rhpwr",
          "parentId": "t3_1vb4oe8",
          "author": "spez",
          "score": 18,
          "depth": null,
          "createdAt": "2026-07-30T22:35:17.724000+0000",
          "url": "https://www.reddit.com/r/RDDT/comments/1vb4oe8/comment/p0rhpwr/?context=3",
          "text": "I took this one on the analyst call, but just in case folks missed my response...\n    \n      I had a couple of conversations with brands we’ve wanted on Reddit for a long time. What stood out was how much better advertisers understand Reddit now. They see that people come here with intent, looking for honest opinions and real recommendations, and that creates value that’s hard to find elsewhere.\n    \n      I also loved seeing how our team shows up at this event. They are our best evangelists: they know the product, understand our communities, and explain Reddit in a way that feels true to what it is. I always leave Cannes feeling really proud of how far we’ve come.\n    \n      PS - Carabiner idea was from yours truly. Not sure if I regret it or not."
        },
        {
          "id": "t1_os0o1vi",
          "parentId": "t3_1u7hraf",
          "author": "spez",
          "score": 135,
          "depth": null,
          "createdAt": "2026-06-16T16:59:58.137000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1u7hraf/comment/os0o1vi/?context=3",
          "text": "And thank you (mod tools suck) u/shiruken!"
        },
        {
          "id": "t1_os0jtt9",
          "parentId": "t3_1u7hraf",
          "author": "spez",
          "score": 55,
          "depth": null,
          "createdAt": "2026-06-16T16:41:57.725000+0000",
          "url": "https://www.reddit.com/user/spez/comments/1u7hraf/comment/os0jtt9/?context=3",
          "text": "You were the ride"
        },
        {
          "id": "t1_orucdtm",
          "parentId": "t3_1u6nnyv",
          "author": "spez",
          "score": 170,
          "depth": null,
          "createdAt": "2026-06-15T19:01:03.726000+0000",
          "url": "https://www.reddit.com/r/redditstock/comments/1u6nnyv/comment/orucdtm/?context=3",
          "text": "Haven’t forgotten about you 👊"
        },
        {
          "id": "t1_optfyql",
          "parentId": "t3_1tvs5jj",
          "author": "spez",
          "score": 28,
          "depth": null,
          "createdAt": "2026-06-05T00:51:55.560000+0000",
          "url": "https://www.reddit.com/r/RDDT/comments/1tvs5jj/comment/optfyql/?context=3",
          "text": "Juuuust kidding. We’ll follow up with the hoodie plan."
        }
      ],
      "count": 25,
      "next_cursor": "dDFfb3B0ZnlxbA==",
      "has_more": true
    }
  }
}

计费

…

仅非空成功结果按数据库当前配置扣费;空结果和失败不扣费,内部标识处理不单独收费。每页独立结算;false、0 等合法结果不按空结果处理。

状态码

HTTP 含义
200 成功,包含免费空结果
400 JSON、参数或资源 URL 无效
401 未鉴权或凭证无效
402 积分不足
429 请求过于频繁,遵循 Retry-After
502 数据请求失败
503 接口或价格未配置