---
title: "Get a Reddit comment tree as a flat list, page by page"
method: GET
path: "/v1/reddit/posts/{id}/comments"
tags: ["Reddit"]
---

# Get a Reddit comment tree as a flat list, page by page

`GET /v1/reddit/posts/{id}/comments`

## Request

- Base URL: `https://api.weirapp.io`
- URL: `https://api.weirapp.io/v1/reddit/posts/{id}/comments`
- Auth: HTTP bearer

A post's comments, flattened depth-first: each carries `depth` (0 is top-level) and
`parentId`, so the tree can be rebuilt. The first page is the thread as Reddit lays it out,
up to `limit` comments and `depth` levels.

Large threads do not fit on one page: Reddit stands in for the rest with "load more"
links, and `meta.moreCount` estimates how many comments sit behind them. Pass
`meta.nextCursor` back to load them, up to 100 per page, until it is null. Later pages
contain only the newly loaded comments, each still carrying its `depth` and `parentId`.

`comment` focuses the thread on one comment, as its permalink does, with `context`
ancestors above it.

## Path parameters

- `id` string, required: Reddit's base-36 post id, without the `t3_` prefix: `1vdo8we` in a post URL.

## Query parameters

- `limit` integer: Comments on the first page; Reddit's own ceiling is 500. Each later page loads up to 100 more of the comments Reddit left behind "load more" links.
- `depth` integer: Reply levels to include; 1 is top-level comments only.
- `sort` 'confidence' | 'top' | 'new' | 'controversial' | 'old' | 'random' | 'qa' | 'live': `confidence` is Reddit's "best"; `new` puts the latest first.
- `comment` string: Focus on one comment (its id, without `t1_`): returns it, up to `context` of its ancestors, and its replies — the view a comment's permalink opens.
- `context` integer, nullable: Ancestors to include above `comment`. Default 3.
- `cursor` string: `meta.nextCursor` from the previous page, unchanged. Opaque, signed, and bound to the other parameters: change any of them and start again without a cursor.

## Response `200`

Comments ordered by Reddit with depth and parent IDs.

- object
  - `data` object[], required
    - `id` string, required: Reddit's base-36 comment id, without the `t1_` prefix.
    - `postId` string, required: The post this comment belongs to, without `t3_`.
    - `parentId` string, required: The comment or post this replies to.
    - `author` string, required: Username without the `u/` prefix. `[deleted]` if removed.
    - `body` string, required: Markdown. `[removed]` or `[deleted]` once taken down.
    - `score` integer, required
    - `permalink` string, required: Absolute URL of the comment.
    - `createdUtc` number, required
    - `createdAt` string, date-time, required
    - `subreddit` string, required: Community name without the `r/` prefix.
    - `isSubmitter` boolean, required: The commenter is the post's author (OP).
    - `edited` number, nullable, required: When the comment was last edited, in epoch seconds. Null if it never was.
    - `distinguished` string, nullable, required: `moderator` or `admin` when posted in an official capacity; otherwise null.
    - `stickied` boolean, required: Pinned under the post by a moderator.
    - `scoreHidden` boolean, required: Reddit is hiding this comment's score for now; `score` means nothing while true.
    - `depth` integer, required: 0 for a top-level comment.
  - `meta` object, required
    - `requestId` string, required
    - `nextCursor` string, nullable
    - `moreCount` integer, required: Reddit's estimate of the comments not loaded yet. 0 once `nextCursor` is null.
    - `focalCommentId` string: The comment the thread is focused on, when `comment` was given.

## Other responses

- `400`: The request failed validation.
- `401`: The API key is missing, malformed, expired, or revoked.
- `402`: The account is out of credit. Not retryable: this cannot clear until the billing period resets or the plan changes.
- `403`: The API key does not carry the scope this route requires.
- `404`: The requested resource does not exist.
- `429`: The per-minute rate limit is exhausted. Retryable: wait for Retry-After and try again.
- `500`: An unexpected error occurred.
- `503`: The source is temporarily unavailable. The request is safe to retry.

---

[API](https://skmtc.dev/weirapp/apis/weir-api.md) · [All operations](https://skmtc.dev/weirapp/apis/weir-api/llms.txt) · [OpenAPI document](https://skmtc.dev/weirapp/apis/weir-api/revisions/4c6a9ae0bfca?raw)
