← Reddit

Search Post with Reddit API

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

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Search Post with the Reddit API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
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

Create a workflow to Search Post with the Reddit API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Search Post action
    1. Connect your Reddit account
    2. Select a Subreddit
    3. Configure Query
    4. Optional- Configure Limit
    5. Optional- Configure Before
    6. Optional- Configure After
    7. Optional- Configure Count
    8. Optional- Select a Sort
    9. Optional- Configure Include subreddit details?
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  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.

Search Post on Reddit
Description:Search posts by title. [See the docs here](https://www.reddit.com/dev/api/#GET_search)


import reddit from "../../reddit.app.mjs";

export default {
  type: "action",
  key: "reddit-search-post",
  version: "0.0.1",
  name: "Search Post",
  description: "Search posts by title. [See the docs here](https://www.reddit.com/dev/api/#GET_search)",
  props: {
    subreddit: {
      propDefinition: [
      description: "Search for a subreddit, or enter a subreddit display name as a custom expression (for example, `happycowgifs`).",
    query: {
      label: "Query",
      description: "Query to search for posts",
      type: "string",
    limit: {
      propDefinition: [
    before: {
      propDefinition: [
    after: {
      propDefinition: [
    count: {
      propDefinition: [
    sort: {
      propDefinition: [
    srDetails: {
      propDefinition: [
  async run({ $ }) {
    const params = {
      q: this.query,
      limit: this.limit,
      sort: this.sort,
      sr_detail: this.srDetails,
      before: this.before,
      after: this.after,
      count: this.count,

    const res = await this.reddit.searchSubredditLinks(
      this.subreddit.value ?? this.subreddit,

    $.export("$summary", "Posts successfully fetched");

    return res;


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.
SubredditsubredditstringSelect a value from the drop down menu.

Query to search for posts


Default to 25. The maximum number of items desired


Only one of after and before should be specified. These indicate the fullname of an item in the listing to use as the anchor point of the slice.


Only one of after and before should be specified. These indicate the fullname of an item in the listing to use as the anchor point of the slice.


The number of items already seen in this listing. On the html site, the builder uses this to determine when to give values for before and after in the response.

SortsortstringSelect a value from the drop down menu:relevanceactivity
Include subreddit details?srDetailsboolean

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!