Posts

Post Comments

Fetch the full comment tree of a post. Name the post by exactly one of permalink, url, post_id or id. A URL is only parsed, never fetched; one on any other host than reddit.com or redd.it is a 400 NOT_A_REDDIT_URL. With none of the four the 400 carries code PERMALINK_REQUIRED and a hint naming them. Cost: $0.0015 per call.

get/api/reddit/comments

Request

  • Base URL: https://api.redditapis.com
  • URL: https://api.redditapis.com/api/reddit/comments
  • Auth: HTTP bearer

Query parameters

permalinkstring

Post permalink (e.g. /r/X/comments/abc/title/). A full Reddit post URL is accepted here too. One of permalink, url, post_id or id is required.

urlstring

A reddit.com, www.reddit.com, old.reddit.com or redd.it post URL (e.g. https://www.reddit.com/r/X/comments/abc/title/ or https://redd.it/abc).

post_idstring

Reddit post id (e.g. 1sgjld3); a t3_ prefix is optional.

idstring

Same as post_id.

limitinteger

Maximum number of top-level comments, 1-500 (default 100). Reddit's own knob on the thread read.

depthinteger

Maximum reply depth to include, 1-10. Absent, Reddit's full tree is returned. depth=1 returns top-level comments only.

sort'confidence' | 'top' | 'new' | 'controversial' | 'old' | 'qa'

Comment ordering: confidence (Reddit's best), top, new, controversial, old or qa. Absent, Reddit's default for the thread.

Response

Successful response.

postobject nullable
commentsobject[]
afterstring nullable
exhausted_reasonstring nullable
listing_statusstring nullable
items_returnedinteger nullable
final_page_itemsinteger nullable
hintstring nullable

Changes

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