Research Reddit Posts and Comments from Claude, Cursor or the API


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:

ToolWhat it does
reddit_mentionsCounts matching posts and total comments across our database, by subreddit and by month (up to 36 months).
search_redditSearches posts across collected subreddits using web-search syntax ("exact phrase", or, -exclude), sorted by newest, top or most_comments.
get_reddit_commentsReads the comment tree of a post, or expands the replies under a specific comment with parent_comment_id.
list_tracked_subredditsLists the subreddits you track, when each was last collected and how many slots you have left.
track_subredditsStarts collecting a new subreddit (checked with Reddit first). Searchable within a few minutes.
untrack_subredditStops 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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "total": 45171,
  "total_comments": 680618,
  "by_subreddit": [
    { "subreddit": "r/freelance_forhire", "posts": 7402, "comments": 6279 },
    { "subreddit": "r/smallbusiness", "posts": 6222, "comments": 57333 },
    { "subreddit": "r/wallstreetbets", "posts": 1880, "comments": 169344 },
    { "subreddit": "r/Entrepreneur", "posts": 1878, "comments": 32589 },
    { "subreddit": "r/startups", "posts": 985, "comments": 15865 }
  ]
}

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 fees matches fee).
  • "quoted words" match as an exact phrase.
  • or matches either term.
  • -word leaves 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_1ol8edm in r/smallbusiness: “How are payment processors getting away with this??” (score 301, 301 comments)
  • t3_1ruedgx in r/smallbusiness: “Stripe holding $1.2M of our operating funds for 6+ weeks with No Real Support” (score 146, 184 comments)
  • t3_1qlt8xl in r/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:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
  "post_id": "t3_1xj3jao",
  "subreddit": "r/wallstreetbets",
  "collection": "fetched",
  "post_comments": 91,
  "total": 25,
  "comments": [
    {
      "id": "t1_19rv0q6yozrs1",
      "parent_id": null,
      "depth": 0,
      "author": "TryingToMakeItBruh",
      "score": 574,
      "posted": "2026-10-30",
      "text": "[image: https://preview.redd.it/rddt-leadership-is-one-of-us-v0-mg72vwizwiyh1.jpeg?...]"
    },
    {
      "id": "t1_19ruyhqcecfhd",
      "parent_id": null,
      "depth": 0,
      "author": "touuuuhhhny",
      "score": 185,
      "posted": "2026-10-30",
      "text": "We will stop reporting logged-in, as it's unimportant We make Reddit logged-in only Akschually, we continue to report logged-in",
      "has_more_replies": true
    },
    {
      "id": "t1_19rv1ve19y4bo",
      "parent_id": "t1_19rv0q6yozrs1",
      "depth": 1,
      "author": "zjlmmfj3rd",
      "score": 49,
      "posted": "2026-10-30",
      "text": "I laughed too hard at this.",
      "has_more_replies": true
    }
  ]
}

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 (pages 1 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, pass pages=2 or pages=3 to 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 as parent_comment_id (for example parent_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_comments reports the full comment count on Reddit (such as 91 on t3_1xj3jao or 12096 on t3_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

1
2
3
4
curl -G "https://thestack.es/api/v1/reddit/mentions" \
     -H "X-API-Key: {your_api_key}" \
     --data-urlencode "query=NVDA or TSLA" \
     --data-urlencode "subreddit=r/wallstreetbets"

Search Reddit Posts

1
2
3
4
5
6
curl -G "https://thestack.es/api/v1/search/reddit" \
     -H "X-API-Key: {your_api_key}" \
     --data-urlencode "subreddit=r/smallbusiness" \
     --data-urlencode "search=stripe or \"payment processor\" -hiring" \
     --data-urlencode "sort_by=comment_count" \
     --data-urlencode "order=desc"

Read Post Comments or Expand a Reply Thread

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Fetch top comments for a post (pages=1..3, sort=top|newest)
curl -G "https://thestack.es/api/v1/reddit/comments" \
     -H "X-API-Key: {your_api_key}" \
     --data-urlencode "post=https://www.reddit.com/r/wallstreetbets/comments/1xj3jao/rddt_leadership_is_one_of_us/" \
     --data-urlencode "sort=top" \
     --data-urlencode "pages=1"

# Expand collapsed replies under a specific comment with has_more_replies=true
curl -G "https://thestack.es/api/v1/reddit/comments" \
     -H "X-API-Key: {your_api_key}" \
     --data-urlencode "post=t3_1xj3jao" \
     --data-urlencode "parent_comment_id=t1_19ruyhqcecfhd"