Skip to content

Latest commit

Β 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Reddit Scraper API Suite: Subreddits, Search, Posts & Nested Comments ($1 / 1K)

Available on Apify n8n Creator Hub Zero Login Pricing

The fastest zero-login Reddit Scraper API suite on Apify ($1 / 1,000 items). Extract subreddit feeds, keyword brand mentions, posts, and deep nested comment trees to JSON, CSV, Python, or n8n.

πŸš€ Try Live on Apify β€’ ⚑ Official n8n Creator Hub β€’ πŸ”§ 38 Free n8n Templates β€’ πŸ“– Documentation & Schemas β€’ πŸ“š Engineering Playbooks


πŸ€– Reddit Scraper API Suite: Subreddits, Search, Posts & Nested Comments ($1 / 1K)

Try it for Free
⚑ 1-Click Free Trial: Test live queries using Apify's $5 free monthly credit β€’ Zero login or cookies required


πŸ“¦ Included in This Repository (Python Quickstarts, n8n Workflows, MCP & Sample Data)

This repository contains ready-to-run Python SDK scripts, 1-click n8n automation workflow .json templates, AI Agent MCP configuration (.cursor/mcp.json), and sample output datasets (JSON & CSV):

Extraction Engine 🐍 Python SDK Quickstart ⚑ n8n Workflow Template πŸ“Š Sample Output πŸš€ Cloud Console
Reddit Scraper & Media API: Posts, Users & Comments
unitbytes/reddit-scraper β€’ Full Schema β€’ Engineering Playbook
examples/run_reddit_scraper.py n8n/reddit-scraper-n8n-workflow.json JSON · CSV ⚑ Run on Apify
Reddit Search Scraper: Brand Monitoring & B2B Leads
unitbytes/reddit-search-scraper β€’ Full Schema β€’ Engineering Playbook
examples/run_reddit_search_scraper.py n8n/reddit-search-scraper-n8n-workflow.json JSON · CSV ⚑ Run on Apify
Reddit Comments Scraper: Comment Trees, Replies & Sentiment
unitbytes/reddit-comments-scraper β€’ Full Schema β€’ Engineering Playbook
examples/run_reddit_comments_scraper.py n8n/reddit-comments-scraper-n8n-workflow.json JSON · CSV ⚑ Run on Apify
Reddit Subreddit Scraper: Hot Posts & Subreddits
unitbytes/reddit-subreddits-scraper β€’ Full Schema β€’ Engineering Playbook
examples/run_reddit_subreddits_scraper.py n8n/reddit-subreddits-scraper-n8n-workflow.json JSON · CSV ⚑ Run on Apify

πŸ› οΈ Extraction Engines in This Suite

πŸš€ Reddit Scraper & Media API: Posts, Users & Comments (unitbytes/reddit-scraper)

Scrape Reddit posts, subreddits, comments, user profiles & HD media without API keys. Fast Reddit scraper API for hot posts, RAG & LLM datasets.

Key Capabilities

  • Full Subreddit Feed Extraction: Scrape Hot, New, Top, and Rising feeds across any public or NSFW subreddit with custom time filters (day, week, month, year, all-time).
  • Global Keyword & Multi-Subreddit Search: Execute cross-Reddit or targeted subreddit search queries to monitor brand mentions, emerging discussions, and sentiment.
  • Nested Discussion Comments: Optionally extract full nested discussion threads and comment trees with author karma, score, awards, and timestamp metadata.
  • Permanent Media & Video Links: Captures direct unwatermarked image URLs, Reddit video streams, external links, cross-posts, and self-text content in clean tabular format.

Python SDK Quickstart (examples/run_reddit_scraper.py)

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "startUrls": [],
    "searchQuery": "artificial intelligence",
    "subreddit": ""
}

run = client.actor("unitbytes/reddit-scraper").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("title"), item.get("url"), item.get("itemType"))

Sample Output Schema (samples/reddit-scraper-sample.json)

{
  "itemType": "post",
  "id": "1x0b0f5",
  "title": "Fraudster jailed for using 10K bots and AI songs to outstream Taylor Swift",
  "subreddit": "technology",
  "author": "music_fan",
  "score": 1542,
  "upvoteRatio": 0.96,
  "numComments": 85,
  "postType": "image",
  "url": "https://www.reddit.com/r/technology/comments/1x0b0f5/fraudster_jailed/",
  "permalink": "https://www.reddit.com/r/technology/comments/1x0b0f5/fraudster_jailed/",
  "createdAt": "2026-10-08T07:14:53.000Z",
  "mediaUrls": [
    "https://i.redd.it/fraudster-jailed-sample.jpeg"
  ],
  "scrapedAt": "2026-10-08T11:40:00.000Z"
}

Frequently Asked Questions

Q: Do I need official Reddit API credentials or OAuth approvals? No. You do not need to register on the Reddit Developer Portal, undergo app reviews, or pay expensive monthly API subscription fees. Just configure your inputs and start scraping immediately.

Q: Are media links permanent or do they expire? All media links are 100% permanent. Reddit default preview images contain temporary tokens that expire after a few hours. Our engine automatically transforms every media URL into a permanent, non-expiring CDN link (https://i.redd.it/...

Q: How are nested comment threads structured? When scrapeComments: true or when providing direct post URLs, the scraper extracts both top-level comments (depth: 0, parentId: null) and nested reply chains (depth: 1, 2, 3...), where parentId points directly to the parent comment's id and postId points to...

Q: What happens if a search has 0 results or a subreddit is private? In accordance with our zero-charge guarantee, the actor cleanly detects empty states, logs a friendly status message, stores 0 error records, and exits with code 0. You are never charged for zero-result executions.


πŸš€ Reddit Search Scraper: Brand Monitoring & B2B Leads (unitbytes/reddit-search-scraper)

Search Reddit posts, comments, communities, users & media by keyword. Fast Reddit search scraper for brand monitoring, B2B lead generation & alerts.

Key Capabilities

  • All 5 Native Search Dimensions: The official Reddit API restricts search primarily to basic post endpoints. UnitBytes unlocks all 5 search tabsβ€”including Subreddits, Users, Media, and Commentsβ€”in one unified API.
  • No Commercial Approval Gate: Official API access requires commercial licensing agreements and rigorous developer verification. UnitBytes operates instantly with zero credentials.
  • Permanent HD Media CDN Links: Standard API queries return media URLs that expire in hours. UnitBytes normalizes all media assets to permanent CDN URLs so your reports and dashboards never break.
  • Unbeatable Unit Economics: At $0.50–$1.00 per 1,000 results with no monthly commitments, you can run daily brand monitoring at 90% lower cost than official enterprise licensing.

Python SDK Quickstart (examples/run_reddit_search_scraper.py)

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "searchQuery": "artificial intelligence",
    "subreddit": ""
}

run = client.actor("unitbytes/reddit-search-scraper").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("title"), item.get("searchQuery"), item.get("url"))

Sample Output Schema (samples/reddit-search-scraper-sample.json)

{
  "itemType": "post",
  "id": "1x0b0f5",
  "title": "Top AI tools changing small business operations in 2026",
  "subreddit": "smallbusiness",
  "author": "digital_growth_lead",
  "score": 420,
  "upvoteRatio": 0.94,
  "numComments": 85,
  "postType": "image",
  "url": "https://www.reddit.com/r/smallbusiness/comments/1x0b0f5/...",
  "permalink": "https://www.reddit.com/r/smallbusiness/comments/1x0b0f5/...",
  "createdAt": "2026-10-10T14:20:00.000Z",
  "mediaUrls": [
    "https://i.redd.it/example_asset.jpg"
  ],
  "searchQuery": "AI tools",
  "scrapedAt": "2026-10-11T16:00:00.000Z"
}

Frequently Asked Questions

Q: Can I search within a specific subreddit? Yes. Fill in both searchQuery and subreddit. The scraper will restrict search results strictly to that community.

Q: Can I search for user profiles or communities? Yes. Change searchTab to communities to find subreddits, or people to find user accounts and authors.

Q: What happens if no results match my search? The actor finishes cleanly with exit code 0, outputs an empty dataset, and charges $0.00.

Q: Are the media links permanent? Yes. All image and video links are automatically converted to permanent high-definition CDN links that never expire in your spreadsheets or dashboards.


πŸš€ Reddit Comments Scraper: Comment Trees, Replies & Sentiment (unitbytes/reddit-comments-scraper)

Scrape Reddit comments, full comment trees, and nested replies from any post URL. Fast Reddit comments scraper for sentiment analysis & LLM data.

Key Capabilities

  • Skip Weeks of Waiting & Strict Approval: Reddit requires commercial applications, legal reviews, and enterprise agreements to access comment streams. UnitBytes lets you pull full threads immediately.
  • No Expensive Monthly Contracts: The official API requires enterprise commitments starting at $1,000+/mo. UnitBytes charges from $0.50 per 1,000 comments on a pure pay-per-result basis.
  • Full Depth & Nested Hierarchy: While standard API endpoints limit comment depth and require pagination loops, UnitBytes harvests the complete conversational hierarchy (depth 0, 1, 2, 3+) in a single run.
  • Zero Formatting Headaches: Reddit returns deeply nested JSON trees that complicate spreadsheet analysis. UnitBytes flattens discussions into clean, relational rows that open directly in Excel or Google Sheets.

Python SDK Quickstart (examples/run_reddit_comments_scraper.py)

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "startUrls": [
        {
            "url": "https://www.reddit.com/r/technology/comments/1x0b0f5/fraudster_jailed_for_using_10k_bots_and_ai_songs/"
        }
    ]
}

run = client.actor("unitbytes/reddit-comments-scraper").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("itemType"), item.get("postId"), item.get("author"))

Sample Output Schema (samples/reddit-comments-scraper-sample.json)

{
  "itemType": "comment",
  "id": "m3k0x1y",
  "postId": "1x0b0f5",
  "parentId": null,
  "author": "tech_enthusiast",
  "body": "Streaming platforms need stricter auditing mechanisms. 10k bots running 24/7 is an insane amount of synthetic streams.",
  "score": 342,
  "depth": 0,
  "isSubmitter": false,
  "createdAt": "2026-10-11T12:30:15.000Z",
  "permalink": "https://www.reddit.com/r/technology/comments/1x0b0f5/comment/m3k0x1y/",
  "scrapedAt": "2026-10-11T16:01:26.000Z"
}

Frequently Asked Questions

Q: Do I need a Reddit account or API key? No. You can run this actor immediately with zero API keys, developer tokens, or Reddit accounts.

Q: How do I open the results in Excel or Google Sheets? Once your run finishes, click Export on the Apify dataset tab and choose CSV or Excel. The data is pre-flattened so every column loads cleanly with zero formatting errors.

Q: Can I reconstruct who replied to whom? Yes. Every comment record has depth, id, parentId, and postId. Top-level comments have depth: 0 and parentId: null. Nested replies (depth: 1, 2, 3...) set parentId directly to the id of the comment they are replying to.

Q: How many comments can I extract from a post? You can extract anywhere from 1 up to 5,000 comments and nested replies per post by adjusting maxCommentsPerPost.


πŸš€ Reddit Subreddit Scraper: Hot Posts & Subreddits (unitbytes/reddit-subreddits-scraper)

Scrape Reddit subreddits and subreddit posts (Hot, New, Top, Rising) with HD media. Fast Reddit subreddit scraper & hot posts feed extractor.

Key Capabilities

  • Zero API Developer Accounts or Approvals: Official access requires navigating Reddit's gated developer portal and satisfying strict commercial usage restrictions. UnitBytes works immediately with 1 click.
  • Fraction of Official API Costs: Official enterprise access involves $1,000+/mo commitments. UnitBytes offers flexible Pay-Per-Event pricing starting at $0.50 per 1,000 posts with zero minimums.
  • Permanent HD Media Links: Stop dealing with expiring media URLs that break your spreadsheets after a few hours. UnitBytes normalizes all media links to permanent CDN assets.
  • Instant Multi-Subreddit Batching: Scrape multiple communities in a single automated run without managing OAuth2 token refreshes, rate limits, or pagination cursors.

Python SDK Quickstart (examples/run_reddit_subreddits_scraper.py)

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {
    "subreddit": "technology",
    "startUrls": []
}

run = client.actor("unitbytes/reddit-subreddits-scraper").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item.get("title"), item.get("url"), item.get("itemType"))

Sample Output Schema (samples/reddit-subreddits-scraper-sample.json)

{
  "itemType": "post",
  "id": "1x0b0f5",
  "title": "Major cybersecurity update released for enterprise systems",
  "subreddit": "technology",
  "author": "security_researcher",
  "score": 1250,
  "upvoteRatio": 0.96,
  "numComments": 142,
  "postType": "link",
  "url": "https://www.reddit.com/r/technology/comments/1x0b0f5/...",
  "permalink": "https://www.reddit.com/r/technology/comments/1x0b0f5/...",
  "createdAt": "2026-10-11T10:15:00.000Z",
  "selftext": "",
  "flair": "Cybersecurity",
  "isOver18": false,
  "isPinned": false,
  "mediaUrls": [
    "https://i.redd.it/security_infographic.png"
  ],
  "scrapedAt": "2026-10-11T16:00:00.000Z"
}

Frequently Asked Questions

Q: Can I scrape multiple subreddits in one run? Yes. Use the startUrls field to add multiple subreddit URLs. The actor will scrape each one in order and merge them into one dataset.

Q: Can I extract comments along with the posts? Yes. Toggle scrapeComments: true and specify maxCommentsPerPost. The actor will harvest full discussions and replies for each post.

Q: What happens if a subreddit does not exist or is private? The actor finishes cleanly with exit code 0, outputs an empty dataset, and charges $0.00.

Q: Are image and video links permanent? Yes. Expiring Reddit media links are automatically converted to permanent high-definition CDN links that never expire.


⚑ Quick Installation & Local Usage

1. Run with Python (apify-client)

git clone https://github.com/unitbytes/Reddit-Scraper-API.git
cd Reddit-Scraper-API
pip install -r requirements.txt
export APIFY_API_TOKEN="your_apify_api_token"
python examples/run_reddit_scraper.py

2. Import into n8n (Self-Hosted or Cloud)

  1. Open any .json file inside the n8n/ folder (or copy in 1 click from unitbytes.com/n8n / n8n.io/creators/unitbytes).
  2. Press Ctrl+V / Cmd+V directly onto your n8n workflow canvas.
  3. Paste your Apify API Token into Node 1. Set Apify Token & Input and click Test Workflow.

3. Use with AI Coding Agents (Cursor, Windsurf & Claude Code MCP)

This repository includes a ready-to-use Model Context Protocol configuration at .cursor/mcp.json pointing to https://mcp.apify.com with this suite's UnitBytes actors pre-registered. Open this folder in Cursor or Windsurf to let your AI agent run live extractions and inspect schemas automatically.


πŸ’Ό Need Done-For-You Datasets or Custom Pipelines?

Don't want to manage API tokens or scripts? UnitBytes Data Delivery provides ready-to-use CSV, Excel (.xlsx), Google Sheets, or Webhook feeds tailored to your exact target keywords, cities, or categories.

Releases

Packages

Contributors