← Reddit

New hot posts on a subreddit from Reddit API

Pipedream makes it easy to connect APIs for Reddit and 700+ other apps remarkably fast.

Trigger workflow on
New hot posts on a subreddit from the Reddit API
Next, do this
Connect to 700+ APIs using code and no-code building blocks
No credit card required
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Trigger a workflow on New hot posts on a subreddit with Reddit API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the New hot posts on a subreddit trigger
    1. Connect your Reddit account
    2. Configure Polling schedule
    3. Select a Subreddit
    4. Optional- Select a Region
    5. Optional- Configure Exclude filters (Show all posts)?
    6. Optional- Configure Include subreddit details?
  2. Add steps to connect to 700+ APIs using code and no-code building blocks
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger


This is a pre-built, open source component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

New hot posts on a subreddit on Reddit
Description:Emit new event each time a new hot post is added to the top 10 items in a subreddit.


import common from "../common.mjs";
import regionData from "./region-data.mjs";
import get from "lodash/get.js";
const { reddit } = common.props;

export default {
  type: "source",
  key: "reddit-new-hot-posts-on-a-subreddit",
  name: "New hot posts on a subreddit",
    "Emit new event each time a new hot post is added to the top 10 items in a subreddit.",
  version: "0.1.2",
  dedupe: "unique",
  props: {
    subreddit: {
      propDefinition: [
    region: {
      type: "string",
      label: "Region",
        "Hot posts differ by region, and this refers to the region you'd like to watch for hot posts.",
      options: regionData,
      default: "GLOBAL",
      optional: true,
    excludeFilters: {
      type: "boolean",
      label: "Exclude filters (Show all posts)?",
        "If set to `true`, filters such as \"hide links that I have voted on\" will be disabled",
      default: false,
      optional: true,
    includeSubredditDetails: {
      propDefinition: [
  hooks: {
    async deploy() {
      await this.fetchData();
  methods: {
    generateEventMetadata(redditEvent) {
      return {
        id: redditEvent.data.name,
        summary: redditEvent.data.title,
        ts: redditEvent.data.created,
    async fetchData() {
      // Emits sample events on the first run during deploy.
      var redditHotPosts = await this.reddit.getNewHotSubredditPosts(
        get(this.subreddit, "value", this.subreddit),
      const { children: hotPosts = [] } = redditHotPosts.data;
      if (hotPosts.length === 0) {
        console.log("No data available, skipping iteration");
  async run() {
    await this.fetchData();


This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
RedditredditappThis component uses the Reddit app.
N/Adb$.service.dbThis component uses $.service.db to maintain state between component invocations.
Polling scheduletimer$.interface.timer

Pipedream polls Reddit for events on this schedule.

SubredditsubredditstringSelect a value from the drop down menu.
Exclude filters (Show all posts)?excludeFiltersboolean

If set to true, filters such as "hide links that I have voted on" will be disabled

Include subreddit details?includeSubredditDetailsboolean

If set to true, subreddit details will be expanded/included.


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:


About 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!

About Pipedream

Stop writing boilerplate code, struggling with authentication and managing infrastructure. Start connecting APIs with code-level control when you need it — and no code when you don't.

Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
"The past few weeks, I truly feel like the clichéd 10x engineer."