Reddit Block
Access Reddit data and content
The Reddit block lets you retrieve posts and comments from any subreddit. Reach for it when a workflow needs to monitor, summarize, or react to Reddit content such as post titles, bodies, authors, scores, and comment threads.
Overview
| Property | Value |
|---|---|
| Type | reddit |
| Category | tools |
| Color | #FF5700 |
When to Use
- Pull the latest hot, new, top, or rising posts from a subreddit for monitoring or research.
- Summarize trending discussions in a community over a specific time window (day, week, month, year, all time).
- Fetch the full comment thread for a known post to analyze sentiment or extract feedback.
- Feed Reddit content into a downstream Agent block for summarization or classification.
- Track mentions or topics across a subreddit on a recurring schedule.
- Extract community feedback or product mentions from targeted subreddits.
Configuration
Operation
Dropdown that selects which Reddit action to perform. This drives which other fields appear.
| Label | ID |
|---|---|
| Get Posts | get_posts |
| Get Comments | get_comments |
Reddit Account (credential)
OAuth credential for the Reddit account to authenticate with. Required. Requests the identity and read scopes from the connected Reddit account.
Subreddit (subreddit)
The subreddit name without the r/ prefix (e.g. programming, not r/programming). Required for both operations.
Sort By (sort) — Get Posts only
How to order the returned posts. Required when operation is get_posts.
| Label | ID |
|---|---|
| Hot | hot |
| New | new |
| Top | top |
| Rising | rising |
Time Filter (time) — Get Posts, Top sort only
Narrows the time window when Sort By is set to top. Only shown when sort = top.
| Label | ID |
|---|---|
| Day | day |
| Week | week |
| Month | month |
| Year | year |
| All Time | all |
Max Posts (limit) — Get Posts only
Maximum number of posts to return. Defaults to 10; maximum 100. Optional.
Post ID (postId) — Get Comments only
The Reddit post ID whose comments should be fetched. Required when operation is get_comments.
Sort Comments By (commentSort) — Get Comments only
How to order the returned comments. Optional; defaults to confidence.
| Label | ID |
|---|---|
| Confidence | confidence |
| Top | top |
| New | new |
| Controversial | controversial |
| Old | old |
| Random | random |
| Q&A | qa |
Number of Comments (commentLimit) — Get Comments only
Maximum number of comments to return. Defaults to 50; maximum 100. Optional.
Inputs & Outputs
-
Inputs:
operation(string) — Operation to perform (get_postsorget_comments)credential(string) — Reddit OAuth access tokensubreddit(string) — Subreddit name (withoutr/prefix)sort(string) — Sort order for posts (hot,new,top,rising)time(string) — Time filter for top posts (day,week,month,year,all)limit(number) — Maximum number of posts to returnpostId(string) — Post identifier for fetching commentscommentSort(string) — Comment sort order (confidence,top,new,controversial,old,random,qa)commentLimit(number) — Maximum number of comments to return
-
Outputs:
subreddit(string) — Subreddit name (populated by Get Posts)posts(json) — Array of post objects withid,title,author,url,permalink,score,num_comments,created_utc,is_self,selftext,thumbnail,subreddit(populated by Get Posts)post(json) — Single post object withid,title,author,selftext,score,created_utc,permalink(populated by Get Comments)comments(json) — Nested array of comment objects withid,author,body,score,created_utc,permalink,replies(populated by Get Comments)
Tools
- Get Reddit Posts (
reddit_get_posts) — Fetches posts from a subreddit via the Reddit OAuth API. Acceptssubreddit,sort(hot/new/top/rising), optionallimit(1–100, default 10), and optionaltimefilter when sort istop. Returnssubredditname and apostsarray. - Get Reddit Comments (
reddit_get_comments) — Fetches the comment thread for a specific Reddit post. AcceptspostId,subreddit, optionalsort(defaultconfidence), and optionallimit(1–100, default 50). Returns apostsummary object and a nestedcommentsarray including replies.
YAML Example
reddit_1:
type: reddit
name: "Reddit"
inputs:
operation: "get_posts"
credential: "{{credentials.reddit}}"
subreddit: "programming"
sort: "top"
time: "week"
limit: 10
connections:
outgoing:
- target: agent_1