get_post_comments
Retrieve comments for a specific post using its ID or slug, with options for sorting by date or votes and pagination. Max 20 comments per request.
Instructions
Retrieve comments for a specific post by post ID or slug, with optional sorting and pagination.
Parameters:
- post_id (str, optional): The post's unique ID.
- slug (str, optional): The post's slug.
- order (str, optional): Sorting order. Valid values: NEWEST (default), OLDEST, VOTES.
- count (int, optional): Number of comments to return (default: 10, max: 20).
- after (str, optional): Pagination cursor for next page.
Returns:
- success (bool)
- data (dict): If successful, contains:
- comments (list): List of comment objects (id, content, etc.)
- pagination (dict): { end_cursor, has_next_page }
- error (dict, optional)
- rate_limits (dict)
Notes:
- Returns an error if the post is not found.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
after | No | ||
count | No | ||
order | No | ||
post_id | No | ||
slug | No |
Input Schema (JSON Schema)
{
"properties": {
"after": {
"default": null,
"title": "After",
"type": "string"
},
"count": {
"default": null,
"title": "Count",
"type": "integer"
},
"order": {
"default": null,
"title": "Order",
"type": "string"
},
"post_id": {
"default": null,
"title": "Post Id",
"type": "string"
},
"slug": {
"default": null,
"title": "Slug",
"type": "string"
}
},
"title": "get_post_commentsArguments",
"type": "object"
}