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
| Name | Type | Required | Description |
|---|---|---|---|
query | string | yes | Search query. |
subreddit | string | no | Optional subreddit to restrict the search to (e.g. “python”). |
sort | string | no | relevance (default), hot, top, new, comments. |
limit | number | no | Number 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
| Field | Type | Description |
|---|---|---|
ok | boolean | |
query | string | |
subreddit | string | null | Echo of the subreddit filter, null when searching site-wide |
sort | string | relevance | new | top | hot |
count | number | |
posts | array |
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.