social.coves.community.comment.getComments

coves.social

Documentation

Get comments for a post with threading and sorting support. Supports hot/top/new sorting, configurable nesting depth, and pagination.

main query

Get comments for a post with threading and sorting support. Supports hot/top/new sorting, configurable nesting depth, and pagination.

Parameters

cursor string Optional

Pagination cursor from previous response

depth integer Optional

Maximum reply nesting depth to return. 0 returns only top-level comments.

limit integer Optional

Maximum number of top-level comments to return per page

parentRkey string record-key Optional

Record key of a comment within the post. When provided, the response contains only the subtree rooted at that comment: the comment itself as the sole top-level entry, with its descendants nested beneath it. depth is relative to this comment (0 returns only the comment itself), and limit/cursor paginate its direct replies.

post string at-uri Required

AT-URI of the post to get comments for

sort string Optional

Sort order: hot (trending), top (highest score), new (most recent)

timeframe string Optional

Timeframe for 'top' sort. Ignored for other sort types.

Output

Encodingapplication/json
comments array Required

Top-level comments with nested replies up to requested depth

cursor string Optional

Pagination cursor for fetching next page of top-level comments

Errors

NotFound Post not found
ParentNotFound No comment with the given parentRkey exists within the post
InvalidRequest Invalid parameters (malformed URI, invalid sort/timeframe combination, etc.)
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://api.bsky.social)
Parameters
Pagination cursor from previous response
Maximum reply nesting depth to return. 0 returns only top-level comments.
Maximum number of top-level comments to return per page
Record key of a comment within the post. When provided, the response contains only the subtree rooted at that comment: the comment itself as the sole top-level entry, with its descendants nested beneath it. depth is relative to this comment (0 returns only the comment itself), and limit/cursor paginate its direct replies.
AT-URI of the post to get comments for
Sort order: hot (trending), top (highest score), new (most recent)
Timeframe for 'top' sort. Ignored for other sort types.
View raw schema
{
  "type": "query",
  "errors": [
    {
      "name": "NotFound",
      "description": "Post not found"
    },
    {
      "name": "ParentNotFound",
      "description": "No comment with the given parentRkey exists within the post"
    },
    {
      "name": "InvalidRequest",
      "description": "Invalid parameters (malformed URI, invalid sort/timeframe combination, etc.)"
    }
  ],
  "output": {
    "schema": {
      "type": "object",
      "required": [
        "comments",
        "post"
      ],
      "properties": {
        "post": {
          "ref": "social.coves.community.post.defs#postView",
          "type": "ref",
          "description": "The post these comments belong to"
        },
        "cursor": {
          "type": "string",
          "maxLength": 500,
          "description": "Pagination cursor for fetching next page of top-level comments"
        },
        "comments": {
          "type": "array",
          "items": {
            "ref": "social.coves.community.comment.defs#threadViewComment",
            "type": "ref"
          },
          "description": "Top-level comments with nested replies up to requested depth"
        }
      }
    },
    "encoding": "application/json"
  },
  "parameters": {
    "type": "params",
    "required": [
      "post"
    ],
    "properties": {
      "post": {
        "type": "string",
        "format": "at-uri",
        "description": "AT-URI of the post to get comments for"
      },
      "sort": {
        "type": "string",
        "default": "hot",
        "maxLength": 64,
        "description": "Sort order: hot (trending), top (highest score), new (most recent)",
        "knownValues": [
          "hot",
          "top",
          "new"
        ]
      },
      "depth": {
        "type": "integer",
        "default": 10,
        "maximum": 100,
        "minimum": 0,
        "description": "Maximum reply nesting depth to return. 0 returns only top-level comments."
      },
      "limit": {
        "type": "integer",
        "default": 50,
        "maximum": 100,
        "minimum": 1,
        "description": "Maximum number of top-level comments to return per page"
      },
      "cursor": {
        "type": "string",
        "maxLength": 500,
        "description": "Pagination cursor from previous response"
      },
      "timeframe": {
        "type": "string",
        "maxLength": 64,
        "description": "Timeframe for 'top' sort. Ignored for other sort types.",
        "knownValues": [
          "hour",
          "day",
          "week",
          "month",
          "year",
          "all"
        ]
      },
      "parentRkey": {
        "type": "string",
        "format": "record-key",
        "description": "Record key of a comment within the post. When provided, the response contains only the subtree rooted at that comment: the comment itself as the sole top-level entry, with its descendants nested beneath it. depth is relative to this comment (0 returns only the comment itself), and limit/cursor paginate its direct replies."
      }
    }
  },
  "description": "Get comments for a post with threading and sorting support. Supports hot/top/new sorting, configurable nesting depth, and pagination."
}

Lexicon Garden

@