social.coves.community.comment.getComments
Get comments for a post with threading and sorting support. Supports hot/top/new sorting, configurable nesting depth, and pagination.
Details · query
| Kind | query |
|---|---|
| Authority | comment.community.coves.social |
| Indexed |
Checks
Valid Lint pass{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Get comments for a post with threading and sorting support. Supports hot/top/new sorting, configurable nesting depth, and pagination.",
"errors": [
{
"description": "Post not found",
"name": "NotFound"
},
{
"description": "No comment with the given parentRkey exists within the post",
"name": "ParentNotFound"
},
{
"description": "Invalid parameters (malformed URI, invalid sort/timeframe combination, etc.)",
"name": "InvalidRequest"
}
],
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"comments": {
"description": "Top-level comments with nested replies up to requested depth",
"items": {
"ref": "social.coves.community.comment.defs#threadViewComment",
"type": "ref"
},
"type": "array"
},
"cursor": {
"description": "Pagination cursor for fetching next page of top-level comments",
"maxLength": 500,
"type": "string"
},
"post": {
"description": "The post these comments belong to",
"ref": "social.coves.community.post.defs#postView",
"type": "ref"
}
},
"required": [
"comments",
"post"
],
"type": "object"
}
},
"parameters": {
"properties": {
"cursor": {
"description": "Pagination cursor from previous response",
"maxLength": 500,
"type": "string"
},
"depth": {
"default": 10,
"description": "Maximum reply nesting depth to return. 0 returns only top-level comments.",
"maximum": 100,
"minimum": 0,
"type": "integer"
},
"limit": {
"default": 50,
"description": "Maximum number of top-level comments to return per page",
"maximum": 100,
"minimum": 1,
"type": "integer"
},
"parentRkey": {
"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.",
"format": "record-key",
"type": "string"
},
"post": {
"description": "AT-URI of the post to get comments for",
"format": "at-uri",
"type": "string"
},
"sort": {
"default": "hot",
"description": "Sort order: hot (trending), top (highest score), new (most recent)",
"knownValues": [
"hot",
"top",
"new"
],
"maxLength": 64,
"type": "string"
},
"timeframe": {
"description": "Timeframe for 'top' sort. Ignored for other sort types.",
"knownValues": [
"hour",
"day",
"week",
"month",
"year",
"all"
],
"maxLength": 64,
"type": "string"
}
},
"required": [
"post"
],
"type": "params"
},
"type": "query"
}
},
"id": "social.coves.community.comment.getComments",
"lexicon": 1
}