# Reddit — Pipedream Connect

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

- API slug: `reddit` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Marketing
- Website: https://www.reddit.com/
- Managed OAuth scopes: `account` · `identity` · `edit` · `history` · `read` · `submit` · `mysubreddits` · `subscribe` · `privatemessages`
- This page (HTML): https://pipedream.com/apps/reddit
- Tools: 5 actions · 7 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: reddit`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
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 accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "reddit",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run List Comments in a Post:
const result = await mcp.callTool({
  name: "reddit-list-comments-in-a-post",
  arguments: {
    subreddit: "Subreddit",
    subredditPost: "Post",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Reddit endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.example.com/v1/me

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEvbWU?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```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 result = await pd.actions.run({
  id: "reddit-list-comments-in-a-post",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    reddit: { authProvisionId: "apn_xxxxxxx" },
    subreddit: "Subreddit",
    subredditPost: "Post",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (5)

### `reddit-list-comments-in-a-post` — List Comments in a Post (Read-only)

List comments for a specific post. See the docs here

Full schema: https://pipedream.com/apps/reddit/actions/list-comments-in-a-post.md

### `reddit-list-subreddits-by-query` — List Subreddits by Query (Read-only)

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

Full schema: https://pipedream.com/apps/reddit/actions/list-subreddits-by-query.md

### `reddit-search-post` — Search Post (Write)

Search posts by title. See the docs here

Full schema: https://pipedream.com/apps/reddit/actions/search-post.md

### `reddit-submit-a-comment` — Submit a Comment (Write)

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

Full schema: https://pipedream.com/apps/reddit/actions/submit-a-comment.md

### `reddit-submit-a-post` — Submit a Post (Write)

Create a post to a subreddit. See the docs here

Full schema: https://pipedream.com/apps/reddit/actions/submit-a-post.md

## Triggers (7)

### `reddit-new-comments-by-user` — New Comments by User (Polling)

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

Full schema: https://pipedream.com/apps/reddit/triggers/new-comments-by-user.md

### `reddit-new-comments-on-a-post` — New comments on a post (Polling)

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

Full schema: https://pipedream.com/apps/reddit/triggers/new-comments-on-a-post.md

### `reddit-new-hot-posts-on-a-subreddit` — New hot posts on a subreddit (Polling)

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

Full schema: https://pipedream.com/apps/reddit/triggers/new-hot-posts-on-a-subreddit.md

### `reddit-new-links-by-user` — New Links by User (Polling)

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

Full schema: https://pipedream.com/apps/reddit/triggers/new-links-by-user.md

### `reddit-new-links-on-a-subreddit` — New Links on a Subreddit (Polling)

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

Full schema: https://pipedream.com/apps/reddit/triggers/new-links-on-a-subreddit.md

### `reddit-new-private-message` — New Private Message (Polling)

Emit new event each time you receive a new private message.

Full schema: https://pipedream.com/apps/reddit/triggers/new-private-message.md

### `reddit-new-saved-post-by-user` — New Saved Post by User (Polling)

Emit new event each time a user saves a post.

Full schema: https://pipedream.com/apps/reddit/triggers/new-saved-post-by-user.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
