Research Reddit Posts and Comments from Claude, Cursor or the API
Query Reddit discussions and read full comment trees from Claude, Cursor or the HTTP API — MCP tools plus REST endpoints, no scraping infrastructure to run.
Read time: 5 Minutes, 24 Seconds
Ask your AI assistant what people are saying on Reddit about a ticker, a competitor or a product problem, then have it read the comment threads inside the posts that matter.
The Stack’s MCP server and HTTP API give your assistant access to the Reddit communities we collect, plus on-demand comment scraping for any post you want to read in depth.
If you have not connected your assistant yet, see Use The Stack from Claude, Cursor or VS Code for the one-line setup. To browse charts and tables in the web app, see Scrape, Analyze, and Export Reddit Data.
The Six Reddit Tools
Once connected to https://thestack.es/api/v1/mcp, your assistant has six tools for Reddit research:
| Tool | What it does |
|---|---|
reddit_mentions | Counts matching posts and total comments across our database, by subreddit and by month (up to 36 months). |
search_reddit | Searches posts across collected subreddits using web-search syntax ("exact phrase", or, -exclude), sorted by newest, top or most_comments. |
get_reddit_comments | Reads the comment tree of a post, or expands the replies under a specific comment with parent_comment_id. |
list_tracked_subreddits | Lists the subreddits you track, when each was last collected and how many slots you have left. |
track_subreddits | Starts collecting a new subreddit (checked with Reddit first). Searchable within a few minutes. |
untrack_subreddit | Stops tracking a subreddit and frees a slot. Posts already collected stay searchable. |
Moderator and AutoModerator posts and comments are left out automatically so your context is not spent on sticky rules threads.
How a Research Session Works
1. Size the Topic First (reddit_mentions)
Before reading individual posts, ask where a topic is actually discussed and how much engagement it gets. For example:
- “Where on Reddit do people talk about Stripe, pricing or churn the most, and which subreddits have real discussion versus spam?”
reddit_mentions returns both post counts and comment counts per subreddit and per month:
| |
Because by_subreddit includes total comments alongside post volume, the assistant can see right away that r/freelance_forhire is mostly unanswered job listings (under one comment per post), while r/smallbusiness, r/Entrepreneur and r/wallstreetbets are where the real discussions happen.
You can also compare brands across specific communities:
- “Compare mentions of Hoka, Asics and Nike across r/RunningShoeGeeks, r/Hoka, r/Nike and r/asics by month.”
If you name a subreddit that nobody on The Stack tracks yet, the tool names it in not_collected instead of returning zero and making it look like nobody talks there. If you want it collected, track_subreddits adds it to our hourly collector and fetches its latest thousand posts within a few minutes.
2. Find High-Signal Threads (search_reddit)
Once you know which communities matter, search_reddit finds the posts themselves. Queries work like a web search:
- Every word is required (stemmed in English, so
feesmatchesfee). "quoted words"match as an exact phrase.ormatches either term.-wordleaves out posts containing that word.
For example, to find threads where founders discuss payment processor holds or fees without hiring posts:
- “Find the most commented posts about Stripe, Shopify or payment processors in r/smallbusiness, r/Entrepreneur and r/startups, excluding hiring posts.”
That runs query: 'stripe or shopify or "payment processor" -hiring' with sort: "most_comments" and returns posts such as:
t3_1ol8edminr/smallbusiness: “How are payment processors getting away with this??” (score 301, 301 comments)t3_1ruedgxinr/smallbusiness: “Stripe holding $1.2M of our operating funds for 6+ weeks with No Real Support” (score 146, 184 comments)t3_1qlt8xlinr/Entrepreneur: “i pay shopify $3k a month. they locked my store for 48 hrs becz of a chargeback on a $47 order” (score 396, 142 comments)
Or in r/wallstreetbets, searching NVDA or earnings or calls or puts sorted by most_comments:
t3_1ehjuzj: “I bought $700k worth of Intel stock today” (score 12,811, 12,096 comments)t3_1e6ms9z: “CrowdStrike is not worth 83 Billion Dollars” (score 10,181, 1,755 comments)t3_1ekjk06: “A tldr of what’s been happening on the market.” (score 15,817, 1,467 comments)
3. Read the Comment Tree (get_reddit_comments)
Post titles and bodies only tell half the story. Usually the real answers, workarounds and sentiment live in the replies.
Pass any post ID (t3_1xj3jao) or full Reddit URL to get_reddit_comments:
- “Read the top comments on https://www.reddit.com/r/wallstreetbets/comments/1xj3jao/rddt_leadership_is_one_of_us/ and summarize the reaction.”
| |
How comment collection stays fast and avoids redundant scraping:
- Persisted in Postgres on first read: The first time anyone requests a post’s comments, The Stack fetches the thread from Reddit (
"collection": "fetched") and stores the comments in our database. Subsequent calls return the stored comments immediately ("collection": "cached"). - Page control (
pages1 to 3): By default (pages=1), one page of top-level comments (~25 comments and their visible replies) is collected. If you want a deeper sample of a large thread, passpages=2orpages=3to collect up to ~60 top-tree comments. - Expanding reply branches (
parent_comment_id): When a comment has collapsed replies on Reddit, it carries"has_more_replies": true. Passing its ID asparent_comment_id(for exampleparent_comment_id="t1_19ruyhqcecfhd") fetches and stores the child replies under that specific comment, up to a maximum nesting depth of 3. - Total post comments (
post_comments): Even when you only fetch page 1,post_commentsreports the full comment count on Reddit (such as91ont3_1xj3jaoor12096ont3_1ehjuzj) so you know how large the full thread is.
Calling the Same Endpoints Over HTTP
Every Reddit tool is also available as a standard REST endpoint authenticated with X-API-Key.
Count Mentions by Subreddit and Month
| |
Search Reddit Posts
| |
Read Post Comments or Expand a Reply Thread
| |