Comments
获取 Reddit 帖子的评论树、某条评论下的回复,或用户的评论。
GET | POST /v1/reddit/comments参数可以用 GET 的查询字符串发送,也可以用 POST 的 JSON 请求体发送,两者等价。
传入内容
| 传入 | 读取内容 | 说明 |
|---|---|---|
post | 帖子的评论树 | 顶层评论及 Reddit 嵌套在其下的回复;帖子在 ext.post 中。sort:confidence(默认)、top、new、controversial、old、qa |
post + comment | 某条评论下的回复 | 该评论及其嵌套的回复 |
username | 用户的评论 | sort:new、hot、top、controversial |
每次调用只传一个来源。所有标识符也都接受页面 URL。
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
comment | string | With post: the comment whose replies to load (base36 id or t1_ fullname) — e.g. one whose moreReplies says replies were held back. | |
cursor | string | Opaque cursor from the previous page's cursor. Pass it alone for the next page. | |
limit | integer 1–100 | Items per page, 1–100. | |
period | enum | Time window for sort top or controversial: hour, day, week, month, year or all. hour day week month year all | |
post | string | A post's comments: post id, fullname (t3_…) or URL. | |
sort | enum | Order. post: confidence (Reddit's 'best'), top, new, controversial, old, qa · username: new, hot, top, controversial. confidence top new controversial old qa hot | |
username | string | A user's comments: username or profile URL. |
请求
curl "https://gateway.apinoa.com/v1/reddit/comments?post=1wtm5mp" \
-H "x-api-key: $APINOA_API_KEY"响应
在 data 中返回 Comment Page。 真实响应的节选:数组只保留前几项,长文本已截断。
{
"success": true,
"data": {
"platform": "reddit",
"items": [
{
"platform": "reddit",
"id": "pcvg4r0",
"url": "https://www.reddit.com/r/technology/comments/1wtm5mp/comment/pcvg4r0/",
"postId": "1wtm5mp",
"author": {
"platform": "reddit",
"handle": "bryancald",
"avatarUrl": "https://styles.redditmedia.com/t5_21dyao/styles/profileIcon_snoo96d39f88-0d0d-4954-a766-4738a4900b3a-headshot.png?width…"
},
"text": "I truly hope this leads to the demise of McDonalds and any other company that uses this business model.",
"createdAt": "2026-09-29T21:14:47.455Z",
"replies": [],
"moreReplies": {
"count": 114,
"cursor": "L4XGv5gQ_FjNqfTT50wyH8HLEFcVKbYmFyUeCUqK7sWTOyfFoRJhjidTb3_j1nbWbQFGMKsNt5HrRLGMOg0FKTXRRGR0E7PbYOr0toK3-hr569AwBmuPKON…"
},
"ext": {
"fullname": "t1_pcvg4r0",
"parentFullname": "t3_1wtm5mp",
"depth": 0,
"score": 2311,
"awards": 4,
"community": "technology"
}
}
],
"cursor": "uLbhrTSCxojEb5jzOX2Bo3KUoyHedf6jaMv9hj7OlvK_HdPrLWt8_nE12KPBUV3ilwsATxuZi_45UdCtRMCxSMjSdrBmRFU_oHiRvSHt1R3A7S1Qzdg5n-J…",
"ext": {
"post": {
"platform": "reddit",
"id": "1wtm5mp",
"url": "https://www.reddit.com/r/technology/comments/1wtm5mp/mcdonalds_is_reportedly_using_ai_to_dynamically/",
"author": {
"platform": "reddit",
"handle": "AdSpecialist6598",
"id": "cc0n0rs5"
},
"title": "McDonald's Is Reportedly Using AI To \"Dynamically\" Price Its Burgers",
"createdAt": "2026-09-29T21:06:04.000Z",
"media": [],
"metrics": {
"comments": 3406
},
"linkPreview": {
"url": "https://www.engadget.com/2272211/mcdonalds-is-reportedly-using-ai-to-dynamically-price-its-burgers/",
"domain": "engadget.com",
"thumbnailUrl": "https://external-preview.redd.it/AQiUEhcGHE3YfA3sQBeQ19JM5rWJBxMI7qHIwZZXKCE.jpeg?auto=webp&s=b396d5d14e8ed04fcfdafd4db…"
},
"sensitive": false,
"ext": {
"fullname": "t3_1wtm5mp",
"score": 19516,
"ups": 19516,
"upvoteRatio": 0.94,
"numCrossposts": 6,
"awards": 0,
"flair": "Business",
"flairTextColor": "dark",
"flairTemplateId": "49cac61c-a816-11e9-be34-0ebbab5890a0",
"kind": "link",
"preview": {
"source": {
"url": "https://external-preview.redd.it/AQiUEhcGHE3YfA3sQBeQ19JM5rWJBxMI7qHIwZZXKCE.jpeg?auto=webp&s=b396d5d14e8ed04fcfdafd4db…",
"width": 1600,
"height": 898
},
"resolutions": [
{
"url": "https://external-preview.redd.it/AQiUEhcGHE3YfA3sQBeQ19JM5rWJBxMI7qHIwZZXKCE.jpeg?width=108&crop=smart&auto=webp&s=300b…",
"width": 108,
"height": 60
},
{
"url": "https://external-preview.redd.it/AQiUEhcGHE3YfA3sQBeQ19JM5rWJBxMI7qHIwZZXKCE.jpeg?width=216&crop=smart&auto=webp&s=74aa…",
"width": 216,
"height": 121
}
],
"enabled": false
},
"thumbnailUrl": "https://external-preview.redd.it/AQiUEhcGHE3YfA3sQBeQ19JM5rWJBxMI7qHIwZZXKCE.jpeg?width=320&crop=smart&auto=webp&s=7d75…",
"spoiler": false,
"locked": false,
"archived": false,
"community": {
"name": "technology",
"id": "2qh16",
"subscribers": 20595712,
"type": "public"
}
}
}
}
}
}错误
| 状态 | 代码 | 含义 |
|---|---|---|
| 400 | INVALID_CURSOR | 该 cursor 不是本操作返回的。请不带它重新开始。 |
| 400 | INVALID_PARAMS | 参数缺失、未知或超出范围。消息中会指出是哪一个。 |
| 401 | UNAUTHORIZED | 缺少 x-api-key 请求头,或密钥已吊销或未知。 |
| 402 | INSUFFICIENT_BALANCE | 余额不足以支付本次调用。请在控制台充值。 |
| 404 | NOT_FOUND | 账号、帖子或分组不存在,或为私密、已删除、有年龄限制。 |
| 429 | MARKETPLACE_SATURATED | 并发调用过多。请等待 Retry-After 秒后重试。 |
| 502 | UPSTREAM_ERROR | 平台返回了无法使用的内容。请退避后重试。 |
全部错误代码见 Errors。失败的调用不计费。
价格
价格 每次调用 $0.001,每多一次调用加 $0.001——最多再加 2 次,合计最多 $0.003。标价;单日调用超过 1,000 次后单价下调。
说明
- 帖子的评论按 Reddit 自己的分页返回。 第一页包含 Reddit 的前 25 条评论及嵌套在其下的回复;每个
cursor页加载下一批,与 Reddit 的“更多评论”一致。ext.more.count表示尚未加载的顶层评论数。帖子的评论不适用limit。 - Reddit 暂未展开的回复。 回复未全部包含的评论带有
moreReplies.count。将其id作为comment(与同一个post一起)传入即可加载:返回该评论及其回复,cursor继续加载它的直接回复。 comment接受 base36 id 或t1_fullname。帖子中不存在的评论返回404 NOT_FOUND。period(hour…all)适用于sort=top或sort=controversial的用户评论;sort=hot仅用于用户评论。