reddit-json-api

n8n-nodes-reddit-json-api

Package Information

Downloads: 0 weekly / 9 monthly
Latest Version: 1.0.2
Author: yuangwei

Documentation

n8n-nodes-reddit-json-api

This is an n8n community node. It lets you use Reddit JSON API in your n8n workflows with cookie-based authentication instead of OAuth2.

Reddit is a social news aggregation, web content rating, and discussion website. This node enables you to interact with Reddit's API without needing to register a OAuth2 application - simply use your browser's session cookie.

n8n is a fair-code licensed workflow automation platform.

Installation
Operations
Credentials
Compatibility
Usage
Resources

Installation

Follow the installation guide in the n8n community nodes documentation.

To install this specific node, run:

npm install n8n-nodes-reddit-json-api

Operations

Post

  • Create - Submit a new post (text, link, or image) to a subreddit
  • Delete - Delete a post by ID
  • Get - Retrieve a single post by subreddit and post ID
  • Get All - Get posts from a subreddit (hot, new, top, rising)
  • Search - Search posts across Reddit or within a specific subreddit

Post Comment

  • Create - Add a top-level comment to a post
  • Delete - Delete a comment by ID
  • Get All - Retrieve all comments on a post
  • Reply - Reply to an existing comment

Profile

  • Get - Retrieve user profile data including:
    • Identity
    • Blocked users
    • Friends
    • Karma
    • Preferences
    • Saved posts
    • Trophies

Subreddit

  • Get - Get subreddit information (about, rules)
  • Get All - List subreddits (all, trending, or by keyword search)

User

  • Get - Retrieve user data including:
    • About information
    • User's comments
    • Gilded content
    • Overview
    • Submitted posts

Credentials

This node uses cookie-based authentication, which is simpler than OAuth2 and doesn't require registering a Reddit application.

How to Get Your Reddit Cookie

  1. Log in to Reddit in your browser
  2. Open Developer Tools (F12 or right-click > Inspect)
  3. Go to Application tab (Chrome/Edge) or Storage tab (Firefox)
  4. Expand Cookies and select https://www.reddit.com
  5. Find the cookie named reddit_session (or copy all cookies as a header string)
  6. Copy the cookie value

Note: Cookie-based authentication is recommended for personal automation projects. For production applications, consider using the official OAuth2 flow.

Authentication Method

The credential accepts:

  • Cookie - Your Reddit session cookie from browser

All requests are made to www.reddit.com using the JSON API endpoint with a real browser user-agent to avoid blocking.

Compatibility

  • Minimum n8n version: 1.0.0
  • Tested with: n8n 1.60.0+
  • Node version: 1.0.0

Usage

Getting Posts from a Subreddit

  1. Add the Reddit JsonAPI node to your workflow
  2. Configure credentials with your Reddit cookie
  3. Select Post as Resource
  4. Select Get All as Operation
  5. Enter subreddit name (e.g., programming)
  6. Choose category: hot, new, top, or rising

Creating a Post

  1. Add the Reddit JsonAPI node
  2. Select Post > Create
  3. Enter subreddit name
  4. Choose post kind: self (text), link (URL), or image
  5. Provide title and content (text or URL)

Searching Reddit

  1. Add the Reddit JsonAPI node
  2. Select Post > Search
  3. Choose search location: All Reddit or specific Subreddit
  4. Enter your search keyword
  5. Optionally specify sort order (relevance, hot, top, new, comments)

Resources

License

MIT License - see LICENSE.md for details.

Discussion