Reddit Datasets for Analytics and Machine Learning
Collect Reddit posts, comments, user profiles and subreddit data with consistent columns, link the levels with shared keys, and split large collections across tasks, by hand or from your own pipeline.
- 01No code, no Reddit API key
- 02Up to 10,000 items per task
- 03Export to CSV, JSON, Excel, XML
What a Usable Reddit Dataset Needs
Public Reddit dumps are often stale, scoped to someone else's question, or missing the fields you need. Copying threads by hand does not scale, and writing your own scraper means maintaining it. What an analyst or ML engineer actually needs is narrower:
- A clear unit of analysis: one row per post, comment, user or community
- The same columns on every run, so files from different days and tasks stack cleanly
- Keys that link levels, so a comment can be traced to its thread, author and community
- A repeatable collection config you can document and rerun from code
RedScraper covers collection. Labelling, cleaning and modelling stay in your own stack.
Four Levels of Reddit Data
Each task has one source, either a keyword search (up to 9 terms) or a single Reddit URL, and you select fields per data group; one task can collect several groups. The export contains only the fields you selected.
| Level | Sources | Fields | Row key |
|---|---|---|---|
| Post Scraper | Keyword search, subreddit URLs, feed URLs (e.g. https://www.reddit.com/r/popular/new) | Title, Content, Post URL, Subreddit name, Username, Number of comments, Votes, Upvote ratio, Media elements, Media type, Flair information, NSFW status | Post URL |
| Comment Scraper | Post URLs, comment URLs, keyword search | Username, Subreddit, Content, Creation date, Votes, Number of replies, Comment URL (full reply trees) | Comment URL |
| User Scraper | User profile URLs | Username, Post karma, Comment karma, Avatar URL, Moderator status, Description, User creation date, User URL, NSFW status | Username |
| Subreddit Scraper | Subreddit URLs | Name, Subreddit title, Description, Number of members, Creation date, Moderator list, Subreddit rules, Subreddit URL, Header image URL | Subreddit URL |
Sort (hot, top, new, relevance) applies to keyword searches only, and hot is not available for comments-only searches. The time window, from last hour to all time, applies only to keyword searches that collect posts. URL tasks return each page as Reddit serves it when the task runs. Posts have no creation date field; comments and users do.
Joining the Levels
Most useful datasets combine levels: comments with their thread's title, posts with their author's account age, users with the communities they post in. The keys are already in the exports.
| Join | Key | How to collect the second side |
|---|---|---|
| Post ↔ comments | Post URL (added to each comment export) | Run one comment task per Post URL from your post export |
| Post or comment ↔ author | Username | Build a profile URL for each unique username and run one user task per profile |
| Post ↔ community | Subreddit name ↔ Name | Build a subreddit URL for each unique subreddit name and run one subreddit task per community |
| Comment ↔ community | Subreddit ↔ Name | Same subreddit task as above |
Because every task has one source URL, the simplest key is the one you already hold: write the Post URL, username or subreddit URL you ran into every row you download. You can also try matching Comment URL against Post URL, but check it on a sample of your own export before you rely on it. Normalise case and strip any r/ or u/ prefix from names before joining.
Example Dataset Recipes
Three configurations that cover the common shapes. They are illustrative settings, not data.
1. Opinion corpus for text classification
Product discussion with posts and comments in one export, for labelling, fine-tuning experiments or topic models. Top sort over a year favours threads with enough discussion to be worth labelling.
| Setting | Value |
|---|---|
| Source | Keyword search across Reddit |
| Search terms | “noise cancelling headphones”, “anc earbuds”, “sony wh-1000xm5”, “airpods pro”, “bose qc” |
| Data | Post: Title, Content, Post URL, Subreddit name, Username, Votes, Number of comments, NSFW status · Comment: Content, Username, Subreddit, Creation date, Votes, Comment URL |
| Sort | Top |
| Time window | Last year |
| NSFW | Exclude |
| Item limit | 10,000 |
| Format | JSON |
2. Community panel for analytics
One row per subreddit in a domain, for comparing community size, age and rules, or for clustering communities by their descriptions. Rerun it on your own cadence to build a panel over time.
| Setting | Value |
|---|---|
| Source | Reddit URL: one subreddit per task, e.g. https://www.reddit.com/r/headphones/; repeat for each community in the domain |
| Data | Subreddit: Name, Subreddit URL, Subreddit title, Description, Number of members, Creation date, Subreddit rules, Moderator list |
| Sort / time window | Not available for URL tasks |
| Item limit | The same value for every task, e.g. the default 50 |
| Run | For a domain of 200 communities, loop over the list with the REST API |
| Format | CSV |
3. Author enrichment
Add account-level features to the authors in recipe 1: karma, account age, moderator status. Useful for weighting, filtering throwaway accounts in your own logic, or analysing who drives a discussion.
| Setting | Value |
|---|---|
| Source | Reddit URL: one profile per task, built from the Username column as https://www.reddit.com/user/name/ |
| Data | User: Username, Post karma, Comment karma, User creation date, Moderator status, NSFW status, User URL |
| Item limit | The same value for every task, e.g. the default 50 |
| Run | Script the loop over unique usernames via the REST API; sample authors if there are thousands |
| Format | CSV |
Going Beyond 10,000 Items
A task returns 1 to 10,000 items. Larger datasets are several tasks merged together. Split along one of these axes and dedupe on the row key afterwards.
| Split by | How | Watch out for |
|---|---|---|
| Keyword cluster | One task per group of up to 9 related terms | The same post matching terms in two tasks |
| Sort order | Same terms with Top, New and Relevance | Overlap between sorts; dedupe on Post URL |
| Time window | Last week for recent data, all time for depth | Windows are nested, not disjoint, so they overlap |
| Subreddit | One task per subreddit URL | The same post can also turn up in your keyword tasks |
| Post URL | One comment task per Post URL from your post export | Thousands of threads mean thousands of tasks; script them |
Splitting gives you more rows; it does not guarantee a complete archive of a subreddit or topic. Record each task's config next to its export, so you can describe the sampling in your methods section or data card.
Automating Collection
The RedScraper REST API (v1, included in every plan) turns the recipes above into code:
GET /v1/fieldsto list field names, and the OpenAPI 3.1 spec at/v1/openapi.jsonfor request schemasPOST /v1/scrapesfor each task in your split plan, with either keywordsearchesor a singleurlGET /v1/scrapes/{id}to check status, andPOST /v1/scrapes/{id}/cancelto stop a task you no longer needGET /v1/scrapes/{id}/resultsto download into your storage or warehouseGET /v1/usageto watch compute hours across a large job
API keys come with Read-only, Standard or Full access. If you work with an AI agent in Claude Code, Cursor, VS Code or Claude Desktop, the RedScraper MCP server exposes 19 tools so the agent can create tasks and fetch results for you. There is no built-in scheduler; recurring collection runs from your own cron job or orchestrator. Billing counts successful compute time only, failed runs are not billed, and data output is unlimited.
Preparation Checklist
- Dedupe on Post URL, Comment URL, Username or Subreddit URL after merging tasks
- Filter on NSFW status if you included NSFW content, and on Media type if you only want text posts
- Check for empty text: link and media posts may carry little or no Content; use Media type to find them
- Split by thread, not by row. Keep all comments of a post in the same train or test split to avoid leakage
- Stratify by community with Subreddit name, so one large subreddit does not dominate the sample
- Stamp the collection date. Votes, comment counts and members are values at fetch time
- Minimise personal data. If your analysis does not need Username, hash or drop it
- Check your use. Data is publicly visible Reddit content; compliance with applicable laws and Reddit's terms is your responsibility
For specific analyses built on these datasets, see sentiment analysis, bot and spam detection and audience segmentation, or the Reddit scraping guide.
Frequently Asked Questions
How do I build a Reddit dataset without the Reddit API?
Define what one row should be (a post, a comment, a user or a subreddit), pick the matching source in RedScraper (a keyword search or a single Reddit URL per task), select the fields you need and export to JSON, CSV, XML or Excel. No Reddit API key or developer app is needed, and the same task can be started from code through the RedScraper REST API.
How do I get more than 10,000 posts or comments?
Each task returns up to 10,000 items, so split the collection across tasks: one per keyword cluster, per sort order, per subreddit URL or per post URL. Merge the exports and remove duplicates on Post URL or Comment URL. Scripting the tasks through the REST API keeps large collections manageable.
How do I link comments to the posts they belong to?
Collect posts first, then run one comment task per Post URL. When you download each comment export, add the Post URL you ran it on as a column: that is your join key. You can also try matching Comment URL against Post URL, but check it on a sample of your own export first. Posts and comments link to authors through Username.
Which export format is best for machine learning?
JSON is the easiest to load in Python or a notebook and suits pipelines. CSV and Excel are better when people will read, filter or hand-label rows in a spreadsheet. XML is there for systems that expect it. All four contain the fields you selected.
Can I use scraped Reddit data to train AI models?
RedScraper collects publicly visible data and makes no claims about licensing it for model training. You are responsible for checking that how you store, share and use the data, including for training or evaluating models, complies with applicable laws and Reddit’s terms.
Does RedScraper label or clean the data?
No. RedScraper does not score sentiment, classify text, detect bots or tag anything. You get the raw fields you selected; deduplication, filtering, labelling and feature engineering happen in your own code or tools.
More use cases
Related Use Cases
- 01Reddit Market ResearchAnalyze discussions and understand your audience.
- 02Trending TopicsFind what’s gaining attention right now.
- 03Lead GenerationDiscover potential customers in discussions.
- 04Campaign MonitoringTrack mentions and performance of campaigns.
- 05Active UsersIdentify engaged users in niche communities.
- 06Audience SegmentationGroup users by behavior and interests.
- 07Sentiment AnalysisMeasure how people react to a product, claim or launch.
- 08Content ResearchFind real questions, phrasing and formats that work.
- 09Competitor AnalysisSee how competitors and their communities perform.
- 10Niche Subreddit DiscoveryFind the communities worth targeting.
- 11Subreddit Growth TrackingFollow community size and activity over time.
- 12Viral Post AnalysisStudy what made a post take off.
- 13Influencer OutreachBuild vetted lists of active users in a niche.
- 14Bot & Spam DetectionFlag suspicious accounts in exported user data.

