Reddit Scraper MCP
Pricing
from $0.01 / 1,000 results
Reddit Scraper MCP
Reddit MCP for AI agents. Programmatic access to subreddit info, posts, comments, and search. Built for sentiment analysis, community intelligence, and market research.
Pricing
from $0.01 / 1,000 results
Rating
0.0
(0)
Developer
AutomateLab
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
1
Monthly active users
7 days ago
Last modified
Categories
Share
Reddit Data API — MCP Server
Access Reddit post submissions, comment threads, subreddit metrics, and search results programmatically. Built for AI agents, autonomous workflows, and applications requiring real-time Reddit data extraction without browser automation.
This MCP server provides a Model Context Protocol interface to Reddit's public data, enabling AI systems to query subreddit information, fetch posts sorted by hot/new/top/rising, retrieve comment trees, and search by keyword. All data returns as structured JSON suitable for immediate parsing, sentiment analysis pipelines, or database ingestion.
Features
- Subreddit Intelligence — Fetch metadata including subscriber count, active user estimates, creation date, description, and NSFW classification
- Post Extraction — Retrieve posts from any public subreddit with configurable sorting (hot, new, top, rising)
- Comment Thread Retrieval — Fetch complete comment trees from any Reddit post with nested reply structure
- Keyword Search — Search Reddit posts by query with time filters (hour, day, week, month, year, all) and sort options (relevance, hot, top, new, comments)
- MCP Protocol Compatible — Full Model Context Protocol implementation with initialize, tools/list, and tools/call methods
- Legacy Fallback Support — Accepts older { "tool": "...", "params": {...} } format for backward compatibility
- Structured JSON Output — All responses return parseable JSON with consistent field names
- No Browser Automation — Direct API calls ensure reliable performance without DOM parsing or page rendering overhead
Quick Start
# Install dependenciesnpm install# Test with subreddit infoecho '{"tool": "get_subreddit_info", "params": {"subreddit": "technology"}}' | INPUT_STORE=1 apify run# Test with postsecho '{"tool": "get_posts", "params": {"subreddit": "artificial", "sort": "hot", "limit": 10}}' | INPUT_STORE=1 apify run# Test with commentsecho '{"tool": "get_comments", "params": {"postId": "1a2b3c", "subreddit": "technology"}}' | INPUT_STORE=1 apify run# Test with searchecho '{"tool": "search_reddit", "params": {"query": "machine learning", "sort": "relevance", "time": "month"}}' | INPUT_STORE=1 apify run
Input
The actor accepts input as JSON via stdin or the key-value store. All parameters are optional unless required by the tool being called.
| Parameter | Type | Required | Description |
|---|---|---|---|
tool | string | Yes | Tool name: get_subreddit_info, get_posts, get_comments, search_reddit |
params | object | Yes | Tool-specific parameters (see table below) |
Tool Parameters
| Tool | Parameter | Type | Required | Description |
|---|---|---|---|---|
get_subreddit_info | subreddit | string | Yes | Subreddit name without r/ prefix |
get_posts | subreddit | string | Yes | Subreddit name without r/ prefix |
get_posts | sort | string | No | Sort order: hot (default), new, top, rising |
get_posts | limit | number | No | Number of posts to fetch, default 25, max 100 |
get_comments | postId | string | Yes | Reddit post ID (6-character alphanumeric) |
get_comments | subreddit | string | Yes | Subreddit name for context |
search_reddit | query | string | Yes | Search keyword or phrase |
search_reddit | sort | string | No | Sort: relevance (default), hot, top, new, comments |
search_reddit | time | string | No | Time filter: hour, day, week, month, year, all |
search_reddit | subreddit | string | No | Limit search to specific subreddit |
search_reddit | limit | number | No | Number of results, default 25, max 100 |
Tools
| Tool | Description | Price |
|---|---|---|
get_subreddit_info | Returns subreddit metadata: name, title, description, subscriber count, active users, creation timestamp, NSFW flag, and banner image URL | $0.03 |
get_posts | Returns array of post objects with title, author, score, upvote ratio, created timestamp, URL, num comments, and post ID. Supports hot/new/top/rising sort | $0.03 |
get_comments | Returns nested comment tree with author, body, score, created timestamp, parent ID, and depth level. Handles MoreComments objects | $0.05 |
search_reddit | Returns search results matching query with post metadata. Includes time filter and sort options for result prioritization | $0.05 |
Output
All tools return structured JSON with consistent formatting:
{"success": true,"tool": "get_subreddit_info","data": {"name": "technology","title": "Technology","description": "...","subscribers": 15000000,"activeUsers": 50000,"createdAt": 1192400700,"nsfw": false},"meta": {"processingTimeMs": 145,"redditRateLimitRemaining": 98}}
Error responses follow the same structure with success: false and an error field:
{"success": false,"tool": "get_posts","error": "Subreddit not found","code": "SUBREDDIT_INVALID"}
Pricing
This actor runs on Apify Cloud and uses pay-per-performance pricing. Each tool invocation costs a fixed amount regardless of result count:
| Tool | Price per call |
|---|---|
get_subreddit_info | $0.03 |
get_posts | $0.03 |
get_comments | $0.05 |
search_reddit | $0.05 |
Minimum cost per run: $0.03. Costs accumulate based on the number of tool calls made during actor execution.
Troubleshooting
"Subreddit not found" error
Verify the subreddit name is spelled correctly and does not include the r/ prefix. Example: use technology not r/technology.
Empty results for valid search query Reddit search has rate limits. Wait 30 seconds between searches. If problem persists, the subreddit may be restricted or the query may violate Reddit's content policies.
Comments returned are collapsed or limited
Some posts have thousands of comments. The actor returns the first 500 nested comments to avoid excessive response sizes. Use the limit parameter to control depth.
Rate limit errors (HTTP 429) Reddit imposes per-IP rate limits. Reduce request frequency. For high-volume use cases, consider running multiple actor instances with different IP addresses via Apify Proxy.
Post ID format confusion
Reddit post IDs are 6-character alphanumeric strings found in the URL: reddit.com/r/technology/comments/abc123/... The post ID is abc123.
Build and Deploy
# Verify syntaxnode --check src/main.js# Push to Apify Cloudapify push# Run remotelyapify run
License
MIT