Reddit

Reddit Post Comments

Get the comments on a Reddit post, replies included, by URL or post ID. Comments come in thread order (each followed by its replies), with depth, parent ID, text, author, score, date, permalink and submitter/pinned/edited flags. Sort by top, best, newest, controversial, oldest or Q&A. Up to about 4,000 comments per thread. Supports fetching multiple pages in a single API call (billed per page).

Price: $0.003 per page. Free tier: 50 requests/month.

get/v1/reddit/post/comments

Request

  • Base URL: https://apidirect.io
  • URL: https://apidirect.io/v1/reddit/post/comments
  • Auth: API key in header X-API-Key

Query parameters

urlstring

Reddit post URL, e.g. https://www.reddit.com/r/Python/comments/1wwv97o/my_python_magic_is_gone/ or https://redd.it/1wwv97o (max 500 characters). Provide exactly one of url or post_id.

post_idstring

Reddit post ID, e.g. 1wwv97o (a t3_ prefix is accepted). Provide exactly one of url or post_id.

sort_by'top' | 'best' | 'most_recent' | 'controversial' | 'oldest' | 'qa'

Sort order: top, best (Reddit's default order), most_recent, controversial, oldest, or qa (Q&A) (default: top)

pagesinteger

Number of pages to fetch, 1-80 (default: 1). Each page returns up to 50 comments.

get_sentimentboolean

Set to true to add AI emotion analysis to each comment (returned in the comments array). Adds a sentiment object containing emotions (joy, trust, fear, surprise, sadness, disgust, anger and anticipation, each scored 0-100), dominant_emotion, emotional_intensity (0-10), and polarity (positive, negative or neutral). Any comment that cannot be scored returns sentiment: null.

Response

Successful response

post_idstring nullable
sort_bystring nullable
pagesnumber nullable
countnumber nullable

Changes

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