Reddit Comment & Top Ranking Scraper avatar

Reddit Comment & Top Ranking Scraper

Pricing

from $4.99 / 1,000 results

Go to Apify Store
Reddit Comment & Top Ranking Scraper

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

API Empire

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

9 days ago

Last modified

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:

SurfaceStatus (2026)Used here
Legacy public JSON API (<url>.json)Blocked — returns HTTP 403 for unauthenticated clients on every IP typeNo
Official OAuth Data APIRequires app registration, credentials and paid quota tiersNo
old.reddit.com server-rendered HTMLWorking — still served to anonymous browsersYes
/api/morechildren (returns HTML fragments)Working — used to expand “load more comments”Yes
New Shreddit / GraphQL frontendJS-rendered, auth-gatedNo

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 over18 cookie is set, which the Actor sets by default (use safeSearch to 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 TypeKey FieldsJSON Field Names
Ranked commentscomment text, exact upvotes, local rank, controversy score, direct replies, timestampscontentText, upvotes, rank_in_post, controversy_score, reply_count, created_time
Nested repliesreply tree embedded per comment, depth-limitedreplies[]
Cross-post leaderboardcomments merged across all submitted/discovered posts, ranked by upvotestopCommentsAcrossPosts, rank_overall
Author profile datakarma totals, account creation date, trophies, Reddit Premium statusauthorProfile.totalKarma, authorProfile.accountCreatedUtc, authorProfile.trophies, authorProfile.isGold
Post discovery metadatahow a post was found and its real titlediscovered_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.

FeatureOfficial Reddit APIReddit Comment & Top Ranking Scraper
AuthenticationReddit app registration + OAuth tokenNone — reads public pages directly
Setup processRegister app, request scopes, manage tokensPaste a URL or keyword, run
RankingReturns Reddit's own listing order onlyComputes rank_in_post and controversy_score locally
Multi-post aggregationNot provided — one thread per callOptional cross-post leaderboard across all posts
Output formatRaw nested Reddit JSON you must parse yourselfFlat, 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)

  1. Open Reddit Comment & Top Ranking Scraper on its Apify Store page and click Run.
  2. Provide input: paste one or more URLs into redditPostUrls, or leave it empty and use searchUrls / searchQuery to have the Actor discover posts for you.
  3. Set sortMode, maxCommentsPerPost, maxReplyDepth, and optionally sinceDate/untilDate.
  4. Start the run — comments are fetched, deduplicated, capped, and ranked.
  5. Download results as JSON, CSV, or Excel from the run's dataset, or read topCommentsAcrossPosts from the key-value store if cross-post ranking was enabled.

⬇️ Input

ParameterRequiredTypeDescriptionExample Value
redditPostUrlsNoarrayReddit post URLs to fetch and rank comments from. Also accepts startUrls.["https://www.reddit.com/r/AskReddit/comments/1vdjhvv/"]
maxCommentsPerPostNointegerHard cap on comments returned per post (1–10,000). Selection respects sortMode (see below). Also accepts maxComments.100
maxReplyDepthNointegerHow 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
sortModeNostring (enum)Which comments Reddit serves, and how the cap selects them. One of hot, new, top, controversial, old. Also accepts sortOrder.top
searchUrlsNoarraySubreddit listing, subreddit search, site search, or user URLs to discover posts from.["https://www.reddit.com/r/ChatGPT/top/?t=week"]
searchQueryNostringPlain keyword/phrase to search Reddit site-wide for matching posts."gpt5 launch"
maxPostsToDiscoverNointegerMax posts discovered in total across searchUrls and searchQuery (1–500). Ignored when only direct URLs are used.10
safeSearchNobooleanSkip NSFW (over_18) posts found via discovery. No effect on direct redditPostUrls.false
sinceDateNostringOnly keep comments created on/after this date. Absolute date or relative like 3 days / 1 week."1 week"
untilDateNostringOnly keep comments created on/before this date. Same format as sinceDate."2026-01-01"
enrichAuthorProfileNobooleanAdd an authorProfile object (karma, account age, trophies, Premium) per row, resolved once per unique author (max 300 per run).false
enableCrossPostRankingNobooleanMerge comments from every post by upvotes into one leaderboard (topCommentsAcrossPosts).false
crossPostLeaderboardSizeNointegerMax comments kept in the merged leaderboard (1–500). Ignored unless cross-post ranking is on.50
proxyConfigurationNoobjectProxy 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:

sortModeCap keepsTypical use
topThe N highest-scoring comments in the thread"Top comments" leaderboards
newThe N newest commentsLive monitoring (scores are usually still hidden by Reddit)
oldThe N oldest commentsReaching the beginning of a thread; pairs well with untilDate
hotThe first N in Reddit's own "best" order, top-level firstMirroring what a visitor sees
controversialThe first N in Reddit's controversial order, top-level firstFinding 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:

  • upvotes is Reddit's exact score, read from old.reddit's title attribute — not the rounded "26.9k" display value.
  • score_hidden is true for very new comments where Reddit deliberately hides the score; upvotes is then 0.
  • content_type is one of comment, reply, link, deleted, removed, empty.
  • media_urls holds any image/GIF/link URLs found in the comment body. Image-only comments have an empty contentText but a populated media_urls and content_type: "link".
  • controversy_score is a custom metric: upvotes / (direct replies + 1).
  • author_avatar is usually an empty string: old.reddit.com does 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 during enrichAuthorProfile.

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 requests
TOKEN = "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.

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.