# New hot posts on a subreddit — Reddit

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

- Key: `reddit-new-hot-posts-on-a-subreddit`
- Type: Trigger (Polling)
- Version: 0.2.4
- App: Reddit (`reddit`) — https://pipedream.com/apps/reddit.md
- This page (HTML): https://pipedream.com/apps/reddit/triggers/new-hot-posts-on-a-subreddit
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/reddit/sources/new-hot-posts-on-a-subreddit/new-hot-posts-on-a-subreddit.mjs

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `timer` | `$.interface.timer` | Yes | Pipedream polls Reddit for events on this schedule. |
| `subreddit` | `string` | Yes | The subreddit you'd like to watch. Options are loaded from the connected account. |
| `region` | `string` | No | Hot posts differ by region, and this refers to the region you'd like to watch for hot posts. |
| `excludeFilters` | `boolean` | No | If set to true, filters such as "hide links that I have voted on" will be disabled |
| `includeSubredditDetails` | `boolean` | No | If set to true, subreddit details will be expanded/included. |

## Returns

Events emitted by Reddit.

## Run it

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const deployed = await pd.triggers.deploy({
  id: "reddit-new-hot-posts-on-a-subreddit",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    reddit: { authProvisionId: "apn_xxxxxxx" },
    timer: { "intervalSeconds": 900 },
    subreddit: "Subreddit",
  },
  webhookUrl: "https://example.com/webhooks/reddit",
})

console.log(deployed.id)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/triggers/deploy \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "reddit-new-hot-posts-on-a-subreddit",
    "webhook_url": "https://example.com/webhooks/reddit",
    "configured_props": {
      "reddit": { "authProvisionId": "apn_xxxxxxx" },
      "timer": { "intervalSeconds": 900 },
      "subreddit": "Subreddit"
    }
  }'
```

**MCP**

MCP servers expose Reddit actions as on-demand tools.

New hot posts on a subreddit is an event source, so your application deploys it with the Connect SDK or API and then either receives each event at a webhook URL or retrieves events on demand with the trigger events API.

## Event delivery

Every event is sent to the HTTP endpoint you choose when you deploy the source. Or: no webhook required — your app or agent can fetch recent events from the [trigger events API](https://pipedream.com/docs/connect/api-reference/list-trigger-events.md) instead.

---

- App: https://pipedream.com/apps/reddit.md · All apps: https://pipedream.com/apps
