> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keyapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Reddit APP Comment Replies (Sub-comments)

> Get replies (second-level comments / sub-comments) under a specified comment on Reddit APP
When a comment node has a more.cursor field, use this API to fetch the sub-comments of that comment

Steps:
1. First call fetch_post_comments to get the top-level comments of a post
2. Find the node with sub-comments in the returned data (childCount > 0)
3. Get the more.cursor value of that node
4. Use that cursor to call this API to get sub-comments

Note:
The cursor value comes from the more.cursor field in the comment data
Path example: $.data.postInfoById.commentForest.trees[*].more.cursor
Cursor format is similar to: "commenttree:ex:(RjiJd"

<div className="inline-flex items-center gap-2 px-4 py-2 bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg">
  <span className="text-base">🪙</span>
  <span className="text-sm font-medium text-yellow-900 dark:text-yellow-100"><span className="font-semibold">1 credit</span><span className="text-yellow-700 dark:text-yellow-300 ml-1">per request</span></span>
</div>

## Copy for AI

<div className="my-6 rounded-xl border border-gray-200 bg-gray-50 p-5 dark:border-gray-800 dark:bg-gray-900/40">
  <div className="min-w-0">
    <p className="text-base font-semibold text-gray-900 dark:text-gray-100">🤖 Why Code When AI Can Do It For You?</p>
    <p className="mt-1 text-sm text-gray-700 dark:text-gray-300">Stop writing code like it's 1970! Let AI do the heavy lifting - click the sparkles to copy a perfectly formatted prompt for ChatGPT, Claude, or your favorite AI assistant.</p>
  </div>

  <div className="mt-4">
    <button
      type="button"
      className="inline-flex items-center gap-2 rounded-md border border-emerald-300 bg-emerald-50 px-3 py-2 text-sm font-medium text-emerald-800 hover:bg-emerald-100 dark:border-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-100 dark:hover:bg-emerald-900/50"
      onClick={() => navigator.clipboard.writeText(`I want to make an API call to https://api.keyapi.ai/v1/reddit/fetch_comment_replies.

Please help me write code to make this API call and handle the response appropriately. Include error handling and best practices.

Here are the details:

Endpoint: GET https://api.keyapi.ai/v1/reddit/fetch_comment_replies

Description: Get replies (second-level comments / sub-comments) under a specified comment on Reddit APP
When a comment node has a more.cursor field, use this API to fetch the sub-comments of that comment

Steps:
1. First call fetch_post_comments to get the top-level comments of a post
2. Find the node with sub-comments in the returned data (childCount > 0)
3. Get the more.cursor value of that node
4. Use that cursor to call this API to get sub-comments

Note:
The cursor value comes from the more.cursor field in the comment data
Path example: $.data.postInfoById.commentForest.trees[*].more.cursor
Cursor format is similar to: "commenttree:ex:(RjiJd"

Required Headers:
--header 'Authorization: Bearer <YOUR_API_KEY>'

Parameters:
- post_id (Required): Post ID, format: "t3_XXXXXX". Example: t3_1qmup73
- cursor (Required): Comment cursor, obtained from the more.cursor field in the comment data, format: "commenttree:ex:(xxx)". Example: commenttree:ex:(RjiJd
- sort_type (Optional): Sort order, default is CONFIDENCE
Options: CONFIDENCE, NEW, TOP, HOT, CONTROVERSIAL, OLD, RANDOM. Example: CONFIDENCE
- need_format (Optional): Whether to clean/sanitize the data. Example: false

Example Response:
{
"code": 0,
"message": "success",
"data": {
"postInfoById": {
  "__typename": "SubredditPost",
  "id": "t3_1ojnvca",
  "title": "Official photo of Trump-Xi meeting in Busan, South Korea",
  "subreddit": {
    "id": "t5_2qh0u",
    "name": "pics",
    "prefixedName": "r/pics",
    "moderation": {
      "isShowCommentRemovalReasonPrompt": true
    },
    "allowedMediaInComments": [
      "GIPHY",
      "STATIC",
      "EXPRESSION"
    ],
    "isQuarantined": false,
    "tippingStatus": null
  },
  "commentForest": {
    "__typename": "CommentForest",
    "trees": [
      {
        "depth": 0,
        "more": null,
        "parentId": null,
        "node": {
          "__typename": "Comment",
          "id": "t1_nm4g5sx",
          "createdAt": "2025-10-30T02:17:24.998000+0000",
          "editedAt": null,
          "isAdminTakedown": false,
          "isRemoved": false,
          "removedByCategory": null,
          "isLocked": false,
          "isGildable": true,
          "isInitiallyCollapsed": true,
          "initiallyCollapsedReason": "STICKY_AUTOMOD",
          "content": {
            "__typename": "Content",
            "markdown": "It looks like this post is about Politics. Various methods of filtering out content relating to Politics can be found [here](https://www.reddit.com/r/pics/wiki/v2/resource
... (truncated)`)}
    >
      <span>✨</span>
      <span>Copy for AI</span>
    </button>
  </div>
</div>


## OpenAPI

````yaml en/reddit.openapi.json GET /v1/reddit/fetch_comment_replies
openapi: 3.0.1
info:
  title: Reddit API english documentation
  description: >-
    The english reference documentation of the Reddit API includes the
    interface's purpose, parameter description, response status, and sample
    structure.
  version: 1.0.0
servers:
  - url: https://api.keyapi.ai
    description: Production
security:
  - JWT Bearer: []
tags: []
paths:
  /v1/reddit/fetch_comment_replies:
    get:
      tags: []
      summary: Fetch Reddit APP Comment Replies (Sub-comments)
      description: >-
        Get replies (second-level comments / sub-comments) under a specified
        comment on Reddit APP

        When a comment node has a more.cursor field, use this API to fetch the
        sub-comments of that comment


        Steps:

        1. First call fetch_post_comments to get the top-level comments of a
        post

        2. Find the node with sub-comments in the returned data (childCount > 0)

        3. Get the more.cursor value of that node

        4. Use that cursor to call this API to get sub-comments


        Note:

        The cursor value comes from the more.cursor field in the comment data

        Path example: $.data.postInfoById.commentForest.trees[*].more.cursor

        Cursor format is similar to: "commenttree:ex:(RjiJd"
      parameters:
        - name: post_id
          in: query
          description: 'Post ID, format: "t3_XXXXXX"'
          required: true
          example: t3_1qmup73
          schema:
            type: string
        - name: cursor
          in: query
          description: >-
            Comment cursor, obtained from the more.cursor field in the comment
            data, format: "commenttree:ex:(xxx)"
          required: true
          example: commenttree:ex:(RjiJd
          schema:
            type: string
            example: commenttree:ex:(RjiJd
        - name: sort_type
          in: query
          description: |-
            Sort order, default is CONFIDENCE
            Options: CONFIDENCE, NEW, TOP, HOT, CONTROVERSIAL, OLD, RANDOM
          required: false
          example: CONFIDENCE
          schema:
            type: string
            default: CONFIDENCE
        - name: need_format
          in: query
          description: Whether to clean/sanitize the data
          required: false
          example: 'false'
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 0
                message: success
                data:
                  postInfoById:
                    __typename: SubredditPost
                    id: t3_1ojnvca
                    title: Official photo of Trump-Xi meeting in Busan, South Korea
                    subreddit:
                      id: t5_2qh0u
                      name: pics
                      prefixedName: r/pics
                      moderation:
                        isShowCommentRemovalReasonPrompt: true
                      allowedMediaInComments:
                        - GIPHY
                        - STATIC
                        - EXPRESSION
                      isQuarantined: false
                      tippingStatus: null
                    commentForest:
                      __typename: CommentForest
                      trees:
                        - depth: 0
                          more: null
                          parentId: null
                          node:
                            __typename: Comment
                            id: t1_nm4g5sx
                            createdAt: 2025-10-30T02:17:24.998000+0000
                            editedAt: null
                            isAdminTakedown: false
                            isRemoved: false
                            removedByCategory: null
                            isLocked: false
                            isGildable: true
                            isInitiallyCollapsed: true
                            initiallyCollapsedReason: STICKY_AUTOMOD
                            content:
                              __typename: Content
                              markdown: >-
                                It looks like this post is about Politics.
                                Various methods of filtering out content
                                relating to Politics can be found
                                [here](https://www.reddit.com/r/pics/wiki/v2/resources/filter/politics).


                                *I am a bot, and this action was performed
                                automatically. Please [contact the moderators of
                                this subreddit](/message/compose/?to=/r/pics) if
                                you have any questions or concerns.*
                              preview: >-
                                It looks like this post is about Politics.
                                Various methods of filtering out content
                                relating to Politics can be found here. I am a
                                bot, and this action was performed
                                automatically. Please contact the moderators of
                                this subreddit if you have any questions or
                                concerns.
                              richtext: >-
                                {"document":[{"c":[{"e":"text","t":"It looks
                                like this post is about Politics. Various
                                methods of filtering out content relating to
                                Politics can be found
                                "},{"e":"link","t":"here","u":"https://www.reddit.com/r/pics/wiki/v2/resources/filter/politics"},{"e":"text","t":"."}],"e":"par"},{"c":[{"e":"text","f":[[2,0,64]],"t":"I
                                am a bot, and this action was performed
                                automatically. Please
                                "},{"e":"link","f":[[2,0,40]],"t":"contact the
                                moderators of this
                                subreddit","u":"/message/compose/?to=/r/pics"},{"e":"text","f":[[2,0,39]],"t":"
                                if you have any questions or
                                concerns."}],"e":"par"}]}
                              typeHint: TEXT
                              richtextMedia: []
                              translationInfo:
                                isTranslated: false
                                translatedLanguage: null
                            isTranslatable: false
                            languageCode: en
                            authorInfo:
                              __typename: Redditor
                              id: t2_6l4z3
                              name: AutoModerator
                              isBlocked: false
                              isCakeDayNow: false
                              newIcon:
                                __typename: MediaSource
                                url: >-
                                  https://styles.redditmedia.com/t5_1yz875/styles/profileIcon_klqlly9fc4l41.png?s=354f9fde85e0b4ddf82981f04133d48d856ca7d8
                                dimensions:
                                  width: 256
                                  height: 256
                              iconSmall:
                                __typename: MediaSource
                                url: >-
                                  https://styles.redditmedia.com/t5_1yz875/styles/profileIcon_klqlly9fc4l41.png?width=50&height=50&frame=1&auto=webp&crop=50%3A50%2Csmart&s=75d82dd0dc0f698f4c89f5b2b88dc2027d57c0fa
                                dimensions:
                                  width: 50
                                  height: 50
                              snoovatarIcon: null
                              profile:
                                isNsfw: false
                              accountType: USER
                              isPremiumAvatarTreatment: true
                            authorCommunityBadge: null
                            score: 1
                            voteState: NONE
                            authorFlair: null
                            isSaved: false
                            isStickied: true
                            isScoreHidden: true
                            isArchived: false
                            distinguishedAs: MODERATOR
                            permalink: >-
                              /r/pics/comments/1ojnvca/official_photo_of_trumpxi_meeting_in_busan_south/nm4g5sx/
                            modContentDiscussion: null
                            moderationInfo: null
                            isCommercialCommunication: false
                            commentStats: null
                          childCount: 0
                        - depth: 0
                          more: null
                          parentId: null
                          node:
                            __typename: Comment
                            id: t1_nm4jkk6
                            createdAt: 2025-10-30T02:37:01.531000+0000
                            editedAt: null
                            isAdminTakedown: false
                            isRemoved: false
                            removedByCategory: null
                            isLocked: false
                            isGildable: true
                            isInitiallyCollapsed: false
                            initiallyCollapsedReason: null
                            content:
                              __typename: Content
                              markdown: This bitch is melting
                              preview: This bitch is melting
                              richtext: >-
                                {"document":[{"c":[{"e":"text","t":"This bitch
                                is melting"}],"e":"par"}]}
                              typeHint: TEXT
                              richtextMedia: []
                              translationInfo:
                                isTranslated: false
                                translatedLanguage: null
                            isTranslatable: false
                            languageCode: en
                            authorInfo:
                              __typename: Redditor
                              id: t2_1m3v2g9pqs
                              name: eddietheeddie
                              isBlocked: false
                              isCakeDayNow: false
                              newIcon:
                                __typename: MediaSource
                                url: >-
                                  https://preview.redd.it/snoovatar/avatars/bba140a1-10e6-4ac5-9ab3-51503d3527d2-headshot.png?auto=webp&s=25d7ce6eecdbb87b0853fb8fe14d6d6c3a4df9f5
                                dimensions:
                                  width: 256
                                  height: 256
                              iconSmall:
                                __typename: MediaSource
                                url: >-
                                  https://preview.redd.it/snoovatar/avatars/bba140a1-10e6-4ac5-9ab3-51503d3527d2-headshot.png?width=50&height=50&auto=webp&s=c72fcb1dbd61209983461bee73e29b101cee84aa
                                dimensions:
                                  width: 50
                                  height: 50
                              snoovatarIcon:
                                __typename: MediaSource
                                url: >-
                                  https://i.redd.it/snoovatar/avatars/bba140a1-10e6-4ac5-9ab3-51503d3527d2.png
                                dimensions:
                                  width: 380
                                  height: 600
                              profile:
                                isNsfw: false
                              accountType: USER
                              isPremiumAvatarTreatment: false
                            authorCommunityBadge: null
                            score: 4698
                            voteState: NONE
                            authorFlair: null
                            isSaved: false
                            isStickied: false
                            isScoreHidden: false
                            isArchived: false
                            distinguishedAs: null
                            permalink: >-
                              /r/pics/comments/1ojnvca/official_photo_of_trumpxi_meeting_in_busan_south/nm4jkk6/
                            modContentDiscussion: null
                            moderationInfo: null
                            isCommercialCommunication: false
                            commentStats: null
                          childCount: 11
                        - depth: 1
                          more: null
                          parentId: t1_nm4jkk6
                          node:
                            __typename: Comment
                            id: t1_nm4ugib
                            createdAt: 2025-10-30T03:46:42.342000+0000
                            editedAt: 2025-10-31T04:59:45.702000+0000
                            isAdminTakedown: false
                            isRemoved: false
                            removedByCategory: null
                            isLocked: false
                            isGildable: true
                            isInitiallyCollapsed: false
                            initiallyCollapsedReason: null
                            content:
                              __typename: Content
                              markdown: >-
                                ![gif](giphy|GCkHxV0XSKjf2)


                                Holy Shrimp over 195k people saw this
                                gif/comment????
                              preview: >-
                                Holy Shrimp over 195k people saw this
                                gif/comment????
                              richtext: >-
                                {"document":[{"c":[{"e":"gif","id":"giphy|GCkHxV0XSKjf2"}],"e":"par"},{"c":[{"e":"text","t":"Holy
                                Shrimp over 195k people saw this
                                gif/comment????"}],"e":"par"}]}
                              typeHint: RTJSON
                              richtextMedia:
                                - __typename: ImageAsset
                                  id: giphy|GCkHxV0XSKjf2
                                  userId: null
                                  mimetype: image/gif
                                  width: 266
                                  height: 200
                                  status: VALID
                                  url: >-
                                    https://external-preview.redd.it/1fRn1DPbNnOwcehc-7mq9oaWrAznVgLKbIwFJKjz_W8.gif?auto=webp&s=07bce103588c17b8b752ac33753d4d0238e43e3f
                                  small:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/1fRn1DPbNnOwcehc-7mq9oaWrAznVgLKbIwFJKjz_W8.gif?width=108&auto=webp&s=5ad5c105acfdf675b80a342b3f0849761acf7531
                                    dimensions:
                                      width: 108
                                      height: 81
                                  medium:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/1fRn1DPbNnOwcehc-7mq9oaWrAznVgLKbIwFJKjz_W8.gif?width=216&auto=webp&s=6f29b3d4e5ec0ffc53f514215687da5d81d9ecd2
                                    dimensions:
                                      width: 216
                                      height: 162
                                  large: null
                                  xlarge: null
                                  xxlarge: null
                                  xxxlarge: null
                                  obfuscated_small: null
                                  obfuscated_medium: null
                                  obfuscated_large: null
                                  obfuscated_xlarge: null
                                  obfuscated_xxlarge: null
                                  obfuscated_xxxlarge: null
                              translationInfo:
                                isTranslated: false
                                translatedLanguage: null
                            isTranslatable: false
                            languageCode: en
                            authorInfo:
                              __typename: Redditor
                              id: t2_z1uiu
                              name: SpeedBlitzX
                              isBlocked: false
                              isCakeDayNow: false
                              newIcon:
                                __typename: MediaSource
                                url: >-
                                  https://styles.redditmedia.com/t5_bs271/styles/profileIcon_snooec0133dd-3f43-4d38-8006-402176562809-headshot-f.png?s=f3690a4d467001d88e6a25c6ad42b8737e3ce22d
                                dimensions:
                                  width: 256
                                  height: 256
                              iconSmall:
                                __typename: MediaSource
                                url: >-
                                  https://styles.redditmedia.com/t5_bs271/styles/profileIcon_snooec0133dd-3f43-4d38-8006-402176562809-headshot-f.png?width=50&height=50&frame=1&auto=webp&crop=50%3A50%2Csmart&s=500dde32eab9c5f6142e0fb0c0a15f5ade86a27c
                                dimensions:
                                  width: 50
                                  height: 50
                              snoovatarIcon:
                                __typename: MediaSource
                                url: >-
                                  https://i.redd.it/snoovatar/avatars/ec0133dd-3f43-4d38-8006-402176562809.png
                                dimensions:
                                  width: 380
                                  height: 600
                              profile:
                                isNsfw: false
                              accountType: USER
                              isPremiumAvatarTreatment: false
                            authorCommunityBadge: null
                            score: 916
                            voteState: NONE
                            authorFlair: null
                            isSaved: false
                            isStickied: false
                            isScoreHidden: false
                            isArchived: false
                            distinguishedAs: null
                            permalink: >-
                              /r/pics/comments/1ojnvca/official_photo_of_trumpxi_meeting_in_busan_south/nm4ugib/
                            modContentDiscussion: null
                            moderationInfo: null
                            isCommercialCommunication: false
                            commentStats: null
                          childCount: 2
                        - depth: 2
                          more:
                            count: 2
                            cursor: commenttree:5a19c0ce,::d1:t1_nm4ugib
                            isTooDeepForCount: false
                          parentId: t1_nm4ugib
                          node: null
                          childCount: 2
                        - depth: 1
                          more: null
                          parentId: t1_nm4jkk6
                          node:
                            __typename: Comment
                            id: t1_nm4rdh0
                            createdAt: 2025-10-30T03:25:26.226000+0000
                            editedAt: null
                            isAdminTakedown: false
                            isRemoved: false
                            removedByCategory: null
                            isLocked: false
                            isGildable: true
                            isInitiallyCollapsed: false
                            initiallyCollapsedReason: null
                            content:
                              __typename: Content
                              markdown: LOL
                              preview: LOL
                              richtext: >-
                                {"document":[{"c":[{"e":"text","t":"LOL"}],"e":"par"}]}
                              typeHint: TEXT
                              richtextMedia: []
                              translationInfo:
                                isTranslated: false
                                translatedLanguage: null
                            isTranslatable: false
                            languageCode: und
                            authorInfo:
                              __typename: Redditor
                              id: t2_w3ug8fo7
                              name: Benromaniac
                              isBlocked: false
                              isCakeDayNow: false
                              newIcon:
                                __typename: MediaSource
                                url: >-
                                  https://www.redditstatic.com/avatars/defaults/v2/avatar_default_7.png
                                dimensions:
                                  width: 256
                                  height: 256
                              iconSmall:
                                __typename: MediaSource
                                url: >-
                                  https://www.redditstatic.com/avatars/defaults/v2/avatar_default_7.png
                                dimensions:
                                  width: 256
                                  height: 256
                              snoovatarIcon: null
                              profile:
                                isNsfw: false
                              accountType: USER
                              isPremiumAvatarTreatment: false
                            authorCommunityBadge: null
                            score: 51
                            voteState: NONE
                            authorFlair: null
                            isSaved: false
                            isStickied: false
                            isScoreHidden: false
                            isArchived: false
                            distinguishedAs: null
                            permalink: >-
                              /r/pics/comments/1ojnvca/official_photo_of_trumpxi_meeting_in_busan_south/nm4rdh0/
                            modContentDiscussion: null
                            moderationInfo: null
                            isCommercialCommunication: false
                            commentStats: null
                          childCount: 0
                        - depth: 1
                          more: null
                          parentId: t1_nm4jkk6
                          node:
                            __typename: Comment
                            id: t1_nm5bykg
                            createdAt: 2025-10-30T06:16:38.091000+0000
                            editedAt: null
                            isAdminTakedown: false
                            isRemoved: false
                            removedByCategory: null
                            isLocked: false
                            isGildable: true
                            isInitiallyCollapsed: false
                            initiallyCollapsedReason: null
                            content:
                              __typename: Content
                              markdown: '![gif](giphy|SNuaWp9sCuirJURRhd|downsized)'
                              preview: ''
                              richtext: >-
                                {"document":[{"c":[{"e":"gif","id":"giphy|SNuaWp9sCuirJURRhd|downsized"}],"e":"par"}]}
                              typeHint: RTJSON
                              richtextMedia:
                                - __typename: ImageAsset
                                  id: giphy|SNuaWp9sCuirJURRhd|downsized
                                  userId: null
                                  mimetype: image/gif
                                  width: 480
                                  height: 480
                                  status: VALID
                                  url: >-
                                    https://external-preview.redd.it/Zp9ULW_f8jv-PMdWY7ehc88_dm0DbogE9nQ15ohIAzo.gif?auto=webp&s=3cbd71250d2a762605a4ce54b6dc532ba04b3ad5
                                  small:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/Zp9ULW_f8jv-PMdWY7ehc88_dm0DbogE9nQ15ohIAzo.gif?width=108&auto=webp&s=ea244a4488eaa703b4158e0fd8f6cf326ab2aba0
                                    dimensions:
                                      width: 108
                                      height: 108
                                  medium:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/Zp9ULW_f8jv-PMdWY7ehc88_dm0DbogE9nQ15ohIAzo.gif?width=216&auto=webp&s=e66f85687a355ae811e2d9cc6cadf8da62f3fac6
                                    dimensions:
                                      width: 216
                                      height: 216
                                  large:
                                    __typename: MediaSource
                                    url: >-
                                      https://external-preview.redd.it/Zp9ULW_f8jv-PMdWY7ehc88_dm0DbogE9nQ15ohIAzo.gif?width=320&auto=webp&s=fe7c20b5edb09b14bbc3ee9afb56bfa3b795781a
                                    dimensions:
                                      width: 320
                                      height: 320
                                  xlarge: null
                                  xxlarge: null
                                  xxxlarge: null
                                  obfuscated_small: null
                                  obfuscated_medium: null
                                  obfuscated_large: null
                                  obfuscated_xlarge: null
                                  obfuscated_xxlarge: null
                                  obfuscated_xxxlarge: null
                              translationInfo:
                                isTranslated: false
                                translatedLanguage: null
                            isTranslatable: false
                            languageCode: und
                            authorInfo:
                              __typename: Redditor
                              id: t2_1c2bkyx6ay
                              name: mortgage_queen
                              isBlocked: false
                              isCakeDayNow: false
                              newIcon:
                                __typename: MediaSource
                                url: >-
                                  https://preview.redd.it/snoovatar/avatars/14bc7f7b-f509-47e9-8214-097cd9057654-headshot.png?auto=webp&s=3c3e4079d6ce02dff2acf5ddb6d79216aacc5817
                                dimensions:
                                  width: 256
                                  height: 256
                              iconSmall:
                                __typename: MediaSource
                                url: >-
                                  https://preview.redd.it/snoovatar/avatars/14bc7f7b-f509-47e9-8214-097cd9057654-headshot.png?width=50&height=50&auto=webp&s=16e2c7cb91ccc9dded26524d9037a709742e4b61
                                dimensions:
                                  width: 50
                                  height: 50
                              snoovatarIcon:
                                __typename: MediaSource
                                url: >-
                                  https://i.redd.it/snoovatar/avatars/14bc7f7b-f509-47e9-8214-097cd9057654.png
                                dimensions:
                                  width: 380
                                  height: 600
                              profile:
                                isNsfw: false
                              accountType: USER
                              isPremiumAvatarTreatment: false
                            authorCommunityBadge: null
                            score: 8
                            voteState: NONE
                            authorFlair: null
                            isSaved: false
                            isStickied: false
                            isScoreHidden: false
                            isArchived: false
                            distinguishedAs: null
                            permalink: >-
                              /r/pics/comments/1ojnvca/official_photo_of_trumpxi_meeting_in_busan_south/nm5bykg/
                            modContentDiscussion: null
                            moderationInfo: null
                            isCommercialCommunication: false
                            commentStats: null
                          childCount: 0
                        - depth: 1
                          more:
                            count: 6
                            cursor: commenttree:9b834618,::ex:(F18Gg:D:1]B""H2
                            isTooDeepForCount: false
                          parentId: t1_nm4jkk6
                          node: null
                          childCount: 6
                        - depth: 0
                          more: null
                          parentId: null
                          node:
                            __typename: Comment
                            id: t1_nm4h4xx
                            createdAt: 2025-10-30T02:22:55.632000+0000
                            editedAt: null
                            isAdminTakedown: false
                            isRemoved: false
                            removedByCategory: null
                            isLocked: false
                            isGildable: true
                            isInitiallyCollapsed: false
                            initiallyCollapsedReason: null
                            content:
                              __typename: Content
                              markdown: Trump looks stroked out.
                              preview: Trump looks stroked out.
                              richtext: >-
                                {"document":[{"c":[{"e":"text","t":"Trump looks
                                stroked out."}],"e":"par"}]}
                              typeHint: TEXT
                              richtextMedia: []
                              translationInfo:
                                isTranslated: false
                                translatedLanguage: null
                            isTranslatable: false
                            languageCode: en
                            authorInfo:
                              __typename: Redditor
                              id: t2_57zro69n
                              name: wabashcanonball
                              isBlocked: false
                              isCakeDayNow: false
                              newIcon:
                                __typename: MediaSource
                                url: >-
                                  https://preview.redd.it/snoovatar/avatars/nftv2_bmZ0X2VpcDE1NToxMzdfYzhkM2EzYTgzYmRlNWRhZDA2ZDQzNjY5NGUzZTIyYWMzZTY0ZDU3N18yMjE2MjU_rare_c574ac4e-2f6c-4a2c-9a8f-8baabd48b355-headshot.png?auto=webp&s=9aa7cd52121bd39a4ce992dbf252c607524729b3
                                dimensions:
                                  width: 256
                                  height: 256
                              iconSmall:
                                __typename: MediaSource
                                url: >-
                                  https://preview.redd.it/snoovatar/avatars/nftv2_bmZ0X2VpcDE1NToxMzdfYzhkM2EzYTgzYmRlNWRhZDA2ZDQzNjY5NGUzZTIyYWMzZTY0ZDU3N18yMjE2MjU_rare_c574ac4e-2f6c-4a2c-9a8f-8baabd48b355-headshot.png?width=50&height=50&auto=webp&s=32ada3711ebd6891a7d54bc99fca416b1665dca5
                                dimensions:
                                  width: 50
                                  height: 50
                              snoovatarIcon:
                                __typename: MediaSource
                                url: >-
                                  https://i.redd.it/snoovatar/avatars/nftv2_bmZ0X2VpcDE1NToxMzdfYzhkM2EzYTgzYmRlNWRhZDA2ZDQzNjY5NGUzZTIyYWMzZTY0ZDU3N18yMjE2MjU_rare_c574ac4e-2f6c-4a2c-9a8f-8baabd48b355.png
                                dimensions:
                                  width: 380
                                  height: 600
                              profile:
                                isNsfw: false
                              accountType: USER
                              isPremiumAvatarTreatment: false
                            authorCommunityBadge: null
                            score: 14046
                            voteState: NONE
                            authorFlair: null
                            isSaved: false
                            isStickied: false
                            isScoreHidden: false
                            isArchived: false
                            distinguishedAs: null
                            permalink: >-
                              /r/pics/comments/1ojnvca/official_photo_of_trumpxi_meeting_in_busan_south/nm4h4xx/
                            modContentDiscussion: null
                            moderationInfo: null
                            isCommercialCommunication: false
                            commentStats: null
                          childCount: 337
                        - depth: 1
                          more: null
                          parentId: t1_nm4h4xx
                          node:
                            __typename: Comment
                            id: t1_nm4k1zj
                            createdAt: 2025-10-30T02:39:52.096000+0000
                            editedAt: null
                            isAdminTakedown: false
                            isRemoved: false
                            removedByCategory: null
                            isLocked: false
                            isGildable: true
                            isInitiallyCollapsed: false
                            initiallyCollapsedReason: null
                            content:
                              __typename: Content
                              markdown: Only because of all of the strokes.
                              preview: Only because of all of the strokes.
                              richtext: >-
                                {"document":[{"c":[{"e":"text","t":"Only because
                                of all of the strokes."}],"e":"par"}]}
                              typeHint: TEXT
                              richtextMedia: []
                              translationInfo:
                                isTranslated: false
                                translatedLanguage: null
                            isTranslatable: false
                            languageCode: en
                            authorInfo:
                              __typename: Redditor
                              id: t2_4cg40
                              name: jpiro
                              isBlocked: false
                              isCakeDayNow: false
                              newIcon:
                                __typename: MediaSource
                                url: >-
                                  https://styles.redditmedia.com/t5_20ttn9/styles/profileIcon_snoo4eb48f15-7011-4d0e-80ee-0a963e17abdf-headshot.png?s=551805c360d3bb43634aa29ea147c6ef44589b81
                                dimensions:
                                  width: 256
                                  height: 256
                              iconSmall:
                                __typename: MediaSource
                                url: >-
                                  https://styles.redditmedia.com/t5_20ttn9/styles/profileIcon_snoo4eb48f15-7011-4d0e-80ee-0a963e17abdf-headshot.png?width=50&height=50&frame=1&auto=webp&crop=50%3A50%2Csmart&s=6fa172e2af95511b178e8dc364dfbf53d0286a93
                                dimensions:
                                  width: 50
                                  height: 50
                              snoovatarIcon:
                                __typename: MediaSource
                                url: >-
                                  https://i.redd.it/snoovatar/avatars/4eb48f15-7011-4d0e-80ee-0a963e17abdf.png
                                dimensions:
                                  width: 380
                                  height: 600
                              profile:
                                isNsfw: false
                              accountType: USER
                              isPremiumAvatarTreatment: false
                            authorCommunityBadge: null
                            score: 5870
                            voteState: NONE
                            authorFlair: null
                            isSaved: false
                            isStickied: false
                            isScoreHidden: false
                            isArchived: false
                            distinguishedAs: null
                            permalink: >-
                              /r/pics/comments/1ojnvca/official_photo_of_trumpxi_meeting_in_busan_south/nm4k1zj/
                            modContentDiscussion: null
                            moderationInfo: null
                            isCommercialCommunication: false
                            commentStats: null
                          childCount: 98
                        - depth: 2
                          more: null
                          parentId: t1_nm4k1zj
                          node:
                            __typename: Comment
                            id: t1_nm4l308
                            createdAt: 2025-10-30T02:45:57.143000+0000
                            editedAt: null
                            isAdminTakedown: false
                            isRemoved: false
                            removedByCategory: null
                            isLocked: false
                            isGildable: true
                            isInitiallyCollapsed: false
                            initiallyCollapsedReason: null
                            content:
                              __typename: Content
                              markdown: >-
                                The medical kind, not the Epstein kind. But
                                also: release the Epstein files
                              preview: >-
                                The medical kind, not the Epstein kind. But
                                also: release the Epstein files
                              richtext: >-
                                {"document":[{"c":[{"e":"text","t":"The medical
                                kind, not the Epstein kind. But also: release
                                the Epstein files"}],"e":"par"}]}
                              typeHint: TEXT
                              richtextMedia: []
                              translationInfo:
                                isTranslated: false
                                translatedLanguage: null
                            isTranslatable: false
                            languageCode: en
                            authorInfo:
                              __typename: Redditor
                              id: t2_trrmrr1x
                              name: BaggyLarjjj
                              isBlocked: false
                              isCakeDayNow: false
                              newIcon:
                                __typename: MediaSource
                                url: >-
                                  https://www.redditstatic.com/avatars/defaults/v2/avatar_default_5.png
                                dimensions:
                                  width: 256
                                  height: 256
                              iconSmall:
                                __typename: MediaSource
                                url: >-
                                  https://www.redditstatic.com/avatars/defaults/v2/avatar_default_5.png
                                dimensions:
                                  width: 256
                                  height: 256
                              snoovatarIcon: null
                              profile:
                                isNsfw: false
                              accountType: USER
                              isPremiumAvatarTreatment: false
                            authorCommunityBadge: null
                            score: 2172
                            voteState: NONE
                            authorFlair: null
                            isSaved: false
                            isStickied: false
                            isScoreHidden: false
                            isArchived: false
                            distinguishedAs: null
                            permalink: >-
                              /r/pics/comments/1ojnvca/official_photo_of_trumpxi_meeting_in_busan_south/nm4l308/
                            modContentDiscussion: null
                            moderationInfo: null
                            isCommercialCommunication: false
                            commentStats: null
                          childCount: 72
                        - depth: 3
                          more:
                            count: 72
                            cursor: commenttree:548c9596,::d1:t1_nm4l308
                            isTooDeepForCount: false
                          parentId: t1_nm4l308
                          node: null
                          childCount: 72
                        - depth: 2
                          more:
                            count: 25
                            cursor: commenttree:24258be0,::ex:(F0tMo
                            isTooDeepForCount: false
                          parentId: t1_nm4k1zj
                          node: null
                          childCount: 25
                        - depth: 1
                          more:
                            count: 238
                            cursor: commenttree:5047e3ce,::ex:(F0nwz
                            isTooDeepForCount: false
                          parentId: t1_nm4h4xx
                          node: null
                          childCount: 238
                        - depth: 0
                          more:
                            count: 2858
                            cursor: commenttree:a013aefe,::ex:(F0YwI:C:&9a.-!
                            isTooDeepForCount: false
                          parentId: null
                          node: null
                          childCount: 2858
                      pageInfo:
                        commentCount: 3209
                        hasNextPage: true
                    commentCount: 1919
                requestId: daa4cfe2-ba29-418b-b26c-58625bb5ad39
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 400
                  data: null
                  message: 'Missing required parameter: handle'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 401
                  data: null
                  message: apiKey is null
        '402':
          description: Payment Required
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 402
                  data: null
                  message: apiKey quota is not enough
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 429
                  data: null
                  message: qps limit exceeded
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                example:
                  code: 500
                  data: null
                  message: Internal server error
      deprecated: false
      security:
        - JWT Bearer: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: |-
            curl --request GET \
              --url 'https://api.keyapi.ai/v1/reddit/fetch_comment_replies?post_id=t3_1qmup73&cursor=commenttree%3Aex%3A%28RjiJd&sort_type=CONFIDENCE&need_format=false' \
              --header 'Authorization: Bearer <YOUR_API_KEY>'
        - lang: python
          label: Python
          source: |-
            import requests

            response = requests.get(
                'https://api.keyapi.ai/v1/reddit/fetch_comment_replies',
                params={"post_id": "t3_1qmup73", "cursor": "commenttree:ex:(RjiJd", "sort_type": "CONFIDENCE", "need_format": "false"},
                headers={'Authorization': 'Bearer <YOUR_API_KEY>'}
            )
            print(response.json())
        - lang: javascript
          label: JavaScript
          source: >-
            const params = new URLSearchParams({"post_id": "t3_1qmup73",
            "cursor": "commenttree:ex:(RjiJd", "sort_type": "CONFIDENCE",
            "need_format": "false"});


            const response = await
            fetch(`https://api.keyapi.ai/v1/reddit/fetch_comment_replies?${params}`,
            {
              method: 'GET',
              headers: { 'Authorization': 'Bearer <YOUR_API_KEY>' }
            });

            const data = await response.json();

            console.log(data);
components:
  securitySchemes:
    JWT Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |-
        API key for authentication. Format: `sk_live_xxxxxxxxxxxxx`
        Get your API key from the [Dashboard](http://keyapi.ai/app/dashboard).

````