search_posts

Pack: reddit · Endpoint: https://gateway.pipeworx.io/reddit/mcp

Search Reddit posts by keyword — across all subreddits, or scoped to one via the subreddit argument (“search r/ for X”). Sort by relevance (default), hot, top, new, or comments. Returns post id, title, author, subreddit, permalink, and date.

Parameters

NameTypeRequiredDescription
querystringyesSearch query.
subredditstringnoOptional subreddit to restrict the search to (e.g. “python”).
sortstringnorelevance (default), hot, top, new, comments.
limitnumbernoNumber of results (default 10, max 100).

Example call

Arguments

{
  "query": "machine learning"
}

curl

curl -X POST https://gateway.pipeworx.io/reddit/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_posts","arguments":{"query":"machine learning"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('search_posts', {
  "query": "machine learning"
});

More examples

{
  "query": "climate change",
  "limit": 50,
  "sort": "top"
}

Response shape

Always returns: ok, query, count, posts

FieldTypeDescription
okboolean
querystring
subredditstring | nullEcho of the subreddit filter, null when searching site-wide
sortstringrelevance | new | top | hot
countnumber
postsarray
Full JSON Schema
{
  "type": "object",
  "description": "Reddit search results, served from Reddit RSS (the JSON API blocks our egress). Scores, comment counts and flair are NOT available from RSS.",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "query": {
      "type": "string"
    },
    "subreddit": {
      "type": [
        "string",
        "null"
      ],
      "description": "Echo of the subreddit filter, null when searching site-wide"
    },
    "sort": {
      "type": "string",
      "description": "relevance | new | top | hot"
    },
    "count": {
      "type": "number"
    },
    "posts": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Reddit post id (base36, e.g. \"1vef79c\")"
          },
          "title": {
            "type": "string"
          },
          "author": {
            "type": "string",
            "description": "Username without the u/ prefix"
          },
          "subreddit": {
            "type": [
              "string",
              "null"
            ],
            "description": "Null when the feed entry does not carry one (e.g. a subreddit-level result)"
          },
          "permalink": {
            "type": "string",
            "description": "Absolute reddit.com URL"
          },
          "published": {
            "type": "string",
            "description": "ISO-8601 timestamp"
          },
          "body": {
            "type": "string",
            "description": "Self-text as HTML-decoded text; empty for link posts"
          }
        },
        "required": [
          "id",
          "title",
          "author",
          "permalink",
          "published"
        ]
      }
    }
  },
  "required": [
    "ok",
    "query",
    "count",
    "posts"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "reddit": {
      "url": "https://gateway.pipeworx.io/reddit/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build September 10, 2026