Type:
flow
Description
Check what’s on Reddit
Parameters
Name | Type | Description | Required | Default |
---|---|---|---|---|
YOUR_CLIENT_ID | string | YOUR_CLIENT_ID | no | |
CLIENT_TOKEN | string | CLIENT_TOKEN | no | |
YOUR_CLIENT_SECRET | string | YOUR_CLIENT_SECRET | no | |
YOUR_USER_AGENT | string | YOUR_USER_AGENT | no | |
subreddit | string | Example wallstreetbets | no | |
limit | number | Number of posts | no | 100 |
sort | string | Sort type | no | "new" |
Help
Overview
The Reddit Fetcher worker connects to Reddit via the PRAW library and returns a list of posts from a specified subreddit. You can control how many posts are retrieved, which sorting method is used, and which fields are included in the output (title, body text, URL, score, and comment count). The worker operates in read‑only mode, making it safe for data‑gathering tasks such as market sentiment analysis or research pipelines.
Input Parameters
- YOUR_CLIENT_ID – string – Your Reddit application client ID.
- CLIENT_TOKEN – string – The OAuth refresh token for the Reddit account.
- YOUR_CLIENT_SECRET – string – Your Reddit application client secret.
- YOUR_USER_AGENT – string – A descriptive user‑agent string (e.g.,
my‑app/1.0
). - subreddit – string – Name of the target subreddit (e.g.,
wallstreetbets
). - limit – number – Maximum number of posts to return (default = 100).
- sort – string – Sorting method; accepted values are
new
,top
, orhot
(default =new
).
Minimal Example Usage
# Define the required credentials and query parameters
params = {
"YOUR_CLIENT_ID": "abc123def456",
"CLIENT_TOKEN": "refresh_token_here",
"YOUR_CLIENT_SECRET": "secret_xyz",
"YOUR_USER_AGENT": "my-reddit-bot/0.1",
"subreddit": "wallstreetbets",
"limit": 50,
"sort": "top"
}
# When the worker runs, it will return a JSON‑serialisable list such as:
[
{
"title": "Why $XYZ is about to explode",
"text": "I’ve been tracking the fundamentals...",
"url": "https://reddit.com/r/wallstreetbets/comments/...",
"score": 12457,
"num_comments": 342
},
…
]
The example above fetches the 50 highest‑scoring posts from r/wallstreetbets. Adjust limit
and sort
to suit your analysis needs. The output can be piped directly into downstream steps (e.g., sentiment analysis, data storage, or visualization) within an automation platform such as n8n.