reddit-fetch
Skill by ykdojo
Fetches Reddit listings, searches and threads through Reddit's JSON API using a browser session. It first arrives at Reddit via a DuckDuckGo redirect to set a session cookie. Useful for researching topics on Reddit or when Reddit returns 403 or blocked errors.
Install reddit-fetch
Built from the published package, never by AI.
git clone --depth 1 https://github.com/ykdojo/claude-code-tips /tmp/claude-code-tips && mkdir -p ~/.claude/skills && cp -r /tmp/claude-code-tips/skills/reddit-fetch ~/.claude/skills/reddit-fetchRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/ykdojo/claude-code-tips /tmp/claude-code-tips && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/claude-code-tips/skills/reddit-fetch ~/.gemini/antigravity-cli/skills/reddit-fetchAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
reddit-fetch is an agent skill that reads content from Reddit through its JSON API. Reddit blocks most automated access, so the skill uses a browser session in Playwright. It first opens a DuckDuckGo search result that redirects to Reddit, which sets a Reddit session cookie. After that, the browser can load .json URLs for subreddit listings, search results and threads.
The skill gives step-by-step instructions for the DuckDuckGo hop, including the rut token the redirect link needs. It shows how to parse listings and comments with JavaScript, and how to scrape the rendered page for more comments. It also covers a curl fallback that usually returns 403, plus pacing rules for rate limits. It suits users who research Reddit with an AI assistant.
Written from the project's SKILL.md and checked against it.
What it can do
- DuckDuckGo-hop unlockSets a Reddit session cookie by navigating to a DuckDuckGo result redirect before any .json fetch.
- Subreddit listingsFetches hot, new, top or rising listings as JSON, with recency filters for top and new.
- Subreddit searchRuns search.json queries restricted to one subreddit, sorted by new with a time window.
- Thread and comment fetchReads a post and its comment tree from the comments JSON, with a limit and sort option.
- Rendered page scrapeReads post title and comments from the shreddit DOM to get more comments than the JSON limit.
- curl fallbackTries a direct curl request with a browser User-Agent, noted as usually blocked with 403.
- Rate limit handlingAdvises sequential requests, short pauses, and retries on empty responses or HTTP 429.
What you need
- Playwright MCP server
- A browser profile that Playwright can use
- jq, for the curl path
- Claude for Chrome, optional fallback when Playwright is not available
Try asking
- Find recent r/LocalLLaMA threads about quantization and summarize the top comments
- Search r/webdev for posts from this week about React Server Components
- Get the top 15 posts from r/programming this month with their scores
Good to know
- curl requests usually return 403, so the browser session is the main path
- The session cookie can lapse and needs the DuckDuckGo hop to be repeated
- Reddit rate-limits aggressively, so requests must run one at a time
- The DuckDuckGo hop may land on a different Reddit page than the one searched for
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/reddit-fetch/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md5 KB
Alternatives to reddit-fetch
All alternatives →Box lets an AI assistant search, read, upload, download, move, rename, delete, restore and share Box content. It also manages comments and metadata. It suits people who work with files stored in Box.
Guides AI assistants in using n8n-mcp MCP tools to search nodes, validate configs, browse templates and manage n8n workflows. Aimed at people building n8n workflows through MCP.
Manages citations across the research and writing process. It covers searching Google Scholar and PubMed, converting DOIs, PMIDs and arXiv IDs to BibTeX, and validating bibliographies. It is for researchers building bibliographies for manuscripts or theses.
Exa Search is a skill that guides an AI assistant to use the Exa MCP server for neural search. It covers web pages, code, companies, and people, and is for users who need current information or research during development tasks.
Runs recent community and social trend research over the last 30 days. It suits teams who need to know what people are saying now about a topic or launch.
seo-flow adds the FLOW SEO framework to Claude SEO. It surfaces stage-specific AI prompts from the FLOW knowledge base across the Find, Leverage, Optimize and Win stages. It is for SEO practitioners who want evidence-led prompts.
Compare with box, n8n-mcp-tools-expert or citation-management
reddit-fetch: common questions
Why does curl get 403 from Reddit?
The source says Reddit now hard-blocks automated access, and curl gets 403 essentially every time, whatever the User-Agent. The skill recommends a browser session instead.
What is the DuckDuckGo hop?
It is a navigation to a DuckDuckGo search result redirect that lands on a real Reddit page and sets a session cookie. After that, .json URLs can be fetched in the same browser session.
What should I do if I see a blocked page mid-session?
The source says a challenge page means the cookie lapsed, so you should repeat the DuckDuckGo hop before fetching again.
How do I install reddit-fetch?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is reddit-fetch free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is reddit-fetch safe to use?
It scores 78 of 100. Grades: maintenance B, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to reddit-fetch?
Similar skills: box, n8n-mcp-tools-expert, citation-management, exa-search.
