Reddit

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

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.

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

Path parameters

idstring required

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

Example:1vdo8we

Query parameters

limitinteger

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.

Example:50
depthinteger

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.

commentstring

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.

Example:lqx9zab
contextinteger nullable

Ancestors to include above comment. Default 3.

cursorstring

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

Comments ordered by Reddit with depth and parent IDs.

Changes

No recorded changes to this operation across all 1 revision of this API.