Reddit Comment & Top Ranking Scraper
Pricing
from $4.99 / 1,000 results
Reddit Comment & Top Ranking Scraper
Automatically extract Reddit comments and replies using Reddit Comments Scraper. Collect comment text, usernames, scores, and timestamps to support sentiment tracking, brand monitoring, and community research.
Pricing
from $4.99 / 1,000 results
Rating
0.0
(0)
Developer
API Empire
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
9 days ago
Last modified
Categories
Share
Reddit Comment Scraper — Extract Comments, Rankings & Karma
Reddit Comment & Top Ranking Scraper extracts comments from one or more Reddit posts — or discovers posts by subreddit, search URL, or keyword — and returns them as ranked, typed JSON. Each row carries the comment text, exact upvote count, a locally computed rank_in_post, a controversy_score, direct-reply counts, and optional author karma/account-age data. Point it at a thread (or a whole subreddit) and get a clean dataset you can sort, merge across posts into a single leaderboard, or feed straight into an LLM pipeline.
What is Reddit Comment & Top Ranking Scraper?
Reddit Comment & Top Ranking Scraper is an Apify Actor that fetches comments from public Reddit threads, normalizes them into flat JSON rows, and ranks them by real upvote count. It can also discover posts on its own (by subreddit, search URL, or keyword), merge the top comments from multiple posts into one cross-post leaderboard, and optionally enrich each commenter with karma and account-age data. No Reddit account, app registration, or OAuth token is required — it only reads publicly accessible pages.
- Scrape ranked comments (including nested replies) from any public Reddit post
- Discover posts automatically from subreddit URLs, search URLs, or a plain keyword
- Merge top comments from multiple posts into a single cross-post leaderboard
- Enrich commenters with karma totals, account age, and trophy list
- Export results as JSON, CSV, or Excel directly from the Actor's dataset
How this Actor reads Reddit (and why it matters)
Reddit exposes several different data surfaces, and they do not all still work:
| Surface | Status (2026) | Used here |
|---|---|---|
Legacy public JSON API (<url>.json) | Blocked — returns HTTP 403 for unauthenticated clients on every IP type | No |
| Official OAuth Data API | Requires app registration, credentials and paid quota tiers | No |
old.reddit.com server-rendered HTML | Working — still served to anonymous browsers | Yes |
/api/morechildren (returns HTML fragments) | Working — used to expand “load more comments” | Yes |
| New Shreddit / GraphQL frontend | JS-rendered, auth-gated | No |
The Actor therefore parses old.reddit.com HTML directly and expands deep comment trees through Reddit's own morechildren endpoint, exactly as a logged-out browser would. Two details are load-bearing and handled automatically:
- Reddit's bot mitigation rejects Chrome/Edge TLS fingerprints with HTTP 403 while accepting Firefox/Safari ones, so requests are made with a Firefox/Safari browser fingerprint via
curl_cffi, never a Chrome one. - NSFW subreddits return an interstitial with zero posts unless the
over18cookie is set, which the Actor sets by default (usesafeSearchto exclude NSFW results from discovery).
If a connection is refused the Actor automatically walks a ladder — your own proxy choice, then a direct connection, then Apify residential / datacenter / static-US proxies — rotating both exit IP and browser fingerprint, and it pins whatever combination first returns genuine Reddit HTML for the rest of the run. Responses that return HTTP 200 but are actually a Reddit block page are detected and rejected rather than parsed as empty results.
What data does Reddit Comment & Top Ranking Scraper collect?
| Data Type | Key Fields | JSON Field Names |
|---|---|---|
| Ranked comments | comment text, exact upvotes, local rank, controversy score, direct replies, timestamps | contentText, upvotes, rank_in_post, controversy_score, reply_count, created_time |
| Nested replies | reply tree embedded per comment, depth-limited | replies[] |
| Cross-post leaderboard | comments merged across all submitted/discovered posts, ranked by upvotes | topCommentsAcrossPosts, rank_overall |
| Author profile data | karma totals, account creation date, trophies, Reddit Premium status | authorProfile.totalKarma, authorProfile.accountCreatedUtc, authorProfile.trophies, authorProfile.isGold |
| Post discovery metadata | how a post was found and its real title | discovered_via, discovered_post_title, post_id |
How does this differ from the official Reddit API?
Reddit's official Data API requires registering an app on Reddit, authenticating with OAuth, and working within Reddit-enforced rate limits — access terms that changed significantly in 2023 when Reddit introduced paid pricing tiers. Reddit Comment & Top Ranking Scraper reads publicly accessible comment pages without any app registration or OAuth token, and adds ranking logic Reddit's API doesn't compute for you.
| Feature | Official Reddit API | Reddit Comment & Top Ranking Scraper |
|---|---|---|
| Authentication | Reddit app registration + OAuth token | None — reads public pages directly |
| Setup process | Register app, request scopes, manage tokens | Paste a URL or keyword, run |
| Ranking | Returns Reddit's own listing order only | Computes rank_in_post and controversy_score locally |
| Multi-post aggregation | Not provided — one thread per call | Optional cross-post leaderboard across all posts |
| Output format | Raw nested Reddit JSON you must parse yourself | Flat, normalized JSON rows with stable field names |
Why do developers and teams scrape Reddit?
For AI engineers and agent builders
Reddit threads are a dense source of real human opinion, which makes ranked comments useful as RAG context or fine-tuning data. Because rank_in_post and controversy_score are computed after all reply batches are merged, you can index only the top N comments per post into a vector store instead of the full unranked thread. The flat JSON output — no HTML, no nested listing structures to unwind — drops straight into an embedding pipeline or an agent's tool-call response.
For marketers and brand teams
Brand and product teams use Reddit to track what real users say outside curated review sites. Running searchQuery or subreddit searchUrls with sinceDate/untilDate lets a team pull comments mentioning a product or competitor from a specific window, then sort by upvotes or controversy_score to surface reactions that actually gained traction. Enabling enableCrossPostRanking turns scattered mentions across several threads into one ranked view.
For researchers and analysts
Researchers use Reddit's public comment history to study community sentiment, discourse patterns, or how discussions evolve. The optional enrichAuthorProfile field adds totalKarma, commentKarma, and accountCreatedUtc per commenter, letting a researcher correlate account age or karma with participation patterns.
For developers building data products
Teams building trend dashboards can schedule this Actor against a fixed list of subreddits or keywords and use the topCommentsAcrossPosts leaderboard as a ready-made "what's rising across these threads right now" feed. Output field names don't change between runs.
How to scrape Reddit (step by step)
- Open Reddit Comment & Top Ranking Scraper on its Apify Store page and click Run.
- Provide input: paste one or more URLs into
redditPostUrls, or leave it empty and usesearchUrls/searchQueryto have the Actor discover posts for you. - Set
sortMode,maxCommentsPerPost,maxReplyDepth, and optionallysinceDate/untilDate. - Start the run — comments are fetched, deduplicated, capped, and ranked.
- Download results as JSON, CSV, or Excel from the run's dataset, or read
topCommentsAcrossPostsfrom the key-value store if cross-post ranking was enabled.
⬇️ Input
| Parameter | Required | Type | Description | Example Value |
|---|---|---|---|---|
redditPostUrls | No | array | Reddit post URLs to fetch and rank comments from. Also accepts startUrls. | ["https://www.reddit.com/r/AskReddit/comments/1vdjhvv/"] |
maxCommentsPerPost | No | integer | Hard cap on comments returned per post (1–10,000). Selection respects sortMode (see below). Also accepts maxComments. | 100 |
maxReplyDepth | No | integer | How many levels of nested replies to embed in each comment's replies array (1 = direct replies only, 0 = unlimited). Does not limit how many comments are scraped. Also accepts replyLimit. | 2 |
sortMode | No | string (enum) | Which comments Reddit serves, and how the cap selects them. One of hot, new, top, controversial, old. Also accepts sortOrder. | top |
searchUrls | No | array | Subreddit listing, subreddit search, site search, or user URLs to discover posts from. | ["https://www.reddit.com/r/ChatGPT/top/?t=week"] |
searchQuery | No | string | Plain keyword/phrase to search Reddit site-wide for matching posts. | "gpt5 launch" |
maxPostsToDiscover | No | integer | Max posts discovered in total across searchUrls and searchQuery (1–500). Ignored when only direct URLs are used. | 10 |
safeSearch | No | boolean | Skip NSFW (over_18) posts found via discovery. No effect on direct redditPostUrls. | false |
sinceDate | No | string | Only keep comments created on/after this date. Absolute date or relative like 3 days / 1 week. | "1 week" |
untilDate | No | string | Only keep comments created on/before this date. Same format as sinceDate. | "2026-01-01" |
enrichAuthorProfile | No | boolean | Add an authorProfile object (karma, account age, trophies, Premium) per row, resolved once per unique author (max 300 per run). | false |
enableCrossPostRanking | No | boolean | Merge comments from every post by upvotes into one leaderboard (topCommentsAcrossPosts). | false |
crossPostLeaderboardSize | No | integer | Max comments kept in the merged leaderboard (1–500). Ignored unless cross-post ranking is on. | 50 |
proxyConfiguration | No | object | Proxy settings. Your selection is tried first; the Actor falls back through direct, residential, datacenter and static-US proxies automatically. | {"useApifyProxy": false} |
No input parameter is required, but the Actor needs at least one of redditPostUrls, searchUrls, or searchQuery to know what to fetch. If it can't extract a single comment from any target, the run fails with an explicit status message rather than reporting a misleading success.
How sortMode and maxCommentsPerPost interact
sortMode changes which comments Reddit hands over, not just their order — Reddit only serves a slice of a large thread per sort. maxCommentsPerPost is then applied as a hard cap using the metric that sort mode implies:
sortMode | Cap keeps | Typical use |
|---|---|---|
top | The N highest-scoring comments in the thread | "Top comments" leaderboards |
new | The N newest comments | Live monitoring (scores are usually still hidden by Reddit) |
old | The N oldest comments | Reaching the beginning of a thread; pairs well with untilDate |
hot | The first N in Reddit's own "best" order, top-level first | Mirroring what a visitor sees |
controversial | The first N in Reddit's controversial order, top-level first | Finding contested replies |
rank_in_post is always recomputed from real upvote counts (descending) over whatever set was kept.
Example JSON input:
{"redditPostUrls": ["https://www.reddit.com/r/AskReddit/comments/1vdjhvv/"],"maxCommentsPerPost": 200,"maxReplyDepth": 2,"sortMode": "top","searchUrls": ["https://www.reddit.com/r/ChatGPT/top/?t=week"],"searchQuery": "gpt5 launch","maxPostsToDiscover": 20,"safeSearch": true,"sinceDate": "1 week","untilDate": "","enrichAuthorProfile": true,"enableCrossPostRanking": true,"crossPostLeaderboardSize": 50,"proxyConfiguration": { "useApifyProxy": false }}
⬆️ Output
Every run pushes typed, normalized JSON rows to the Actor's dataset, exportable as JSON, CSV, or Excel. authorProfile only appears when enrichAuthorProfile is enabled, and the cross-post leaderboard dataset only exists when enableCrossPostRanking is enabled.
Scraped comments
{"url": "https://www.reddit.com/r/AskReddit/comments/1vdjhvv/","comment_id": "p19enka","post_id": "t3_1vdjhvv","author": "jmills23","permalink": "https://www.reddit.com/r/AskReddit/comments/1vdjhvv/for_women_who_never_wear_makeup_what_lead_you_to/p19enka/","upvotes": 26938,"score_hidden": false,"reply_count": 27,"content_type": "comment","parent_id": "1vdjhvv","author_avatar": "","userUrl": "https://www.reddit.com/user/jmills23/","contentText": "Laziness, prioritizing sleep over it, the cost, I never had the patience to learn how to do it well...","created_time": "2026-08-02T14:33:52Z","replies": [{"comment_id": "p19flah","author": "Flimsy_Fee8449","upvotes": 4748,"contentText": "Oh, good morning, are you me? Yep, I would rather sleep in...","created_time": "2026-08-02T14:38:29Z","permalink": "https://www.reddit.com/r/AskReddit/comments/1vdjhvv/.../p19flah/","userUrl": "https://www.reddit.com/user/Flimsy_Fee8449/","replies": []}],"rank_in_post": 1,"controversy_score": 960.0,"is_top_level": true,"discovered_via": "direct_url","discovered_post_title": "For women who NEVER wear makeup, what lead you to that choice?"}
Field notes:
upvotesis Reddit's exact score, read from old.reddit'stitleattribute — not the rounded "26.9k" display value.score_hiddenistruefor very new comments where Reddit deliberately hides the score;upvotesis then0.content_typeis one ofcomment,reply,link,deleted,removed,empty.media_urlsholds any image/GIF/link URLs found in the comment body. Image-only comments have an emptycontentTextbut a populatedmedia_urlsandcontent_type: "link".controversy_scoreis a custom metric:upvotes / (direct replies + 1).author_avataris usually an empty string:old.reddit.comdoes not render user avatars, and Reddit's avatar API is not publicly reachable. It is populated only when an avatar URL happens to appear on the profile page duringenrichAuthorProfile.
Cross-post leaderboard (topCommentsAcrossPosts)
Only produced when enableCrossPostRanking is true. Same row shape as above, saved to a named dataset (top-comments-across-posts) and to the key-value store, plus one added field:
{"url": "https://www.reddit.com/r/AskReddit/comments/1vdjhvv/","comment_id": "p19enka","author": "jmills23","upvotes": 26959,"rank_in_post": 1,"rank_overall": 1}
Author profile enrichment (authorProfile)
Present per comment only when enrichAuthorProfile is true, resolved once per unique author:
{"totalKarma": 29950,"postKarma": 2857,"commentKarma": 27093,"accountCreatedUtc": "2015-04-05T13:49:07Z","isGold": false,"trophies": ["11-Year Club", "RedditGifts 2009-2022", "Verified Email"]}
isGold is derived from the public trophy case and is null when Reddit does not render one.
How many results can you scrape?
maxCommentsPerPost caps the Actor at 1–10,000 comments per post; there is no schema cap on how many post URLs you can submit. Reddit itself limits how much of a thread it will serve for a given sort — a single sort typically reaches several hundred to a few thousand comments of a very large thread, and deep branches are expanded through morechildren automatically. To reach different regions of a huge thread, run it more than once with different sortMode values (for example top and old + untilDate).
When discovering posts, maxPostsToDiscover caps discovery at 1–500 posts combined across all searchUrls and searchQuery. enrichAuthorProfile resolves up to 300 unique authors per run. The cross-post leaderboard keeps 1–500 comments.
Integrate Reddit Comment & Top Ranking Scraper and automate your workflow
REST API integration
import requestsTOKEN = "YOUR_APIFY_API_TOKEN"ACTOR = "your-username~reddit-comment-top-ranking-scraper"resp = requests.post(f"https://api.apify.com/v2/acts/{ACTOR}/run-sync-get-dataset-items",params={"token": TOKEN},json={"redditPostUrls": ["https://www.reddit.com/r/AskReddit/comments/1vdjhvv/"],"sortMode": "top", "maxCommentsPerPost": 50},)resp.raise_for_status()comments = resp.json()print(comments[0]["contentText"], comments[0]["rank_in_post"])
Works in Python, Node.js, Go, Ruby, cURL.
MCP for AI agents
Any Apify Actor, including this one, can be exposed to an MCP-compatible client through Apify's hosted Actors MCP Server, e.g. npx -y @apify/actors-mcp-server --actors your-username/reddit-comment-top-ranking-scraper.
Automation platforms (n8n, Make)
In n8n, the community "Apify" node can call this Actor by its Actor ID and pass through the same input JSON. In Make, the "Apify" app's "Run Actor" module accepts this Actor's ID and input.
Is it legal to scrape Reddit?
This Actor only reads comments and post data that are already publicly visible on reddit.com, without logging in or accessing anything behind a private subreddit or login wall. Reddit usernames are pseudonymous handles, but commenter data — especially combined with karma and account-age fields from enrichAuthorProfile — can still be considered personal data under regulations like GDPR or CCPA. Storing or reusing bulk commenter data at scale should have a documented lawful basis. Consult legal counsel for commercial use cases involving bulk personal data.
Frequently asked questions
Does it work without a Reddit account?
Yes. The Actor reads publicly rendered old.reddit.com pages — no Reddit login, app registration, or OAuth token is needed.
Reddit's .json endpoints stopped working for me. Does that affect this Actor?
No. Reddit now returns HTTP 403 for the legacy .json endpoints to unauthenticated clients, which is why this Actor does not use them. It reads old.reddit.com HTML instead, which is still served.
How often is the scraped data updated?
Every run fetches comments live from Reddit at the time it executes; nothing is cached. Running the Actor again returns the current state of the thread, including new comments and updated upvote counts.
What happens if a post has no comments or was deleted?
Other URLs in the same batch are unaffected. Comments authored by deleted accounts or removed by moderators are still returned, tagged content_type: "deleted" or "removed" — and, importantly, their surviving child replies are still scraped. If no target yields a single comment, the run fails with an explicit message.
Can I scrape private or quarantined subreddit content?
No. The Actor only reaches subreddits and posts that are publicly accessible without logging in.
How does "top ranking" actually work?
Two things combine. First, sortMode: "top" asks Reddit for its genuine top-sorted comment listing, so the comments you receive are the ones Reddit itself ranks highest. Second, rank_in_post is recomputed locally from each comment's exact upvote count after every reply batch has been merged, so the numbering is consistent even across morechildren pages. controversy_score is a custom metric (upvotes / (direct replies + 1)), not something Reddit exposes.
Why are upvotes 0 on many comments when I use sortMode: "new"?
Reddit deliberately hides scores on very recent comments. Those rows carry score_hidden: true. Use sortMode: "top" if you need scored comments.
How does the Actor handle Reddit's anti-bot defenses?
Requests use a Firefox/Safari-matching TLS and HTTP fingerprint via curl_cffi (Reddit blocks Chrome-shaped fingerprints), and the Actor rotates exit IP and fingerprint across a proxy ladder until it gets genuine Reddit HTML, then pins that combination. Reddit's HTTP-200 block pages are detected and rejected instead of being parsed as empty results.
Your feedback
Found a bug, a missing field, or a case where ranking looks off? Reach out through the Actor's Issues tab on its Apify Store page.