How do I get the comment thread of a Reddit post?
Call GET /v1/reddit/posts/{id}/comments. The response is the comment tree as Reddit shows it: each comment carries its depth, its parentId, and a replies array with the comments under it. Pick sort=confidence for Reddit’s default order, or top, new, controversial, old, or qa.
The post ID is the t3_ value from a subreddit listing or a search result. If you start from a URL, pass it to the fetch endpoint first and read id from the post it returns.
Checked September 2026 · request and response run against the API · no affiliate links
curl "https://api.openhandle.dev/v1/reddit/posts/synthetic/comments?sort=top" \
-H "Authorization: Bearer $OPENHANDLE_API_KEY"import { OpenHandle } from '@openhandle/sdk';
const openhandle = new OpenHandle({ apiKey: process.env.OPENHANDLE_API_KEY! });
const page = await openhandle.reddit.post('synthetic').comments.list({ sort: 'top' });
const walk = (comments: typeof page.data, indent = '') => {
for (const comment of comments) {
console.log(indent + comment.author?.handle, comment.metrics.score, comment.text);
walk(comment.replies, indent + ' ');
}
};
walk(page.data);{
"platform": "reddit",
"resource": "comment",
"capturedAt": "2026-09-19T09:20:31Z",
"source": "live",
"data": [
{
"id": "t1_reddit1",
"postId": "t3_reddit1",
"parentId": "t3_reddit1",
"depth": 0,
"text": "Synthetic comment",
"author": { "id": "t2_syn0001", "handle": "synthetic_reddit" },
"metrics": { "score": 0 },
"replies": []
}
],
"meta": { "cursors": { "next": null } }
}Trimmed to one top-level comment. Replies nest inside `replies`, each with its own `depth`. The example is a Test post, so you can run it on a free Test key.
Sort orders and what they mean
| sort | What Reddit shows |
|---|---|
confidence | Reddit’s default "best". Weighs score against vote count so a new comment with two upvotes can beat an old one with ten upvotes and eight downvotes. |
top | Highest score first. The usual pick for "what did the room agree with". |
new | Newest first. The pick for monitoring a thread as it grows. |
controversial | Comments with many votes both ways. |
old | Oldest first. Reads the thread in the order it happened. |
qa | Q&A mode. Replies from the post author are lifted, as in an AMA. |
Trees, depth, and limits
- —It is a tree, not a list. Walk
repliesrecursively.depthstarts at 0 for a top-level comment.parentIdis the post for top-level comments and the parent comment below that. - —Reddit caps the tree. A huge thread is not returned whole. Pass
depthto limit how deep the tree goes andlimitto cap comments per level. Reddit itself collapses long threads behind "load more" for the same reason. - —Deleted and removed. A comment the author deleted or a moderator removed shows with no text and no author, as Reddit shows it. The tree keeps its shape so replies under it still make sense.
Let a thread settle
Comments keep arriving for a day or two after a post. Scores keep moving for longer. For a report, read the thread once after 48 hours with sort=top. For monitoring, read with sort=new on a schedule, store each comment id, and skip the ones you have. Store capturedAt with every read. Reddit endpoints are in beta.
When this does not work
These answers are definitive. Store them, do not retry them.
| Situation | Status | Code |
|---|---|---|
| The post was deleted or removed | 404 | POST_NOT_FOUND |
| The subreddit is private, quarantined, or banned | 403 | PROFILE_PRIVATE |
| The identifier is malformed | 400 | INVALID_IDENTIFIER |
{
"error": {
"code": "POST_NOT_FOUND",
"message": "This post was not found.",
"requestId": "req_01j8…",
"retryable": false
}
}A locked or archived post still returns its comments. It just cannot get new ones. Every new workspace starts with 100 free live requests, no card needed.
Read next
More Reddit questions
Send your agent ahead.
Paste the prompt into your agent and it sets everything up. Or come yourself, it takes five minutes.