One comment: author, score, upvote ratio, exact replies_count, awards, body, parent id, edit time, flags and the post it belongs to. Give comment_id or a comment url. Billed 1 request per call.
HTTP Request
GET /comment/details
Cost (in requests): 1. Every successful answer reports its cost in data.billed_requests.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
comment_id | string | No | - | Comment id, with or without the t1_ prefix (e.g. c60o0iw). Give this or url. |
url | string | No | - | A Reddit post or comment URL (https://www.reddit.com/r/IAmA/comments/z1c9z/..., redd.it/z1c9z), or the permalink path returned by this API. Alternative to the id. |
with_markdown | boolean | No | false | Adds body_markdown: the author’s original Markdown source, as written. |
include_html | boolean | No | false | Adds body_html (the rendered HTML body) to every post and comment. Default: left out; body_text carries the same text. |
Response
Real response to GET /comment/details?comment_id=t1_19rve4jkai9b4 (arrays trimmed to 2 items, long texts cut with …).
| |
Response Fields
| Field | Type | Description |
|---|---|---|
status | boolean | true when the request succeeded |
request_id | string | Unique request identifier |
data | object | The comment; null with error.code = not_found / deleted. |
data.comment_id | string | Comment fullname, e.g. t1_c60o0iw. |
data.permalink | string | Comment path, e.g. /r/IAmA/comments/z1c9z/comment/c60o0iw/. |
data.post_url | string | Absolute link of the comment on Reddit (https://www.reddit.com + permalink), ready to open. |
data.post_id | string | Post fullname (t3_…). |
data.subreddit | string | Subreddit name without r/; null when this endpoint does not carry it (comment trees: see the post). |
data.subreddit_id | string | Subreddit id (t5_…); null when this endpoint does not carry it. Left out on /user/activity. |
data.parent_id | string | Parent fullname: the parent comment (t1_…), or the post (t3_…) for a top-level comment; null when this endpoint does not carry it. Only with with_details=true on /user/activity. |
data.depth | integer | Nesting level (0 = top-level; negative for ancestors on a context page). Left out on the flat comment lists except /comment/details. |
data.author | string | Username; [deleted] is reported as null with is_author_deleted true. |
data.author_id | string | Author account id (t2_…). |
data.author_avatar_url | string | Author avatar URL. Left out on /user/activity. |
data.author_badge | string / null | Achievement badge shown next to the name, e.g. Top 1% Commenter. Left out on /user/activity. |
data.is_author_nsfw | boolean | The author’s profile is marked 18+; null when this endpoint does not carry it. Left out on the comment trees (/post/comments, /comment/replies) and /user/activity. |
data.author_flair | object / null | Author’s flair in the comment’s community. Left out on the comment trees (/post/comments, /comment/replies); only with with_details=true on /user/activity. |
data.score | integer | Net upvotes; null when Reddit hides the score. |
data.is_score_hidden | boolean | Reddit hides the score (new comment in a sub that delays scores). |
data.created_at | string | ISO-8601 UTC creation time. |
data.edited_at | string / null | ISO-8601 UTC last edit; null when never edited or unknown. Only with with_details=true on /user/activity. |
data.type | string | Kind of comment body: text, image or gif; null when it cannot be told (a GIF or video in a /user/activity comment without with_details). |
data.is_op | boolean | Written by the post author. |
data.distinguished | string / null | moderator or admin when distinguished; else null. |
data.is_stickied | boolean | Pinned at the top of the thread. |
data.is_locked | boolean | Replies locked. Only with with_details=true on /user/activity. |
data.is_collapsed | boolean | Collapsed by default in Reddit’s UI. |
data.is_archived | boolean | Thread archived. |
data.is_deleted | boolean | Deleted by its author (body gone). |
data.is_author_deleted | boolean | The author’s account is deleted (body may remain). |
data.is_removed | boolean | Removed by a moderator (body replaced by Reddit’s notice). |
data.body_text | string | Comment as plain text. |
data.body_media | array | Images and videos embedded in the comment, in order; empty when none or when this endpoint does not carry them. Only with with_details=true on /user/activity. |
data.upvote_ratio | float | Upvote share 0–1, 4 decimals. |
data.billed_requests | integer | Requests billed for this call (also sent as Requests in the X-RapidAPI-Billing header when it is not RapidAPI’s default of 1). |
data.replies_count | integer | Exact number of replies below the comment, all levels. |
data.awards | array | Awards received, one row per award type. |
data.body_markdown | string / null | Markdown source (only with with_markdown=true). |
data.post | object | The post the comment belongs to. |
data.post.post_id | string | Post fullname. |
data.post.title | string | Post title; null when Reddit shows only its removal placeholder. |
data.post.permalink | string | Post path. |
data.post.post_url | string | Absolute link of the post’s Reddit thread (https://www.reddit.com + permalink), ready to open. |
data.post.subreddit | string | Subreddit name. |
data.post.subreddit_weekly_visitors | integer | Weekly visitors of the subreddit (Reddit’s periodic count, not live). |
request_params | object | Echo of the parameters you sent |
Error Responses
Invalid input returns HTTP 400, not billed. error is a plain string that names the parameter:
| |
| Status Code | Cause | Description |
|---|---|---|
| 400 | Invalid or missing parameter | Plain-English message per field. Not billed |
200 with status: false | Item not available | error.code is not_found, deleted. data is null. Billed 1 request |
| 503 | Reddit temporarily unreachable | "error": "Service temporarily unavailable". Not billed, retry later |
Code Examples
| |
| |
| |
Related Endpoints
- Comment Search : Search comments (site-wide or in one subreddit)
- Comment Replies : Replies under one comment
- Comment Parents : Parent chain of a comment