Reddit Comments Scraper avatar

Reddit Comments Scraper

Pricing

from $5.00 / 1,000 results

Go to Apify Store
Reddit Comments Scraper

Reddit Comments Scraper

Scrape the comments of one or MANY Reddit posts in a single run. Returns text, author, score, timestamps and thread structure (parent/depth), plus the source post itself. No login needed.

Pricing

from $5.00 / 1,000 results

Rating

0.0

(0)

Developer

code craker

code craker

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

2

Monthly active users

38 minutes ago

Last modified

Share

Apify actor that scrapes the comments of one or many Reddit posts in a single run and exports them as structured data — no login, no cookies.

It scrapes the classic old.reddit.com comment pages, which render up to 500 comments in one request and have had stable markup for a decade. (Reddit hard-blocks its public .json endpoints for unauthenticated clients, so those are not usable.)

Pages are fetched over plain HTTP first (fast and cheap); when Reddit fingerprint-blocks that (it does for most proxy exit IPs), the actor automatically escalates to a real Chrome browser for the rest of the run, relaunching on fresh preflighted proxy IPs as needed.

Features

  • Batched: pass many post URLs and they are all scraped in ONE actor run (maxComments applies per post). Results are pushed after each post, so an abort or timeout keeps everything collected so far.
  • Any post reference works: www.reddit.com/r/sub/comments/abc123/slug/, old.reddit links, redd.it/abc123 short links, or a bare post id.
  • Full thread structure: parentCommentId + depth on every comment, or top-level comments only (includeReplies: false).
  • Comment sort control (top, confidence/best, new, controversial, old, qa) — matters when a thread has more comments than maxComments.
  • The source post itself is emitted too (flagged is_source_post: true) with title, selftext, score and comment count; disable with includeSourcePost: false.
  • Deleted/removed comments are skipped (their replies still come through).
  • NSFW interstitial bypassed automatically (over18 cookie).
  • When a run ends with 0 results, the last page fetched is saved as DEBUG_HTML in the run's key-value store.

Input

{
"urls": [
"https://www.reddit.com/r/zimbabwe/comments/1abcd2/econet_results/",
"https://redd.it/1wxyz9"
],
"maxComments": 100,
"commentsSort": "top",
"includeReplies": true,
"includeSourcePost": true,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"],
"apifyProxyCountry": "US"
}
}

startUrls ([{ "url": ... }]) is accepted as an alternative to urls and merged with it. resultsLimit is accepted as an alias for maxComments.

Limit: old.reddit renders at most ~500 comments per page and the deeper "load more comments" stubs require the blocked JSON API, so maxComments caps at 500. With commentsSort: "top" you always get the highest-scored comments first.

Output

One dataset item per comment. Every item carries postId / postName / postUrl / inputUrl, so comments from a multi-post run can always be attributed back to their source post.

{
"id": "mhkp8wz",
"name": "t1_mhkp8wz",
"url": "https://www.reddit.com/r/zimbabwe/comments/1abcd2/econet_results/mhkp8wz/",
"text": "Full text of the comment...",
"author": "some_user",
"authorProfileUrl": "https://www.reddit.com/user/some_user",
"isSubmitter": false,
"subreddit": "zimbabwe",
"score": 42,
"repliesCount": 3,
"gildings": 0,
"stickied": false,
"parentCommentId": null,
"depth": 0,
"created_at": "2026-07-01T10:12:45.000Z",
"createdUtc": 1782900765,
"postId": "1abcd2",
"postName": "t3_1abcd2",
"postUrl": "https://www.reddit.com/r/zimbabwe/comments/1abcd2/econet_results/",
"inputUrl": "https://www.reddit.com/r/zimbabwe/comments/1abcd2/econet_results/",
"commentsSort": "top",
"is_source_post": false
}
  • parentCommentId is null for a top-level comment on the post; otherwise the id of the comment it replies to (same semantics as our Twitter comments actor).
  • score is null while Reddit still hides a fresh comment's score.
  • The source post item has is_source_post: true and the post fields (title, text = selftext, score, numComments, ...).

Integration (scraping-tool)

Batched, like Facebook/TikTok/Twitter comments in scrapeCommentsForPostsBatched. Add a branch to scrapingService.scrapeCommentsBatch:

} else if (actor === 'outspoken_strategy/reddit-comments-scraper') {
delete input.startUrls;
input.urls = urls;
input.maxComments = cappedComments(input.maxComments ?? resultsLimit);
input.includeSourcePost = input.includeSourcePost ?? false;
input.includeReplies = input.includeReplies ?? false; // match FB: top-level only
input.proxyConfiguration = input.proxyConfiguration ?? { useApifyProxy: true, apifyProxyGroups: ['RESIDENTIAL'], apifyProxyCountry: 'US' };
}

Attribution in _matchCommentToPost (platform reddit): match on item.postUrl, item.inputUrl or item.postId — a good _postMatchKey is the post id extracted with /\/comments\/([a-z0-9]+)/i.

Normalization hints: likesCountscore (may be null), repliesCount is already named, createdTimecreated_at, parentCommentId is already named, and author fields are flat (author, authorProfileUrl).

Local development

npm install
echo '{ "urls": ["https://redd.it/1jadp27"], "maxComments": 25, "proxyConfiguration": { "useApifyProxy": false } }' > storage/key_value_stores/default/INPUT.json
npm start

Deploy with apify push.