Use case8 sections

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.

LevelSourcesFieldsRow key
Post ScraperKeyword 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 statusPost URL
Comment ScraperPost URLs, comment URLs, keyword searchUsername, Subreddit, Content, Creation date, Votes, Number of replies, Comment URL (full reply trees)Comment URL
User ScraperUser profile URLsUsername, Post karma, Comment karma, Avatar URL, Moderator status, Description, User creation date, User URL, NSFW statusUsername
Subreddit ScraperSubreddit URLsName, Subreddit title, Description, Number of members, Creation date, Moderator list, Subreddit rules, Subreddit URL, Header image URLSubreddit 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.

JoinKeyHow to collect the second side
Post ↔ commentsPost URL (added to each comment export)Run one comment task per Post URL from your post export
Post or comment ↔ authorUsernameBuild a profile URL for each unique username and run one user task per profile
Post ↔ communitySubreddit name ↔ NameBuild a subreddit URL for each unique subreddit name and run one subreddit task per community
Comment ↔ communitySubreddit ↔ NameSame 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.

SettingValue
SourceKeyword search across Reddit
Search terms“noise cancelling headphones”, “anc earbuds”, “sony wh-1000xm5”, “airpods pro”, “bose qc”
DataPost: Title, Content, Post URL, Subreddit name, Username, Votes, Number of comments, NSFW status · Comment: Content, Username, Subreddit, Creation date, Votes, Comment URL
SortTop
Time windowLast year
NSFWExclude
Item limit10,000
FormatJSON

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.

SettingValue
SourceReddit URL: one subreddit per task, e.g. https://www.reddit.com/r/headphones/; repeat for each community in the domain
DataSubreddit: Name, Subreddit URL, Subreddit title, Description, Number of members, Creation date, Subreddit rules, Moderator list
Sort / time windowNot available for URL tasks
Item limitThe same value for every task, e.g. the default 50
RunFor a domain of 200 communities, loop over the list with the REST API
FormatCSV

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.

SettingValue
SourceReddit URL: one profile per task, built from the Username column as https://www.reddit.com/user/name/
DataUser: Username, Post karma, Comment karma, User creation date, Moderator status, NSFW status, User URL
Item limitThe same value for every task, e.g. the default 50
RunScript the loop over unique usernames via the REST API; sample authors if there are thousands
FormatCSV

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 byHowWatch out for
Keyword clusterOne task per group of up to 9 related termsThe same post matching terms in two tasks
Sort orderSame terms with Top, New and RelevanceOverlap between sorts; dedupe on Post URL
Time windowLast week for recent data, all time for depthWindows are nested, not disjoint, so they overlap
SubredditOne task per subreddit URLThe same post can also turn up in your keyword tasks
Post URLOne comment task per Post URL from your post exportThousands 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/fields to list field names, and the OpenAPI 3.1 spec at /v1/openapi.json for request schemas
  • POST /v1/scrapes for each task in your split plan, with either keyword searches or a single url
  • GET /v1/scrapes/{id} to check status, and POST /v1/scrapes/{id}/cancel to stop a task you no longer need
  • GET /v1/scrapes/{id}/results to download into your storage or warehouse
  • GET /v1/usage to 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.