Back to Reddit
Apify·Reddit
List Reddit Comments
/crawlerbros/reddit-comment-scraperasync$0.012495 / resultScrape 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
| Field | Type | Required | Description |
|---|---|---|---|
| postUrls | array | yes | Post 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/ |
| maxComments | integer | — | Maximum number of comments to scrape from each post (including nested replies). (default 100) |
| commentSort | string (confidence, top, new, controversial, old, qa) | — | How to sort the comment threads. (default "confidence") |
| includePost | boolean | — | When enabled, the parent post is emitted as the first record of each thread (full post data included). (default false) |
| postedAfter | string | — | Only keep comments created on or after this date (UTC). |
| postedBefore | string | — | Only keep comments created on or before this date (interpreted as the end of that day, UTC). |
| minDepth | integer | — | Only 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. |
| maxDepth | integer | — | Only 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. |
| minCommentScore | integer | — | Only keep comments with a score (upvotes minus downvotes) at or above this value. Leave empty for no limit. |
| maxCommentScore | integer | — | Only keep comments with a score (upvotes minus downvotes) at or below this value. Leave empty for no limit. |
| onlyOP | boolean | — | When enabled, only comments written by the post's original author are kept. (default false) |
| excludeDeletedRemoved | boolean | — | When enabled, comments whose body or author show as [deleted] or [removed] are dropped (no real content left to scrape). (default false) |
| excludeStickied | boolean | — | When enabled, moderator-pinned (stickied) comments — e.g. AutoModerator notices — are dropped. (default false) |
| excludeCollapsed | boolean | — | When enabled, comments Reddit collapses by default (low score or crowd control) are dropped. (default false) |
| distinguishedFilter | string (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") |
| authors | array | — | Only keep comments written by these Reddit usernames (case-insensitive). Leave empty to keep comments from all authors. |
| excludeAuthors | array | — | Drop 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). |
| keywords | array | — | Only keep comments whose body contains at least one of these keywords or phrases (case-insensitive substring match). Leave empty to keep all comments. |
| excludeKeywords | array | — | Drop 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. |
| minAwards | integer | — | Only keep comments with at least this many total awards. Leave empty for no limit. |
| minCommentLength | integer | — | Only 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. |
| maxCommentLength | integer | — | Only 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. |
| controversialOnly | boolean | — | When enabled, only keep comments Reddit flags as controversial (near-even up/downvote split, i.e. `controversiality: 1`). (default false) |
| focusOnTargetComment | boolean | — | When 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) |
| commentContext | integer | — | How 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://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.