Sand AISand AI MAGI-2MAGI-2 现已上线 SandBase:支持原生音频的 1080p 视频立即试用

Reddit App Comment Replies

API 文档
https://api.sandbase.ai/v1/api/reddit/app/comment-replies

Returns replies and nested sub-comments under a Reddit post comment using a continuation cursor. Supports custom sorting methods and data formatting options.

价格
$0.001美元 / 次调用
方法
POST
响应
JSON
参数
2 个必填 · 2 个可选

Playground

输入
Comment cursor from the more.cursor field in comment data, format like "commenttree:ex:(xxx)"
Post ID, format like "t3_XXXXXX"
Whether to clean and format the data
Sort method, supports CONFIDENCE, NEW, TOP, HOT, CONTROVERSIAL, OLD, RANDOM
输出示例
响应outputs · 11.0 KB · 273 行
[
  {
    "data": {
      "postInfoById": {
        "__typename": "SubredditPost",
        "commentCount": 3049,
        "commentForest": {
          "__typename": "CommentForest",
          "pageInfo": {
            "commentCount": 5,
            "hasNextPage": false
          },
          "trees": [
            {
              "childCount": 0,
              "depth": 0,
              "more": null,
              "node": {
                "__typename": "Comment",
                "authorCommunityBadge": null,
                "authorFlair": null,
                "authorInfo": {
                  "__typename": "Redditor",
                  "accountType": "USER",
                  "iconSmall": {
                    "__typename": "MediaSource",
                    "dimensions": {
                      "height": 50,
                      "width": 50
                    },
                    "url": "https://styles.redditmedia.com/t5_p96kp/styles/profileIcon_a0kdvkgnwc7c1.jpeg?width=50&height=50&frame=1&auto=webp&crop=50%3A50%2Csmart&s=5ae545cdcd96b08cbaedd0e4616f6083726a0f21"
                  },
                  "id": "t2_236f6ttn",
                  "isBlocked": false,
                  "isCakeDayNow": false,
                  "isPremiumAvatarTreatment": false,
                  "name": "welfedad",
                  "newIcon": {
                    "__typename": "MediaSource",
                    "dimensions": {
                      "height": 256,
                      "width": 256
                    },
                    "url": "https://styles.redditmedia.com/t5_p96kp/styles/profileIcon_a0kdvkgnwc7c1.jpeg?frame=1&auto=webp&crop=256%3A256%2Csmart&s=8b6fbd31e342674ad6dfcb3691ee7282c0f70a49"
                  },
                  "profile": {
                    "isNsfw": false
                  },
                  "snoovatarIcon": null
                },
                "commentStats": null,
                "content": {
                  "__typename": "Content",
                  "markdown": "Looks like an eye booger or am I missing something",
                  "preview": "Looks like an eye booger or am I missing something",
                  "richtext": "{\"document\":[{\"c\":[{\"e\":\"text\",\"t\":\"Looks like an eye booger or am I missing something\"}],\"e\":\"par\"}]}",
                  "richtextMedia": [],
                  "translationInfo": {
                    "isTranslated": false,
                    "translatedLanguage": null
                  },
                  "typeHint": "TEXT"
                },
                "createdAt": "2026-01-26T05:47:01.149000+0000",
                "distinguishedAs": null,
                "editedAt": null,
                "id": "t1_o1rqk7i",
                "initiallyCollapsedReason": null,
                "isAdminTakedown": false,
                "isArchived": true,
                "isCommercialCommunication": false,
                "isGildable": true,
                "isInitiallyCollapsed": false,
                "isLocked": false,
                "isRemoved": false,
                "isSaved": false,
                "isScoreHidden": false,
                "isStickied": false,
                "isTranslatable": false,
                "languageCode": "en",
                "modContentDiscussion": null,
                "moderationInfo": null,
                "permalink": "/r/cats/comments/1qmup73/we_found_this_poor_little_kitten_in_the_woods/o1rqk7i/",
                "removedByCategory": null,
                "score": 3,
                "voteState": "NONE"
              },
              "parentId": "t1_o1q99np"
            },
            {
              "childCount": 0,
              "depth": 0,
              "more": null,
              "node": {
                "__typename": "Comment",
                "authorCommunityBadge": null,
                "authorFlair": null,
                "authorInfo": {
                  "__typename": "Redditor",
                  "accountType": "USER",
                  "iconSmall": {
                    "__typename": "MediaSource",
                    "dimensions": {
                      "height": 256,
                      "width": 256
                    },
                    "url": "https://www.redditstatic.com/avatars/defaults/v2/avatar_default_1.png"
                  },
                  "id": "t2_1744je4v1d",
                  "isBlocked": false,
                  "isCakeDayNow": false,
                  "isPremiumAvatarTreatment": false,
                  "name": "Key_Painter_5099",
                  "newIcon": {
                    "__typename": "MediaSource",
                    "dimensions": {
                      "height": 256,
                      "width": 256
                    },
                    "url": "https://www.redditstatic.com/avatars/defaults/v2/avatar_default_1.png"
                  },
                  "profile": {
                    "isNsfw": false
                  },
                  "snoovatarIcon": null
                },
                "commentStats": null,
                "content": {
                  "__typename": "Content",
                  "markdown": "I’m not seeing anything in her right eye?",
                  "preview": "I’m not seeing anything in her right eye?",
                  "richtext": "{\"document\":[{\"c\":[{\"e\":\"text\",\"t\":\"I\\u2019m not seeing anything in her right eye?\"}],\"e\":\"par\"}]}",
                  "richtextMedia": [],
                  "translationInfo": {
                    "isTranslated": false,
                    "translatedLanguage": null
                  },
                  "typeHint": "TEXT"
                },
                "createdAt": "2026-01-26T03:11:44.062000+0000",
                "distinguishedAs": null,
                "editedAt": null,
                "id": "t1_o1r22ur",
                "initiallyCollapsedReason": null,
                "isAdminTakedown": false,
                "isArchived": true,
                "isCommercialCommunication": false,
                "isGildable": true,
                "isInitiallyCollapsed": false,
                "isLocked": false,
                "isRemoved": false,
                "isSaved": false,
                "isScoreHidden": false,
                "isStickied": false,
                "isTranslatable": false,
                "languageCode": "en",
                "modContentDiscussion": null,
                "moderationInfo": null,
                "permalink": "/r/cats/comments/1qmup73/we_found_this_poor_little_kitten_in_the_woods/o1r22ur/",
                "removedByCategory": null,
                "score": 2,
                "voteState": "NONE"
              },
              "parentId": "t1_o1q99np"
            },
            {
              "childCount": 0,
              "depth": 0,
              "more": null,
              "node": {
                "__typename": "Comment",
                "authorCommunityBadge": null,
                "authorFlair": null,
                "authorInfo": {
                  "__typename": "Redditor",
                  "accountType": "USER",
                  "iconSmall": {
                    "__typename": "MediaSource",
                    "dimensions": {
                      "height": 50,
                      "width": 50
                    },
                    "url": "https://preview.redd.it/snoovatar/avatars/nftv2_bmZ0X2VpcDE1NToxMzdfNmFjYjhmYjgyODgwZDM5YzJiODQ0NmY4Nzc4YTE0ZDM0ZWU2Y2ZiN184ODk3MA_rare_8ffac4fe-6cfe-4955-afa3-1a7b522b522b-headshot.png?width=50&height=50&auto=webp&s=84f907f3d475bf2e3a25dfc1a52c77218357b294"
                  },
                  "id": "t2_gpdg2",
                  "isBlocked": false,
                  "isCakeDayNow": false,
                  "isPremiumAvatarTreatment": false,
                  "name": "actuallycallie",
                  "newIcon": {
                    "__typename": "MediaSource",
                    "dimensions": {
                      "height": 256,
                      "width": 256
                    },
                    "url": "https://preview.redd.it/snoovatar/avatars/nftv2_bmZ0X2VpcDE1NToxMzdfNmFjYjhmYjgyODgwZDM5YzJiODQ0NmY4Nzc4YTE0ZDM0ZWU2Y2ZiN184ODk3MA_rare_8ffac4fe-6cfe-4955-afa3-1a7b522b522b-headshot.png?auto=webp&s=8602228a169ef327b4738f15b8575825aaf49b83"
                  },
                  "profile": {
                    "isNsfw": false
                  },
                  "snoovatarIcon": {
                    "__typename": "MediaSource",
                    "dimensions": {
                      "height": 600,
                      "width": 380
                    },
                    "url": "https://i.redd.it/snoovatar/avatars/nftv2_bmZ0X2VpcDE1NToxMzdfNmFjYjhmYjgyODgwZDM5YzJiODQ0NmY4Nzc4YTE0ZDM0ZWU2Y2ZiN184ODk3MA_rare_8ffac4fe-6cfe-4955-afa3-1a7b522b522b.png"
                  }
                },
                "commentStats": null,
                "content": {
                  "__typename": "Content",
                  "markdown": "the saddest little face!",
                  "preview": "the saddest little face!",
                  "richtext": "{\"document\":[{\"c\":[{\"e\":\"text\",\"t\":\"the saddest little face!\"}],\"e\":\"par\"}]}",
                  "richtextMedia": [],
                  "translationInfo": {
                    "isTranslated": false,
                    "translatedLanguage": null
                  },
                  "typeHint": "RTJSON"
                },
                "createdAt": "2026-01-26T01:51:32.314000+0000",
                "distinguishedAs": null,
                "editedAt": null,
                "id": "t1_o1qm9rb",
                "initiallyCollapsedReason": null,
                "isAdminTakedown": false,
                "isArchived": true,
                "isCommercialCommunication": false,
                "isGildable": true,
                "isInitiallyCollapsed": false,
                "isLocked": false,
                "isRemoved": false,
                "isSaved": false,
                "isScoreHidden": false,
                "isStickied": false,
                "isTranslatable": false,
                "languageCode": "en",
                "modContentDiscussion": null,
                "moderationInfo": null,
                "permalink": "/r/cats/comments/1qmup73/we_found_this_poor_little_kitten_in_the_woods/o1qm9rb/",
                "removedByCategory": null,
                "score": 1,
                "voteState": "NONE"
              },
              "parentId": "t1_o1q99np"
            },
            "… 2 more items in the full response"
          ]
        },
        "id": "t3_1qmup73",
        "subreddit": {
          "allowedMediaInComments": [
            "GIPHY",
            "STATIC",
            "ANIMATED",
            "… 2 more items in the full response"
          ],
          "id": "t5_2qhta",
          "isQuarantined": false,
          "moderation": {
            "isShowCommentRemovalReasonPrompt": true
          },
          "name": "cats",
          "prefixedName": "r/cats",
          "tippingStatus": null
        },
        "title": "We found this poor little kitten in the woods, covered in ice, with her fur stuck to the hunk of plastic she was hiding under for shelter. We saved her 😁"
      }
    }
  }
]

示例

选择一个示例,将其输入和结果加载到 playground 中。

API README

Reddit App Comment Replies API

Returns the replies under one collapsed Reddit comment thread, plus basic info about the parent post and subreddit. It needs a post_id and a cursor taken from the more.cursor field of a comment tree.

Use cases

  • Expand a "load more replies" branch from a long Reddit thread to read the hidden comments.
  • Collect reply text and author names for sentiment analysis on one discussion branch.
  • Rebuild a full comment tree by following each reply back to its parent with parentId.
  • Check which replies come from distinguished accounts, such as moderators.

Request

curl -X POST "https://api.sandbase.ai/v1/api/reddit/app/comment-replies" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cursor": "commenttree:ex:(RjiJd", "post_id": "t3_1qmup73"}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
cursorstringYesComment cursor from the more.cursor field in comment data, format like "commenttree:ex:(xxx)"
post_idstringYesPost ID, format like "t3_XXXXXX"
need_formatbooleanNoWhether to clean and format the data
sort_typestringNoSort method, supports CONFIDENCE, NEW, TOP, HOT, CONTROVERSIAL, OLD, RANDOM

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "postInfoById": {
    "__typename": "SubredditPost",
    "commentCount": 3048,
    "commentForest": {
      "__typename": "CommentForest",
      "pageInfo": {
        "commentCount": 5,
        "hasNextPage": false
      },
      "trees": [
        {
          "childCount": 0,
          "depth": 0,
          "more": null,
          "node": {
            "__typename": "Comment",
            "authorCommunityBadge": null,
            "authorFlair": null,
            "authorInfo": {
              "__typename": "Redditor",
              "accountType": "USER",
              "iconSmall": {
                "__typename": "MediaSource",
                "dimensions": {
                  "height": 50,
                  "width": 50
                },
                "url": "https://styles.redditmedia.com/t5_p96kp/styles/profileIcon_a0kdvkgnwc7c1.jpeg?wi…"
              },
              "id": "t2_236f6ttn",
              "isBlocked": false,
              "isCakeDayNow": false,
              "isPremiumAvatarTreatment": false,
              "name": "welfedad"
            },
            "commentStats": null,
            "content": {
              "__typename": "Content",
              "markdown": "Looks like an eye booger or am I missing something",
              "preview": "Looks like an eye booger or am I missing something",
              "richtext": "{\"document\":[{\"c\":[{\"e\":\"text\",\"t\":\"Looks like an eye booger or am I missing som…",
              "richtextMedia": [],
              "translationInfo": {
                "isTranslated": false,
                "translatedLanguage": null
              },
              "typeHint": "TEXT"
            },
            "createdAt": "2026-01-26T05:47:01.149000+0000",
            "distinguishedAs": null
          },
          "parentId": "t1_o1q99np"
        }
      ]
    },
    "id": "t3_1qmup73",
    "subreddit": {
      "allowedMediaInComments": [
        "GIPHY"
      ],
      "id": "t5_2qhta",
      "isQuarantined": false,
      "moderation": {
        "isShowCommentRemovalReasonPrompt": true
      },
      "name": "cats",
      "prefixedName": "r/cats",
      "tippingStatus": null
    },
    "title": "We found this poor little kitten in the woods, covered in ice, with her fur stuc…"
  }
}

Response fields

FieldMeaning
postInfoById.title / postInfoById.idTitle and ID of the post the replies belong to. The ID uses the t3_ prefix.
postInfoById.commentCountTotal number of comments on the post, not only the replies in this response.
postInfoById.commentForest.trees[]List of reply nodes returned for the cursor. Each item holds one comment in node.
postInfoById.commentForest.trees[].node.content.markdown / postInfoById.commentForest.trees[].node.content.previewText of the comment. markdown holds the full comment text and preview holds a short version.
postInfoById.commentForest.trees[].node.authorInfo.name / postInfoById.commentForest.trees[].node.authorInfo.idUsername and account ID of the comment author. The ID uses the t2_ prefix.
postInfoById.commentForest.trees[].node.createdAtTime the comment was posted, as an ISO 8601 timestamp with a +0000 offset.
postInfoById.commentForest.trees[].parentIdID of the parent comment, with the t1_ prefix.
postInfoById.commentForest.trees[].childCount / postInfoById.commentForest.trees[].depthNumber of child replies under this comment and its depth value in the tree.
postInfoById.commentForest.trees[].moreSet when more replies are collapsed under this node. It is null when nothing more is hidden.
postInfoById.commentForest.pageInfo.hasNextPageTells you whether more replies are available after this page.
postInfoById.subreddit.prefixedNameSubreddit name with the r/ prefix, for example r/cats.

Notes

  • Take cursor from the more.cursor field of a comment tree item. It looks like commenttree:ex:(xxx). Get the top-level comments first with Reddit App Post Comments.
  • post_id must include the t3_ prefix, for example t3_1qmup73.
  • sort_type accepts CONFIDENCE, NEW, TOP, HOT, CONTROVERSIAL, OLD or RANDOM.
  • If hasNextPage is true, or a node has a non-null more, use its cursor in a new call to get the rest.

Pricing

$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相关 APIs

全部 APIs
API价格响应
Reddit$0.001 每次调用JSON
Reddit$0.001 每次调用JSON
Reddit$0.001 每次调用JSON
Reddit$0.001 每次调用JSON
Reddit$0.001 每次调用JSON
Reddit$0.001 每次调用JSON

指南:Best Reddit API in 2026: Pricing Compared

问题

常见问题

如何使用 Reddit App Comment Replies API?

向 https://api.sandbase.ai/v1/api/reddit/app/comment-replies 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。

Reddit App Comment Replies API 的价格是多少?

每次调用 $0.001,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。

Reddit App Comment Replies API 接受哪些参数?

必填:cursor (string) 和 post_id (string)。 可选:need_format (boolean) 和 sort_type (string)。 Parameters 表和本页的 Playground 列出了每个字段。

Reddit App Comment Replies API 返回什么?

在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。

我需要 Reddit 开发者账户或 API key 吗?

不需要。Reddit App Comment Replies 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Reddit API 访问权限。