Extract Reddit data with the Anysite Reddit node for n8n workflows
The Anysite Reddit node allows you to extract valuable data from Reddit within your n8n workflows. Search posts, monitor subreddits, analyze discussions, and track community sentiment.
Select your Anysite API credentials from the dropdown or create new ones.
Search for Reddit posts across all subreddits or within specific communities.
Parameters:
Example Output:
{
"posts": [
{
"id": "post123",
"title": "How to build scalable web applications",
"text": "Here's what I learned after building 10+ web apps...",
"subreddit": "webdev",
"author": "experienced_dev",
"score": 245,
"upvoteRatio": 0.92,
"comments": 67,
"created": "2024-08-26T10:30:00Z",
"url": "https://reddit.com/r/webdev/comments/abc123/"
}
]
}
Extract comments and discussion threads from a specific Reddit post.
Parameters:
Example Output:
{
"comments": [
{
"id": "comment456",
"text": "Great points! I'd also add that caching is crucial...",
"author": "cache_expert",
"score": 89,
"created": "2024-08-26T11:15:00Z",
"replies": [
{
"id": "reply789",
"text": "Absolutely! Redis has been a game changer for us.",
"author": "redis_fan",
"score": 34
}
]
}
]
}
Get information and statistics about a specific subreddit.
Parameters:
Example Output:
{
"subreddit": {
"name": "MachineLearning",
"title": "Machine Learning",
"description": "This subreddit is dedicated to the discussion of machine learning...",
"subscribers": 2500000,
"activeUsers": 5420,
"created": "2008-01-25T12:00:00Z",
"isNsfw": false,
"rules": [
{
"title": "Stay on topic",
"description": "Posts must be related to machine learning"
}
]
}
}
Get currently trending/hot posts from specified subreddits.
Parameters:
Example Output:
{
"hotPosts": [
{
"subreddit": "technology",
"title": "New AI breakthrough announced by researchers",
"score": 8750,
"comments": 432,
"trending": true,
"hotnessRank": 1
}
]
}
Search for posts mentioning your brand, product, or competitors across relevant subreddits.
Use AI nodes to analyze sentiment and identify positive/negative discussions.
Monitor upvotes, comments, and discussion activity around your brand.
Send notifications for high-impact mentions or negative sentiment.
Example Workflow:
{
"nodes": [
{
"name": "Monitor Brand Mentions",
"type": "@horizondatawave/n8n-nodes-anysite.Reddit",
"operation": "searchPosts",
"parameters": {
"query": "YourBrand OR YourProduct",
"subreddit": "technology,startups,entrepreneur",
"sort": "new",
"limit": 50
}
},
{
"name": "Filter High Engagement",
"type": "n8n-nodes-base.filter",
"parameters": {
"conditions": [
{
"field": "score",
"operation": "greaterThan",
"value": 10
},
{
"field": "comments",
"operation": "greaterThan",
"value": 5
}
]
}
},
{
"name": "Get Comments",
"type": "@horizondatawave/n8n-nodes-anysite.Reddit",
"operation": "getPostComments",
"parameters": {
"postUrl": "={{ $json.url }}",
"commentDepth": 2,
"limit": 25
}
},
{
"name": "Analyze Sentiment",
"type": "n8n-nodes-base.openAi",
"parameters": {
"prompt": "Analyze sentiment of this Reddit discussion: {{ $json.title }} - {{ $json.text }}"
}
}
]
}
Research customer opinions and market trends:
Monitor and engage with your community:
Use Reddit's search syntax for precise queries:
// Exact title match
{
"query": "title:\"How to learn machine learning\""
}
// Author search
{
"query": "author:specific_username"
}
// Multiple subreddits
{
"query": "subreddit:MachineLearning OR subreddit:programming"
}
// URL search
{
"query": "url:github.com"
}
// Flair search
{
"query": "flair:Discussion"
}
// Self posts only
{
"query": "self:yes machine learning tutorial"
}
// Score filter
{
"query": "score:>100 artificial intelligence"
}
Track discussions over time:
{
"name": "Weekly Trend Analysis",
"type": "@horizondatawave/n8n-nodes-anysite.Reddit",
"operation": "searchPosts",
"parameters": {
"query": "artificial intelligence",
"subreddit": "MachineLearning",
"sort": "top",
"timeRange": "week",
"limit": 100
}
}
Calculate post and comment engagement:
// Engagement rate calculation
{
"engagementRate": "={{ ($json.comments / ($json.score || 1)) * 100 }}"
}
// Controversy score
{
"controversyScore": "={{ (1 - $json.upvoteRatio) * 100 }}"
}
// Discussion density
{
"discussionDensity": "={{ $json.comments / Math.max($json.text.length / 100, 1) }}"
}
Extract insights from Reddit content:
{
"name": "Extract Keywords",
"type": "n8n-nodes-base.function",
"parameters": {
"functionCode": `
const text = $input.first().json.text.toLowerCase();
const keywords = text.match(/\\b\\w{4,}\\b/g) || [];
const wordCount = {};
keywords.forEach(word => {
wordCount[word] = (wordCount[word] || 0) + 1;
});
const topKeywords = Object.entries(wordCount)
.sort(([,a], [,b]) => b - a)
.slice(0, 10)
.map(([word, count]) => ({ word, count }));
return [{ json: { ...item.json, topKeywords } }];
`
}
}
Error: 404 - Subreddit not found
Solution:
Error: 404 - Post not found
Solution:
Error: 429 - Too many requests
Solution:
{
"name": "Reddit with Error Handling",
"type": "@horizondatawave/n8n-nodes-anysite.Reddit",
"continueOnFail": true,
"retryOnFail": true,
"maxTries": 3,
"waitBetweenTries": 3000,
"parameters": {
"operation": "searchPosts",
"query": "your search query"
}
}
Send alerts for important discussions:
{
"name": "High-Impact Alert",
"type": "n8n-nodes-base.slack",
"parameters": {
"channel": "#marketing",
"text": "š„ Trending Reddit post about {{ $json.title }}\nš Score: {{ $json.score }} | š¬ Comments: {{ $json.comments }}\nš {{ $json.url }}"
}
}
Store Reddit data for analysis:
{
"name": "Store in Database",
"type": "n8n-nodes-base.postgres",
"parameters": {
"operation": "insert",
"table": "reddit_posts",
"columns": [
"post_id",
"title",
"subreddit",
"score",
"comments",
"created_at"
],
"values": [
"={{ $json.id }}",
"={{ $json.title }}",
"={{ $json.subreddit }}",
"={{ $json.score }}",
"={{ $json.comments }}",
"={{ $json.created }}"
]
}
}
Combine Reddit data with other sources:
{
"workflow": [
"Reddit Search ā Get Hot Posts",
"Twitter Search ā Find Related Tweets",
"Google News ā Get News Articles",
"AI Analysis ā Extract Common Themes",
"Report Generation ā Create Daily Brief"
]
}
{
"name": "Batch Subreddit Monitor",
"type": "n8n-nodes-base.splitInBatches",
"parameters": {
"batchSize": 5,
"options": {
"reset": false
}
}
}
Remove duplicate posts:
// Deduplicate by post ID
{
"name": "Remove Duplicates",
"type": "n8n-nodes-base.removeDuplicates",
"parameters": {
"compare": "selectedFields",
"fieldsToCompare": ["id"]
}
}
Analyze subreddit health and trends:
{
"name": "Subreddit Health Check",
"type": "@horizondatawave/n8n-nodes-anysite.Reddit",
"operation": "getSubredditInfo",
"parameters": {
"subredditName": "{{ $json.subreddit }}",
"includeRules": true,
"includeModerators": false
}
}
Assess discussion quality metrics:
// Calculate discussion quality score
{
"qualityScore": "={{ (($json.score * 0.4) + ($json.comments * 0.3) + (($json.upvoteRatio - 0.5) * 200 * 0.3)) }}"
}