Reddit API Scraper With Comment Threads avatar

Reddit API Scraper With Comment Threads

Pricing

from $2.99 / 1,000 results

Go to Apify Store
Reddit API Scraper With Comment Threads

Reddit API Scraper With Comment Threads

Reddit API Scraper — Scrape Reddit posts with complete comment threads, including nested replies, authors, scores, timestamps, and engagement metrics. Extract structured discussion data for audience research, sentiment analysis, trend discovery, and community insights.

Pricing

from $2.99 / 1,000 results

Rating

0.0

(0)

Developer

SimpleAPI

SimpleAPI

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Share

Reddit Scraper — Posts, Comments and Nested Reply Threads

Reddit API Scraper With Comment Threads pulls Reddit posts and their full nested comment threads into structured JSON — by keyword search, by subreddit, or from direct post permalinks. Each row carries post fields like title, selftext, score, upvote_ratio and num_comments, or comment fields like body, author, score and reply depth. Researchers building NLP datasets, brand-monitoring teams, and AI engineers wiring Reddit into agent pipelines use it to collect discussions with replies attached — without registering a Reddit developer app or supplying any login credentials. Point it at a topic or a thread and it fills in the rest.


What is Reddit API Scraper With Comment Threads?

It is an Apify Actor that scrapes public Reddit posts and — optionally — every comment reachable underneath them, returning one JSON row per post and one per comment. No Reddit account, API app, OAuth token, or login of any kind is required; the Actor reads Reddit through a public, credential-free data source and pushes rows to an Apify dataset you can export as JSON, CSV, Excel, or query over the API.

Key capabilities, read from the source:

  • 🔎 Two discovery paths — search by keyword (optionally scoped to one or more subreddits) or fetch exact posts from pasted Reddit URLs, and use both in the same run
  • 🌳 Full comment-tree reconstruction — the underlying data source returns comments as a flat, paginated list; the Actor rebuilds the reply tree from each comment's parent_id and walks it depth-first, honoring replyDepth (0–20) and maxCommentsPerPost (1–10,000)
  • 📊 Independent sort control — four post-sort orders (new, hot, top, relevance) and six comment-sort orders (best, top, new, controversial, old, qa)
  • 💬 Post engagement fields on every rowscore, ups, upvote_ratio, num_comments, num_crossposts, total_awards_received
  • 🔁 Automatic retry with backoff — transient network errors and rate limits are retried up to maxRetries times (1–10) before a request is given up on
  • 📦 Real-time dataset rows — every post and comment is pushed to the dataset the moment it is collected, not batched at the end of the run

What data can I extract with Reddit API Scraper With Comment Threads?

The Actor returns two row shapes in the same dataset — post rows and comment rows, distinguished by the type field — covering post metadata, post engagement metrics, and full nested comment threads.

Post fields

Every key transform_post() writes to a post row:

FieldExample valueUse case
type"post"Filter rows: type == "post"
is_replyfalseAlways false on post rows
keyword"webscraping" or nullGroup results by the keyword that found the post (null for direct-URL posts)
metaData.keyword{"keyword": "webscraping"}Same keyword, nested — kept alongside the flat field for compatibility with both access patterns
id"1abcxyz"Reddit's post ID
subreddit"webscraping"Community the post belongs to
selftext"Has anyone found a reliable way to..."Self-post body text
author_fullname"t2_9f8g7h"Reddit's internal author ID
title"How do you handle Cloudflare on scraping jobs?"Post headline
subreddit_name_prefixed"r/webscraping"Display-ready subreddit name
name"t3_1abcxyz"Post's Reddit "fullname" (used to fetch its comments)
link_flair_text_color"dark"Flair display styling
subreddit_type"public"Subreddit visibility
thumbnail"https://b.thumbs.redditmedia.com/..."Thumbnail image URL
link_flair_type"text"Flair rendering type
author_flair_type"text"Author flair rendering type
domain"self.webscraping"Link domain, or self.<subreddit> for text posts
selftext_html"&lt;div class=...&gt;"Raw HTML-escaped self-post body
subreddit_id"t5_2xhvj"Subreddit's Reddit ID
author"data_hoarder_42"Post author's username
permalink"/r/webscraping/comments/1abcxyz/..."Reddit-relative post path
url"https://www.reddit.com/r/webscraping/comments/1abcxyz/"Post URL (or the external link URL for link posts)
score128Net upvotes
ups140Raw upvote count
upvote_ratio0.91Upvote/total ratio
num_comments34Total comments Reddit reports for the post
num_crossposts2Times the post was crossposted
over_18falseNSFW flag
is_videofalseWhether the post is a video post
is_selftrueWhether the post is a text (self) post
is_original_contentfalseReddit's OC flag
total_awards_received1Award count
link_flair_text"Discussion"Flair label
author_flair_textnullAuthor flair label
created_utc1753830000Post creation time, epoch seconds
created_at"2026-07-29T18:00:00Z"Post creation time, ISO-8601 UTC
source_urlnull or the pasted URLThe input startUrls entry this post came from, null for keyword-search posts
num_comments_collected27Direct-URL posts only — how many comment rows the Actor actually pushed for this post; not present on keyword-search post rows

Comment fields

Every key transform_comment() writes to a comment row:

FieldExample valueUse case
type"comment"Filter rows: type == "comment"
is_replytruetrue if the comment replies to another comment, false if it replies directly to the post
metaData.keyword{"keyword": "webscraping"}Keyword that found the parent post, or null for direct-URL threads
post_id"1abcxyz"Parent post's Reddit ID
post_fullname"t3_1abcxyz"Parent post's Reddit fullname
source_urlnull or the pasted URLThe input startUrls entry this comment's post came from
comment_id"kx1a2b3"Reddit's comment ID
parent_id"1abcxyz" or a comment IDThe post or comment this one replies to, normalized (no t1_/t3_ prefix)
depth2Reply nesting level (0 = top-level comment on the post)
author"scrapefan99" or "[deleted]"Comment author's username
author_url"https://www.reddit.com/user/scrapefan99/" or nullAuthor profile link, null when the author is [deleted]
score12Comment's net score
body"Rotating residential proxies plus a headless browser fixed it for me."Comment text
permalink"https://www.reddit.com/r/webscraping/comments/1abcxyz/.../kx1a2b3/"Full URL to the comment
created_utc1753831200Comment creation time, epoch seconds
created_at"2026-07-29T18:20:00Z"Comment creation time, ISO-8601 UTC

💬 Engagement and discussion signals

score, ups, upvote_ratio, num_comments, num_crossposts and total_awards_received on posts, and score on comments, are the fields most sentiment and engagement analyses key on. Because comments carry their own score, you can rank replies inside a single thread the same way Reddit does, independent of which commentSort you requested — useful when you want the tree in "old" order for chronology but still want to flag the highest-scored replies. num_comments (Reddit's own reported count) and num_comments_collected (this Actor's actually-pushed count, direct-URL posts only) will diverge whenever maxCommentsPerPost or replyDepth truncates the tree — check both if your workflow assumes a complete thread.

🎯 Targeting fields

subreddit, keyword / metaData.keyword, type, depth and created_at are what you filter and segment on downstream: group by subreddit to compare communities, by keyword to compare search terms, by type to separate the post layer from the comment layer, and by depth to isolate top-level opinions (depth == 0) from deep-thread replies. created_at is ISO-8601 UTC on every row, so date-range filtering and time-series aggregation need no timezone conversion.


How does Reddit API Scraper With Comment Threads differ from the official Reddit API?

Reddit's own Data API requires a registered developer app and an OAuth2 access token before you can request a single post, and — since Reddit announced API pricing on April 18, 2023 (effective June 30, 2023), with exceptions carved out only for non-commercial and accessibility-focused apps — volume beyond that free allowance requires a separate commercial licensing agreement (per public reporting on Reddit's own announcement, checked 2026-07-30). This Actor needs none of that.

FeatureReddit's official Data APIReddit API Scraper With Comment Threads
Access requirementRegistered developer app, OAuth2 token, commercial licensing for volume beyond the free tierNo account, login, API key, or app registration
Global keyword search (no subreddit)Handled through the API's own search parameters, behind your OAuth tokenFalls back automatically to a broader public search index when no subreddit is set (results can lag behind current Reddit content)
Comment-tree assemblyRaw, paginated comment/"more comments" objects — your code drives expansion and reconstructs the treeFull nested tree reconstructed automatically every run, with replyDepth (0–20) and maxCommentsPerPost (1–10,000) as plain inputs
Result shapeRaw Reddit "Thing" JSONFlattened, typed dataset rows, exportable straight to JSON, CSV, or Excel
Retry / backoff on rate limitsYou implement itBuilt in — up to maxRetries (1–10) attempts per request
Setup timeRegister app, obtain client credentials, implement and maintain the OAuth flowPaste keywords or URLs, click Start

Why does bulk Reddit collection through the official API require a paid plan?

Reddit's April 2023 announcement introduced Data API pricing for commercial use above a free, non-commercial allowance, with exceptions only for accessibility tools and approved moderation bots (per public reporting on Reddit's own announcement, checked 2026-07-30). For a one-off research pull, a dataset build, or a client audit, that means either qualifying for the narrow free-use carve-out or negotiating a usage-based invoice before writing a line of collection code — on top of the OAuth registration every use case needs. This Actor sidesteps both: it reads the same public post and comment data through a credential-free source and reconstructs full comment trees locally, so there is no account to register and no licensing tier to qualify for.

Use Reddit's official API when you are building a long-running product integration that needs Reddit's own delivery guarantees and you already maintain OAuth infrastructure. Use this Actor when you want an immediate, credential-free dataset of posts and nested comment threads without setting up developer access first.


How to use data extracted from Reddit?

Research and NLP teams

Set searchKeywords and one or more subredditNames to scope collection to the communities you're studying, turn includeComments on, and set replyDepth to however many reply levels your analysis needs. Each body field (post selftext or comment body) plus score and created_at becomes a labeled row for a training corpus, a discourse-analysis dataset, or a sentiment-classification pipeline — with depth already telling you which comments are top-level opinions versus deep-thread replies.

Brand and community monitoring

Track a brand, product, or topic keyword across specific subreddits on a recurring Apify schedule, with commentSort set to new so each run surfaces the latest replies first. Because every row is pushed to the dataset as it's collected, monitoring dashboards can poll the dataset mid-run rather than waiting for completion — useful when a client wants same-day visibility into a spike of mentions.

Market research and intelligence

Run the same keyword across several subreddits with resultsLimitPerKeyword set high, then aggregate by subreddit and score to see which communities engage most with a topic, or trend created_at over time to spot when discussion volume around a product or competitor is rising or falling.

AI agents and automated pipelines

Wrap the Actor as a tool an agent calls with a topic or a thread URL, feeding title, selftext/body, and score back as grounding context for a RAG pipeline or a "what is Reddit saying about X" agent response — no OAuth setup needed inside the agent's tool-calling path.


🔼 Input sample

ParameterRequiredTypeDescriptionExample value
startUrlsNoarray (stringList)Direct Reddit post/thread permalinks to fetch (post + comment thread). Can be used with or instead of searchKeywords.["https://www.reddit.com/r/webscraping/comments/abc123/some_title/"]
searchKeywordsNoarray (stringList)Keywords or phrases to search on Reddit. Each is searched separately and results are grouped by keyword. Optional if startUrls is set. Default UI prefill: ["webscraping"].["webscraping", "python"]
subredditNamesNoarray (stringList)Restrict keyword search to these subreddits only. Leave empty to search all of Reddit. Ignored for startUrls.["webscraping", "python"]
resultsLimitPerKeywordNointegerMax posts per keyword (min 1, max 1000). Only applies to keyword search, not direct URLs. Default: 10.50
sortingNostring, enum: new (New), hot (Hot), top (Top), relevance (Relevance)Order for keyword-search results when no subreddit is given. When one or more subreddits are set, results are always newest-first regardless of this setting. Default: new."hot"
includeCommentsNobooleanFetch the full nested comment tree for every post and save each comment as its own row. Default: true.true
maxCommentsPerPostNointegerMax comments saved per post (min 1, max 10000). Applies once per post, regardless of source. Default: 100.200
commentSortNostring, enum: best (Best), top (Top), new (New), controversial (Controversial), old (Old), qa (Q&A)Order Reddit returns comments for each post. Default: best."top"
replyDepthNointegerReply levels to follow under each top-level comment (min 0, max 20). 0 = top-level comments only. Default: 3.5
maxRetriesNointegerRetry attempts for a single request before giving up on it (min 1, max 10). Default: 3.5

No parameter is required — the Actor requires at least one of startUrls or searchKeywords to be set, or it logs a warning and exits without collecting anything.

{
"searchKeywords": ["webscraping"],
"subredditNames": ["webscraping"],
"resultsLimitPerKeyword": 25,
"sorting": "new",
"includeComments": true,
"maxCommentsPerPost": 100,
"commentSort": "best",
"replyDepth": 3,
"maxRetries": 3
}

⚠️ Common pitfall: sorting only affects results when subredditNames is empty. The moment you add even one subreddit name, results are always returned newest-first — sorting: "top" is silently ignored for subreddit-scoped searches. If you need top-scored posts from a specific subreddit, sort the dataset by score after the run instead.


🔽 Output sample

Output is typed, normalized JSON — one row per post, one row per comment, all in the same dataset, distinguished by type. Export straight from the Apify Console or API as JSON, CSV, Excel, or XML. Every pushed row (post or comment) is charged under the single row_result event; there is no separate uncharged accounting row to filter out.

Post row example:

{
"type": "post",
"is_reply": false,
"keyword": "webscraping",
"metaData": { "keyword": "webscraping" },
"id": "1abcxyz",
"subreddit": "webscraping",
"selftext": "Has anyone found a reliable way to get past Cloudflare challenges without a headless browser?",
"author_fullname": "t2_9f8g7h",
"title": "How do you handle Cloudflare on scraping jobs?",
"subreddit_name_prefixed": "r/webscraping",
"name": "t3_1abcxyz",
"link_flair_text_color": "dark",
"subreddit_type": "public",
"thumbnail": "self",
"link_flair_type": "text",
"author_flair_type": "text",
"domain": "self.webscraping",
"selftext_html": "<div class=\"md\"><p>Has anyone found a reliable way...</p></div>",
"subreddit_id": "t5_2xhvj",
"author": "data_hoarder_42",
"permalink": "/r/webscraping/comments/1abcxyz/how_do_you_handle_cloudflare_on_scraping_jobs/",
"url": "https://www.reddit.com/r/webscraping/comments/1abcxyz/how_do_you_handle_cloudflare_on_scraping_jobs/",
"score": 128,
"ups": 140,
"upvote_ratio": 0.91,
"num_comments": 34,
"num_crossposts": 0,
"over_18": false,
"is_video": false,
"is_self": true,
"is_original_content": false,
"total_awards_received": 1,
"link_flair_text": "Discussion",
"author_flair_text": null,
"created_utc": 1753830000,
"created_at": "2026-07-29T18:00:00Z",
"source_url": null
}

Comment row example:

{
"type": "comment",
"is_reply": true,
"metaData": { "keyword": "webscraping" },
"post_id": "1abcxyz",
"post_fullname": "t3_1abcxyz",
"source_url": null,
"comment_id": "kx1a2b3",
"parent_id": "kx0z9y8",
"depth": 1,
"author": "scrapefan99",
"author_url": "https://www.reddit.com/user/scrapefan99/",
"score": 12,
"body": "Rotating residential proxies plus a headless browser fixed it for me.",
"permalink": "https://www.reddit.com/r/webscraping/comments/1abcxyz/how_do_you_handle_cloudflare_on_scraping_jobs/kx1a2b3/",
"created_utc": 1753831200,
"created_at": "2026-07-29T18:20:00Z"
}

How do you filter and target specific posts and comment threads?

The Actor exposes two ways to find posts and four ways to control how much of each comment thread you collect — combine them rather than relying on defaults.

Query vs. scope. searchKeywords runs a free-text search across Reddit; subredditNames narrows that search to specific communities and, as a side effect, switches results to the live/current data source instead of the slower-updating fallback used for unscoped global search (see the pitfall above). Use startUrls instead of either when you already know the exact thread you want — it skips search entirely and fetches that post and its comments directly.

Volume controls. resultsLimitPerKeyword (1–1000) caps posts per keyword; maxCommentsPerPost (1–10,000) caps comments per post; replyDepth (0–20) caps how many reply levels deep the tree is walked. All three are clamped to their min/max by the Actor itself if you pass a value outside range, rather than erroring.

No quality threshold exists. Unlike directory-style filters (minimum rating, verified-only), this Actor has no minimum-score or minimum-comment-count input — sorting and commentSort control order, not inclusion. Filter by score in the dataset after the run if you need a quality floor.

Three real input examples, each solving a different targeting problem:

{ "searchKeywords": ["chatgpt"], "subredditNames": ["python", "programming"], "resultsLimitPerKeyword": 50 }
{ "searchKeywords": ["chatgpt"], "sorting": "hot", "resultsLimitPerKeyword": 100 }
{ "startUrls": ["https://www.reddit.com/r/webscraping/comments/abc123/some_title/"], "replyDepth": 10, "commentSort": "top", "maxCommentsPerPost": 500 }

▶️ Want to try other SimpleAPI scrapers?

ScraperWhat it extracts
Instagram Posts Scraper With Tagged Places & CoordinatesInstagram posts with captions, hashtags, and tagged locations
Instagram Profile Post Scraper With Engagement AnalyticsInstagram profile and post data with engagement metrics
TikTok User Profile Scraper: Business LeadsTikTok profile data and business contact fields
Snapchat User Stories Scraper With Creator Profile InsightsSnapchat stories and creator profile data

How to extract Reddit data programmatically

Every run is a standard Apify Actor call — one API call to start it, structured JSON dataset rows back, no separate signup beyond your Apify account.

Python example

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("<username>/reddit-api-scraper-with-comment-threads").call(
run_input={
"searchKeywords": ["webscraping"],
"subredditNames": ["webscraping"],
"resultsLimitPerKeyword": 25,
"includeComments": True,
"replyDepth": 3,
}
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
if item["type"] == "post":
print(item["title"], item["score"], item["num_comments"])

Export to spreadsheets or CRM

Export the dataset as CSV directly from the Apify Console or via the API (?format=csv). Map title, score, num_comments, created_at and permalink to spreadsheet columns for a post-level view, or body, author, score and depth for a comment-level view — both row types live in the same export, so filter by type first if your destination expects one shape per sheet.


Scraping publicly available Reddit posts and comments is generally legal — this Actor collects only content anyone can already see without logging in, from public subreddits, with no account bypass or private-content access of any kind. Because posts and comments carry a username and freely-written text that Reddit users posted publicly, this data can constitute personal data under GDPR and CCPA when the author is identifiable, even though the username is pseudonymous. That means a lawful basis is still required for storing and reusing it — public availability establishes that the data can be accessed, not that any use of it is automatically compliant. Consult legal counsel for commercial applications involving bulk storage of personal data.


❓ FAQ

What happens to deleted or removed posts and comments?

The Actor never fabricates data for removed content. A comment whose author is missing is returned with author: "[deleted]" and author_url: null; any other field Reddit doesn't return for a post or comment (a flair, a self-text) comes back as null rather than a guessed value.

Can I get engagement data along with the post and comment text?

Yes. Every post row carries score, ups, upvote_ratio, num_comments, num_crossposts and total_awards_received; every comment row carries its own score. No separate request or parameter is needed — they're on the same row as the text.

How accurate is the score and engagement data?

The Actor returns Reddit's engagement numbers exactly as reported at request time. Scores and comment counts on Reddit continue to change after a post is published, so a number collected today can differ from the same post scraped tomorrow — treat created_at as the data's timestamp and re-run if you need current figures.

How many posts and comments can I get per run?

Per keyword, up to resultsLimitPerKeyword posts (max 1000); per post, up to maxCommentsPerPost comments (max 10000) reachable within replyDepth reply levels (max 20). Values outside these ranges are clamped to the nearest valid value rather than rejected. Direct-URL posts aren't subject to resultsLimitPerKeyword at all — each URL always fetches its one post.

How do I scope a keyword search to specific subreddits?

Set subredditNames alongside searchKeywords — the search then runs per subreddit and switches to the live/current data source rather than the broader fallback used for unscoped global search. Leave it empty to search all of Reddit.

What makes this different from scraping Reddit yourself?

The Actor reconstructs the full comment reply tree locally from a flat, paginated comment feed — walking parent_id links depth-first rather than depending on Reddit's own "load more comments" listing-page placeholders, which the source code notes actually yields more complete threads than that expansion approach. Combined with no required account, API app, or OAuth setup, that removes both the credentialing step and the tree-reconstruction logic a from-scratch script would need to write.

Does this Actor work with Claude, ChatGPT, and AI agent frameworks?

Yes, as a standard HTTP endpoint. Any agent framework that can call the Apify API can start a run with searchKeywords or startUrls and read the resulting dataset rows back as tool output — no MCP server is documented for this Actor specifically, so integrate it as a regular Actor-run tool call.

Can I use this without a Reddit API key or developer account?

Yes. No Reddit account, developer app registration, OAuth token, or API key of any kind is required — only an Apify account to run the Actor.


Conclusion

Reddit API Scraper With Comment Threads turns keyword searches, subreddit scopes, and direct post URLs into structured post and comment rows — full nested reply threads included — without a Reddit developer account or OAuth setup standing in the way. It fits research teams building discussion datasets, monitoring teams tracking mentions with replies attached, and AI pipelines that need Reddit context on demand. Add your keywords, subreddits, or URLs in the Apify Console and start a run to see the first rows land in your dataset in real time.