Nodes/Claude Code ComfyUI Nodes/Claude Reddit Scraper
ComfyUI Node

Claude Reddit Scraper

Scrape Reddit with a real browser, no API key, no Reddit API

By christian-byrne·Created about a year ago·Updated about a year ago· 34
Claude Reddit Scraper
  • memory
  • previous_output
  • output
  • scraped_data
  • summary
  • item_count
source_typesubreddit
sourceprogramming
scrape_modecomments
max_items10
modelsonnet
sort_byhot
time_filterday
include_metadatatrue
max_comment_depth2

Claude Reddit Scraper is the pack's flashiest node and the one most people find it for: it pulls Reddit posts and comment threads and turns them into structured JSON, all without a Reddit API key. Instead of hitting the API, it tells Claude Code to drive a real browser through the Playwright MCP server, click around the actual site, and save what it finds. That's the whole trick - you're trading API access for a browser doing what a human would.

The intended pipeline is right there in the pack: scrape a subreddit's comments, feed the JSON into Claude Code Execute with one of the bundled commands (like reddit-video-script-simple.md), and out comes a TikTok/YouTube Shorts script. Reddit-to-content farms are the pack's founding use case, and it shows.

How it works

How it works: the node builds a Reddit URL from your inputs, makes sure a Playwright MCP server is configured (it runs claude mcp add-json for playwright-mcp-server if it isn't there), then fires claude -p --max-turns 15 --allowedTools mcp__playwright --dangerously-skip-permissions at it with a long, detailed scraping prompt. Results land in a reddit_scrape_* folder under claude_code_outputs/ as reddit_data.json plus a scraping_summary.txt, and the node reads both back out for you. There's a hard 10-minute timeout on the run.

The inputs that matter

  • source_type / source - url, subreddit, search, or user. Type the subreddit name plain (programming), or paste a full URL. sort_by and time_filter only apply in subreddit mode.
  • scrape_mode - comments, posts, both, or metadata. The default, comments, clicks into the single most-active thread and crawls it to max_comment_depth levels.
  • max_items (1–100, default 10) and include_metadata (author, score, date, flair, awards) control how deep the crawl goes.

It also takes memory and previous_output as optional context, same as the Execute node. Outputs: output (CLAUDE_OUTPUT, for chaining into Execute), scraped_data (the JSON), summary (the text summary), and item_count (how many items actually came back).

Installing

Install: ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/christian-byrne/claude-code-comfyui-nodes

and restart. The node needs the claude CLI signed in, same as every node in this pack - and it needs the Playwright MCP server binary installed, which the node does not install for you. The MCP config it writes assumes playwright-mcp-server is already on your PATH; if scraping fails with the browser never launching, that's why. Get it with npm install -g @playwright/mcp or pip install playwright-mcp-server.

Common issues

Where people get burned: Reddit fights back. Bot walls, "you're doing too much" rate limits, and the occasional login wall are the norm, and a 10-minute timeout with partial data is a common failure mode (the node still returns whatever it got before dying). Also note it hardcodes --dangerously-skip-permissions, so it will open a real browser and click unprompted - don't run it on a headless box and expect it to stay invisible, and keep an eye on it the first time. It's a scraper with good ergonomics, but it's still a scraper: Reddit changes its HTML, Playwright configs rot, and max_items is a target, not a guarantee. Check item_count before you trust the JSON downstream.

Categoryclaude_code/scrapers

Inputs (11)

NameTypeDefaultDescription
source_typeCOMBOsubredditType of Reddit source to scrape
sourceSTRINGprogrammingReddit URL, subreddit name, search query, or username
scrape_modeCOMBOcommentsWhat to scrape from Reddit
max_itemsINT101–100Maximum items to scrape
modelCOMBOsonnetClaude model to use
sort_byoptCOMBOhotSort order for posts (subreddit mode only)
time_filteroptCOMBOdayTime filter for top/controversial posts
include_metadataoptBOOLEANtrueInclude post metadata (author, score, date, etc)
max_comment_depthoptINT21–10Maximum comment thread depth to scrape
memoryoptCLAUDE_MEMORYAdditional context/memory for Claude
previous_outputoptCLAUDE_OUTPUTOutput from previous Claude execution

Outputs (4)

NameTypeDescription
outputCLAUDE_OUTPUT
scraped_dataJSON
summarySTRING
item_countINT