KonbiniAPI

Get post comments — Reddit API

Returns top-level comments on a Reddit post, paginated with a cursor. new and old are exact across every page. For best, top and controversial, the first page follows the requested order and later pages continue oldest first, sorted by order within each page, so a comment on page 3 can outrank one on page 2. Deleted or removed comments can make a page shorter than count.

GET/v1/reddit/posts/{postId}/comments1 credit per request
Example response200OK
{
  "data": {
    "@context": [
      "https://www.w3.org/ns/activitystreams#",
      "https://konbiniapi.com/ns/social#"
    ],
    "type": "OrderedCollectionPage",
    "partOf": "https://api.konbiniapi.com/v1/reddit/posts/suvhyq/comments",
    "totalItems": 1309,
    "cursor": null,
    "nextCursor": "eyJhZnRlciI6ImFiYzEyNCIsInNlZW4iOlsiYWJjMTIzIl0sInBhZ2VFbmQiOiJhYmMxMjMiLCJ0b3RhbCI6MTQwfQ",
    "next": "https://api.konbiniapi.com/v1/reddit/posts/suvhyq/comments?cursor=eyJhZnRlciI6ImFiYzEyNCIsInNlZW4iOlsiYWJjMTIzIl0sInBhZ2VFbmQiOiJhYmMxMjMiLCJ0b3RhbCI6MTQwfQ&count=25&order=top",
    "itemCount": 30,
    "orderedItems": [
      {
        "type": "Note",
        "id": "https://www.reddit.com/r/reddit/comments/suvhyq/reddit_community_values/hxcf648/",
        "url": "https://www.reddit.com/r/reddit/comments/suvhyq/reddit_community_values/hxcf648/",
        "entityId": "hxcf648",
        "content": "Hi everyone,\n\nHere is the [Talk](https://www.reddit.com/talk/9acbd3a2-99ef-4820-893f-fcf23ff8a541). I'll do my best to address some of the more nuanced questions live.\n\n(It's our first time using this format, bear with us!)",
        "published": "2022-02-17T19:06:31.000Z",
        "isPinned": true,
        "isSponsored": false,
        "hasReplies": true,
        "likeCount": 1,
        "score": 1,
        "voteCount": 1,
        "isControversial": false,
        "attributedTo": {
          "type": "Person",
          "id": "https://www.reddit.com/user/spez/",
          "url": "https://www.reddit.com/user/spez/",
          "preferredUsername": "spez",
          "name": "spez",
          "isPremium": true,
          "role": "admin",
          "tag": [
            {
              "type": "Tag",
              "name": "reddit",
              "href": "https://www.reddit.com/r/reddit/",
              "icon": {
                "type": "Image",
                "url": "https://external-preview.redd.it/WSqGR2511AQXIN172aycw9idD-3ENHc5hT_1a0M_2UQ.jpg?auto=webp&s=e4d15f89f1797d8111aeddd772534952d0adae50",
                "entityId": "nYKpDhp2hxECJAtPQcH3bEnaXSyk_O8cQKeLCmKEzyw",
                "width": 1536,
                "height": 528
              }
            }
          ]
        },
        "inReplyTo": "https://www.reddit.com/r/reddit/comments/suvhyq/reddit_community_values/",
        "context": {
          "type": "Note",
          "id": "https://www.reddit.com/r/reddit/comments/suvhyq/reddit_community_values/",
          "url": "https://www.reddit.com/r/reddit/comments/suvhyq/reddit_community_values/",
          "name": "Reddit Community Values",
          "attributedTo": {
            "type": "Person",
            "id": "https://www.reddit.com/user/spez/",
            "url": "https://www.reddit.com/user/spez/",
            "preferredUsername": "spez",
            "name": "spez",
            "isPremium": true,
            "role": "admin",
            "tag": [
              {
                "type": "Tag",
                "name": "reddit",
                "href": "https://www.reddit.com/r/reddit/",
                "icon": {
                  "type": "Image",
                  "url": "https://external-preview.redd.it/WSqGR2511AQXIN172aycw9idD-3ENHc5hT_1a0M_2UQ.jpg?auto=webp&s=e4d15f89f1797d8111aeddd772534952d0adae50",
                  "entityId": "nYKpDhp2hxECJAtPQcH3bEnaXSyk_O8cQKeLCmKEzyw",
                  "width": 1536,
                  "height": 528
                }
              }
            ]
          }
        },
        "image": {
          "type": "Image",
          "url": "https://external-preview.redd.it/WSqGR2511AQXIN172aycw9idD-3ENHc5hT_1a0M_2UQ.jpg?auto=webp&s=e4d15f89f1797d8111aeddd772534952d0adae50",
          "entityId": "nYKpDhp2hxECJAtPQcH3bEnaXSyk_O8cQKeLCmKEzyw",
          "width": 1536,
          "height": 528
        },
        "attachment": [
          {
            "type": "Image",
            "url": "https://external-preview.redd.it/WSqGR2511AQXIN172aycw9idD-3ENHc5hT_1a0M_2UQ.jpg?auto=webp&s=e4d15f89f1797d8111aeddd772534952d0adae50",
            "entityId": "nYKpDhp2hxECJAtPQcH3bEnaXSyk_O8cQKeLCmKEzyw",
            "width": 1536,
            "height": 528
          }
        ]
      }
    ]
  }
}

Make the request.

One authenticated GET to /v1/reddit/posts/{postId}/comments. Authentication and error conventions stay consistent across endpoints. This page shows the path, parameters, response shape, limits, and credit rule for this operation.

Built for

  • Sentiment analysis on community reactions to a post
  • Extract discussion threads for NLP training data
  • Monitor comment activity on brand-relevant posts
const response = await fetch("https://api.konbiniapi.com/v1/reddit/posts/suvhyq/comments", {
  headers: { "Authorization": "Bearer YOUR_API_KEY" }
});

const data = await response.json();
Parameters4
  • postIdrequiredIn · PathType · stringReddit post ID (e.g. suvhyq or t3_suvhyq)
  • countIn · QueryType · integerNumber of comments to fetch (maximum: 100)1–100default 25
  • cursorIn · QueryType · stringPagination cursor
  • orderIn · QueryType · stringSort order: best (default), top, new, controversial, old, or qa (Reddit's Q&A sort, used in AMAs)best | top | new | controversial | old | qadefault best

Try it on your own data.

Get a free API key and make this request in minutes. Failed and timed-out requests are automatically refunded.