Back to Reddit
Apify·Reddit

List Reddit Comments

/crawlerbros/reddit-comment-scraperasync$0.012495 / result

Scrape Reddit Comments from a post on Reddit. Provides comment text, the parent of the thread, score and timestamps. Runs as an Apify actor (20–120 s); results are dataset rows.

Charged per returned row plus the flat fee.

Input
FieldTypeRequiredDescription
postUrlsarrayyesPost URLs, comment URLs, share links or bare post IDs. Accepted forms: full post URL (https://www.reddit.com/r/x/comments/1abc/title/), short URL (https://www.reddit.com/comments/1abc or with ?sort=top), comment URL (.../comments/1abc/title/comment/xyz/), mobile share link (https://www.reddit.com/r/
maxCommentsintegerMaximum number of comments to scrape from each post (including nested replies). (default 100)
commentSortstring (confidence, top, new, controversial, old, qa)How to sort the comment threads. (default "confidence")
includePostbooleanWhen enabled, the parent post is emitted as the first record of each thread (full post data included). (default false)
postedAfterstringOnly keep comments created on or after this date (UTC).
postedBeforestringOnly keep comments created on or before this date (interpreted as the end of that day, UTC).
minDepthintegerOnly keep comments nested at or deeper than this depth (0 = keep everything, 1 = drop top-level comments and keep only replies, 2 = keep only replies-to-replies and deeper, etc.). Leave empty for no limit.
maxDepthintegerOnly keep comments nested at or above this depth (0 = top-level comments only, 1 = top-level + first-level replies, etc.). Leave empty for no limit.
minCommentScoreintegerOnly keep comments with a score (upvotes minus downvotes) at or above this value. Leave empty for no limit.
maxCommentScoreintegerOnly keep comments with a score (upvotes minus downvotes) at or below this value. Leave empty for no limit.
onlyOPbooleanWhen enabled, only comments written by the post's original author are kept. (default false)
excludeDeletedRemovedbooleanWhen enabled, comments whose body or author show as [deleted] or [removed] are dropped (no real content left to scrape). (default false)
excludeStickiedbooleanWhen enabled, moderator-pinned (stickied) comments — e.g. AutoModerator notices — are dropped. (default false)
excludeCollapsedbooleanWhen enabled, comments Reddit collapses by default (low score or crowd control) are dropped. (default false)
distinguishedFilterstring (any, moderator, admin, none)Restrict output to comments with a specific 'distinguished' badge (moderator/admin posting in an official capacity), or only regular (non-distinguished) comments. Leave as 'Any' to keep everyone. (default "any")
authorsarrayOnly keep comments written by these Reddit usernames (case-insensitive). Leave empty to keep comments from all authors.
excludeAuthorsarrayDrop comments written by these Reddit usernames (case-insensitive), e.g. bots like AutoModerator. Leave empty to keep comments from all authors. Applied after `authors` (an author listed in both is excluded).
keywordsarrayOnly keep comments whose body contains at least one of these keywords or phrases (case-insensitive substring match). Leave empty to keep all comments.
excludeKeywordsarrayDrop comments whose body contains any of these keywords or phrases (case-insensitive substring match), e.g. spam/boilerplate phrases. Applied after `keywords` (a keyword listed in both still excludes the comment). Leave empty to keep all comments.
minAwardsintegerOnly keep comments with at least this many total awards. Leave empty for no limit.
minCommentLengthintegerOnly keep comments whose body text is at least this many characters long. Useful for filtering out one-word/emoji-only noise when building NLP datasets. Leave empty for no limit.
maxCommentLengthintegerOnly keep comments whose body text is at most this many characters long (Reddit's hard cap is 10,000 characters). Leave empty for no limit.
controversialOnlybooleanWhen enabled, only keep comments Reddit flags as controversial (near-even up/downvote split, i.e. `controversiality: 1`). (default false)
focusOnTargetCommentbooleanWhen a `postUrls` item is a specific comment permalink (e.g. .../comments/1abc123/title/comment/xyz987/), only that comment plus its ancestor chain (see `commentContext`) is fetched instead of the full thread. Guarantees the target comment is captured even in huge threads where `maxComments` paginat (default false)
commentContextintegerHow many levels of parent comments above the target comment to include when `focusOnTargetComment` is enabled (matches Reddit's own comment-permalink page). Ignored otherwise. (default 3)

Run it

curl -s https://www.sooma.dev/v1/run \ -H "Authorization: Bearer $SOOMA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"provider":"apify","endpoint":"/crawlerbros/reddit-comment-scraper","input":{"postUrls":["https://www.reddit.com/r/programming/comments/1vqukkf/"]}}'

Or ask your agent: it will call inspect for this schema and run it over MCP.