Reddit

Reddit is a network of communities based on people's interests. Find communities you're interested in, and become part of an online community!

Go to site
Explore
/
Apps
/
Reddit

Reddit API Integrations

Build and run workflows using the Reddit API. Use 1000s of source-available triggers and actions across 1000+ apps. Or write custom code to integrate any app or API in seconds.

Overview

  1. You could build a tool that monitors specific subreddits and notifies you when new posts match certain criteria.
  2. You could build a tool that analyzes the posts and comments in a given subreddit to generate statistics or visualizations about the topic.
  3. You could build a bot that automatically posts or comments in response to certain keywords or phrases.
  4. You could build a tool that helps manage your Reddit account by automating tasks like posting, messaging, or voting.
  5. You could build a tool that extracts data from Reddit posts and comments for use in other applications.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    reddit: {
      type: "app",
      app: "reddit",
    }
  },
  async run({steps, $}) {
    return await axios($, {
      url: `https://oauth.reddit.com/api/v1/me`,
      headers: {
        Authorization: `Bearer ${this.reddit.$auth.oauth_access_token}`,
        "User-Agent": `pipedream:v0.0.1 (by /u/pipedream-oauth)`,
      },
    })
  },
})
List Comments in a Post with Reddit API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + Reddit
 
Try it
Send Message (Advanced) with Discord Webhook API on New comments on a post from Reddit API
Reddit + Discord Webhook
 
Try it
Get Values in Range with Google Sheets API on New comments on a post from Reddit API
Reddit + Google Sheets
 
Try it
List Comments in a Post with Reddit API on New Item in Feed from RSS API
RSS + Reddit
 
Try it
List Comments in a Post with Reddit API on New Message from Discord API
Discord + Reddit
 
Try it
New Comments by User from the Reddit API

Emit new event each time a user posts a new comment.

 
Try it
New comments on a post from the Reddit API

Emit new event each time a new comment is added to a subreddit.

 
Try it
New hot posts on a subreddit from the Reddit API

Emit new event each time a new hot post is added to the top 10 items in a subreddit.

 
Try it
New Links by User from the Reddit API

Emit new event each time a user posts a new link.

 
Try it
New Links on a Subreddit from the Reddit API

Emit new event each time a new link is added to a subreddit

 
Try it
List Comments in a Post with the Reddit API

List comments for a specific post. See the docs here

 
Try it
List Subreddits by Query with the Reddit API

List subreddits based on a search criteria. See the docs here

 
Try it
Search Post with the Reddit API

Search posts by title. See the docs here

 
Try it
Submit a Comment with the Reddit API

Submit a new comment or reply to a message. See the docs here

 
Try it
Submit a Post with the Reddit API

Create a post to a subreddit. See the docs here

 
Try it

Authentication

Reddit uses OAuth authentication. When you connect your Reddit account, Pipedream will open a popup window where you can sign into Reddit and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Reddit API.

Pipedream requests the following authorization scopes when you connect your account:

accountidentityeditflairhistoryreadreportsavestructuredstylessubmitsubscribevoteflairmodflairmodconfigmodflairmodlogmodpostsmodwikimysubredditswikieditwikiread
OAuth Request Configurations:
  1. authorization
    GEThttps://www.reddit.com/api/v1/authorize?client_id={{oauth.client_id}}&redirect_uri={{oauth.redirect_uri}}&state={{oauth.state}}&response_type=code&scope={{oauth.space_separated_scopes}}&duration=permanent
  2. accessToken
    POSThttps://www.reddit.com/api/v1/access_tokencontent-type: application/x-www-form-urlencodedaccept: application/jsonUser-Agent: pipedream:v0.0.1 (by /u/pipedream-oauth)
    redirect_uri={{oauth.redirect_uri}}&grant_type=authorization_code&code={{oauth.code}}
  3. refreshToken
    POSThttps://www.reddit.com/api/v1/access_tokencontent-type: application/x-www-form-urlencodedaccept: application/jsonUser-Agent: pipedream:v0.0.1 (by /u/pipedream-oauth)
    grant_type=refresh_token&refresh_token={{oauth.refresh_token}}

Community Posts

Building a Reddit Workflow with Pipedream
Building a Reddit Workflow with Pipedream
Almost four years ago I blogged about a demo I built using Reddit's API. The demo was a multi-user application that made use of Mongo for persistence and Passport.js for user authentication. You would login, select subreddit's to subscribe to, and then once a day it would email you the new posts from that subreddit. This was built in a "traditional" Node.js style with a server running full time to process requests. I thought it would be fun to build this again (although slightly different) using Pipedream's support for working with the Reddit API. I built two different versions of a simple workflow I'd like to share below.
Updating my Reddit Workflow with Pipedream
Updating my Reddit Workflow with Pipedream
Back almost exactly a month ago, I blogged about using Pipedream to build a Reddit email report. The idea was that I wanted a daily email of posts from my subscribed subreddits for the past 24 hours of content. The implementation was a bit complex. I used one workflow to handle "get a days worth of content from subreddit" as a general "API" and another workflow connected to my authentication. It handles getting my subscriptions, hitting the API, and then generating the email. This worked well, but after a while of actually getting the email, I noticed some problems. So I decided to fix that.