Reddit Scraper API: Extract Reddit Data for Research & Analysis
Reddit is a goldmine for market research, product feedback, and sentiment analysis. This guide shows you how to scrape subreddits, posts, comments, and ads.
Reddit API Endpoints
| Endpoint | Description |
|---|---|
| Subreddit | Get posts from a subreddit |
| Post Comments | Get comments from a post |
| Simple Comments | Get limited comments easily |
| Search | Search Reddit posts |
| Ads Search | Retired: Reddit's Ad Library now requires a login |
| Ad Details | Retired: Reddit's Ad Library now requires a login |
Subreddit Scraper
Get posts from any subreddit:
const response = await fetch('https://api.sociavault.com/v1/scrape/reddit/subreddit?subreddit=programming', {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const subreddit = await response.json();
Response
{
"subreddit": {
"name": "programming",
"title": "programming",
"description": "Computer Programming",
"subscribers": 5800000,
"activeUsers": 12500
},
"posts": [
{
"id": "abc123",
"title": "Why I switched from Python to Rust",
"author": "rust_evangelist",
"upvotes": 2500,
"downvotes": 150,
"comments": 450,
"url": "https://www.reddit.com/r/programming/comments/abc123",
"createdAt": "2026-01-08T10:30:00Z",
"flair": "Discussion",
"isStickied": false,
"awards": 5
}
],
"hasMore": true
}
Post Comments Scraper
Get all comments from a Reddit post:
const response = await fetch('https://api.sociavault.com/v1/scrape/reddit/post/comments?url=https://www.reddit.com/r/programming/comments/abc123', {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const comments = await response.json();
Response
{
"comments": [
{
"id": "xyz789",
"text": "I made the same switch last year and never looked back!",
"author": "developer123",
"upvotes": 350,
"createdAt": "2026-01-08T11:00:00Z",
"replies": [
{
"id": "xyz790",
"text": "What was your biggest challenge?",
"author": "curious_dev",
"upvotes": 45
}
]
}
],
"totalComments": 450
}
Simple Comments
Get a specific number of comments with a cleaner response:
const response = await fetch('https://api.sociavault.com/v1/scrape/reddit/post/comments?url=https://www.reddit.com/r/programming/comments/abc123&trim=true', {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});
Search Reddit
Search posts across Reddit:
const response = await fetch('https://api.sociavault.com/v1/scrape/reddit/search?query=best+API+tools+2026', {
headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const results = await response.json();
Reddit Ads
Reddit ad search and ad details were dropped because Reddit put its Ad Library behind a login wall. For competitor ads, use the Facebook, Google, LinkedIn, or TikTok ad library endpoints instead.
Use Cases
Product Research
Analyze what people say about products:
async function researchProduct(productName) {
const results = await searchReddit(productName);
// Analyze sentiment
const posts = results.posts;
const sentiment = posts.map(p => ({
title: p.title,
upvotes: p.upvotes,
sentiment: analyzeSentiment(p.title)
}));
return sentiment;
}
Market Research
Find trending topics in a niche:
async function analyzeTrends(subredditName) {
const { posts } = await getSubreddit(subredditName);
// Find trending topics
const topics = {};
posts.forEach(post => {
const words = post.title.toLowerCase().split(/\s+/);
words.forEach(w => {
if (w.length > 4) topics[w] = (topics[w] || 0) + post.upvotes;
});
});
return Object.entries(topics)
.sort((a, b) => b[1] - a[1])
.slice(0, 20);
}
Competitor Analysis
Track mentions of competitors:
async function trackCompetitors(competitors) {
const mentions = {};
for (const competitor of competitors) {
const results = await searchReddit(competitor);
mentions[competitor] = {
totalPosts: results.posts.length,
totalUpvotes: results.posts.reduce((s, p) => s + p.upvotes, 0),
sentiment: results.posts.filter(p => p.upvotes > 0).length / results.posts.length
};
}
return mentions;
}
Customer Feedback Mining
Extract feedback from relevant subreddits:
async function mineFeedback(subreddits, keywords) {
const feedback = [];
for (const sub of subreddits) {
const { posts } = await getSubreddit(sub);
const relevant = posts.filter(p =>
keywords.some(k => p.title.toLowerCase().includes(k))
);
for (const post of relevant) {
const { comments } = await getPostComments(post.url);
feedback.push({
post: post.title,
comments: comments.slice(0, 10)
});
}
}
return feedback;
}
Ad Research
This use case relied on the Reddit ads endpoints, which were dropped (see Reddit Ads above). For competitor advertising, use the Facebook, Google, LinkedIn, or TikTok ad library endpoints.
Related Endpoints
- Twitter/X Scraper - Twitter data
- LinkedIn Scraper - LinkedIn data
- Facebook Scraper - Facebook data
Frequently Asked Questions
Can I scrape private subreddits?
No, only public subreddits are accessible. Private communities require membership.
How far back can I get posts?
You can access historical posts through pagination, though Reddit's search has limitations on very old content.
Are NSFW subreddits supported?
The API focuses on SFW content. NSFW subreddits may have limited access.
Can I get user post history?
Currently, the API focuses on subreddit and post-based scraping. User profiles aren't directly supported.
How does this compare to Reddit's official API?
SociaVault provides similar data access without Reddit's strict rate limits and API key requirements.
Get Started
Sign up free and start extracting Reddit data.
Documentation: /docs/api-reference/reddit/subreddit
Found this helpful?
Share it with others who might benefit
Ready to Try SociaVault?
Start extracting social media data with our powerful API. No credit card required.