App Logo
reddit.com

Search Reddit threads in a subreddit, with post text

Automatically search Reddit threads in a subreddit, with post text on reddit.com. Search one subreddit for a query and get one page of matching threads in Reddit's order, each with title, subreddit, permalink, upvotes, comment count, creation time, flair and the post's full text. Sort and time window are configurable; pass the returned after value to read the next page (null on the last one). Requires being signed in to Reddit. A subreddit that refuses the search (private, banned) fails with its HTTP status. To search several subreddits or queries, run the script once per pair.

Input

query required

Search text, in Reddit's search syntax.

subreddit required

Subreddit name, with or without the r/ prefix.

sort optional
Default: "relevance"
time optional
Default: "year"
after optional

Pass the after value of the previous answer to read the next page.

limit optional

Threads per page.

Default: 25

Output

after required

Cursor for the next page; null on the last page.

query required
threads required
subreddit required
count optional

FAQ

Search one subreddit for a query and get one page of matching threads in Reddit's order, each with title, subreddit, permalink, upvotes, comment count, creation time, flair and the post's full text. Sort and time window are configurable; pass the returned after value to read the next page (null on the last one). Requires being signed in to Reddit. A subreddit that refuses the search (private, banned) fails with its HTTP status. To search several subreddits or queries, run the script once per pair.
Ask an AI agent connected to Reduck to run reduck/reddit.com/search_subreddit_threads, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/reddit.com/search_subreddit_threads
You do not need one. "Search Reddit threads in a subreddit, with post text" drives the real reddit.com pages in a browser, so it works whether or not reddit.com offers an API for this.
Required: subreddit, query. Optional: sort, time, after, limit.
It returns after, count, query, threads, subreddit.
Yes. It acts as you on reddit.com: on your own Chrome it reuses your session, and on a Reduck-hosted browser it loads the reddit.com cookies saved by the Reduck extension.
It only reads. It looks things up on reddit.com and changes nothing there.
Ask an AI agent connected to Reduck to run reduck/reddit.com/search_subreddit_threads, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/reddit.com/search_subreddit_threads
It is part of Reduck's official curated catalogue.

Start building not clicking