Reddit Scraper MCP avatar

Reddit Scraper MCP

Pricing

from $0.01 / 1,000 results

Go to Apify Store
Reddit Scraper MCP

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

AutomateLab

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

7 days ago

Last modified

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 dependencies
npm install
# Test with subreddit info
echo '{"tool": "get_subreddit_info", "params": {"subreddit": "technology"}}' | INPUT_STORE=1 apify run
# Test with posts
echo '{"tool": "get_posts", "params": {"subreddit": "artificial", "sort": "hot", "limit": 10}}' | INPUT_STORE=1 apify run
# Test with comments
echo '{"tool": "get_comments", "params": {"postId": "1a2b3c", "subreddit": "technology"}}' | INPUT_STORE=1 apify run
# Test with search
echo '{"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.

ParameterTypeRequiredDescription
toolstringYesTool name: get_subreddit_info, get_posts, get_comments, search_reddit
paramsobjectYesTool-specific parameters (see table below)

Tool Parameters

ToolParameterTypeRequiredDescription
get_subreddit_infosubredditstringYesSubreddit name without r/ prefix
get_postssubredditstringYesSubreddit name without r/ prefix
get_postssortstringNoSort order: hot (default), new, top, rising
get_postslimitnumberNoNumber of posts to fetch, default 25, max 100
get_commentspostIdstringYesReddit post ID (6-character alphanumeric)
get_commentssubredditstringYesSubreddit name for context
search_redditquerystringYesSearch keyword or phrase
search_redditsortstringNoSort: relevance (default), hot, top, new, comments
search_reddittimestringNoTime filter: hour, day, week, month, year, all
search_redditsubredditstringNoLimit search to specific subreddit
search_redditlimitnumberNoNumber of results, default 25, max 100

Tools

ToolDescriptionPrice
get_subreddit_infoReturns subreddit metadata: name, title, description, subscriber count, active users, creation timestamp, NSFW flag, and banner image URL$0.03
get_postsReturns 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_commentsReturns nested comment tree with author, body, score, created timestamp, parent ID, and depth level. Handles MoreComments objects$0.05
search_redditReturns 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:

ToolPrice 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 syntax
node --check src/main.js
# Push to Apify Cloud
apify push
# Run remotely
apify run

License

MIT