← Catalog · Reddit RAG pack guide · Reddit RAG dump · Actor
How to get historical Reddit posts and comments by subreddit and date range
26 Oct 2026 · benthepythondev
Reddit's own listings only reach back so far. If you need a subreddit's posts from years ago, or every post on a topic inside a fixed date window, you need an archive. The Reddit Archive Scraper works as a Pushshift alternative. You give it subreddits, an optional keyword, UTC date bounds and a post cap, and it returns structured JSON or CSV. It can also return each post's archived comments.
The oldest date verified so far is r/Python's first archived post on 2008-01-25. That came from a cloud run on October 25, 2026, sorted oldest-first with no start date set.
What you get
Each row has a type field set to post or comment, so you can split the two or join them back together later.
Post rows include:
id,title,selftext(the post body),author,subredditscore,upvote_ratio,num_commentscreated_utc(Unix epoch) andcreated_iso(ISO timestamp)permalink,url(the link target, which for image posts is the image itself),domain,link_flair_text- Flags:
is_self,is_video,over_18,locked,stickied,spoiler,total_awards_received
Comment rows (only when you turn comments on) include:
id,post_id,parent_id,link_id,body,author,subredditscore,created_utc,created_iso,permalinkis_submitter,total_awards_received
Real example output
These two rows came from an actual call against r/webscraping. A few flag fields are left out to keep it short.
[
{
"type": "post",
"id": "1wzf7jo",
"title": "Claude Code refusing to build scraper. Any way around this?",
"selftext": "Claude Code is refusing to build a scraper because it doesn't want to violate the websites terms and conditions. Is there any way around this?",
"author": "RayDonavanProg",
"subreddit": "webscraping",
"score": 1,
"upvote_ratio": 1,
"num_comments": 0,
"created_utc": 1791322996,
"created_iso": "2026-10-06T21:43:16+00:00",
"permalink": "https://www.reddit.com/r/webscraping/comments/1wzf7jo/claude_code_refusing_to_build_scraper_any_way/",
"domain": "self.webscraping",
"link_flair_text": null,
"is_self": true,
"over_18": false
},
{
"type": "post",
"id": "1wzeinr",
"title": "Reading this for the first time",
"selftext": "",
"author": "redittburneraccount",
"subreddit": "webscraping",
"score": 1,
"num_comments": 0,
"created_iso": "2026-10-06T21:14:41+00:00",
"url": "https://i.redd.it/jefp5qyuxwth1.jpeg",
"domain": "i.redd.it",
"link_flair_text": "Getting started 🌱",
"is_self": false
}
]
On a text post, is_self is true and the body is in selftext. On an image or link post, selftext is empty and url points to the content.
What people use it for
These come straight from the README:
- Building RAG corpora. Mainly for AI engineers who need years of Reddit, not just the latest ~1,000 posts. There's a linked n8n workflow (reddit-archive to Sheets/Slack) that turns the rows into Markdown and a Google Sheets export for retrieval projects.
- Backfilling a database with a subreddit's history, so a live collector only has to handle new posts from then on.
- Sentiment and research datasets, where you need posts and comments for a defined window.
- Studying how a topic was discussed over years. Combine a subreddit with a keyword and walk the timeline oldest-first.
The step-by-step n8n import and a tested first input are in the historical Reddit RAG pack guide.
How to run it on Apify
Open the actor at apify.com/benthepythondev/reddit-archive-scraper and fill in:
subreddits: one or more names, without ther/. This field is required.searchQuery: an optional keyword.afterDate/beforeDate: optional UTC bounds for the window.maxPosts: a cap on the number of posts.- Sort order: oldest-first or newest-first.
includeComments: turn it on if you also want each post's archived comments.
Results go into an Apify dataset, and you can download that as JSON or CSV. To see the inputs filled in, start from the Archive historical Python posts example.
Pricing on the Free tier, before plan discounts: each saved post or comment costs $0.003. If comments are on and a post returns at least one eligible comment, that post's thread adds $0.005, charged once per post. The start event is $0.00005 at 512 MB. The README gives two examples: 250 posts with comments off comes to $0.75005, and 3 posts plus 6 comments across 3 non-empty threads comes to $0.04205.
How to call it as an API on RapidAPI
If you'd rather call it from your own code with a RapidAPI key, it's listed at rapidapi.com/benthepythondev0/api/reddit-archive-scraper. The output rows have the same shape as the ones above.
Honest limits
- Coverage and freshness vary. The README says plainly that archive coverage isn't complete. The verified checks (250 unique posts oldest-first and 250 newest-first over January 2024, plus a small comment check) only prove correct output for those inputs. Run a small dated sample before you start a large backfill.
- No search across all of Reddit. The public archives no longer support it, so you have to name at least one subreddit.
maxPostscaps posts, not rows. With comments on, both the row count and the bill grow past the cap. You can set Apify's maximum run charge as a separate budget limit.- Scores are what the archive holds. In the sample rows above, recent posts show low scores and
num_commentsof 0. Don't treat those numbers as the post's current live values. - Empty runs still cost something. An empty result has no result or thread charge, but the start event still applies.
If you'd rather not run it yourself, the README also offers a managed weekly feed with backfilled history and a free sample first.
Affiliate if you still need an Apify account: apify.com/?fpr=qolupv. I may earn a commission; the price you pay does not change.