POST/api/v1/searchSearch

Search Posts

Perform full-text search across all of Reddit or a specific subreddit. Returns a paginated list of posts matching your query, with sorting and time filters.

Ready to try it?

Create a free account — 30 requests included, no credit card.

Get free API key →

Request Parameters

Send as a JSON body in your POST request.

ParameterTypeRequired
querystringYes
subredditstringNo
sortstringNo
timestringNo
limitnumberNo

Code Examples

curl

curl -X POST https://subscraper.dev/api/v1/search \
  -H "Authorization: Bearer sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "nextjs server components",
    "subreddit": "reactjs",
    "sort": "top",
    "time": "year",
    "limit": 5
  }'

TypeScript SDK

const result = await client.searchPosts({
  query: "nextjs server components",
  subreddit: "reactjs",
  sort: "top",
  time: "year",
  limit: 5
});
Install the SDK →

Sample Response

{
  "results": [
    {
      "id": "t3_1ab2c3d",
      "title": "Why I moved all my side projects back to Next.js pages router",
      "author": "webdev_guru",
      "subreddit": "reactjs",
      "score": 452,
      "numComments": 128,
      "url": "https://reddit.com/r/reactjs/...",
      "createdAt": "2023-10-15T14:30:00Z"
    },
    // ... more results
  ]
}

Common Use Cases

  • Market research (finding pain points around a topic)
  • Brand monitoring (tracking mentions of your product)
  • Content ideation (seeing what questions people ask)
  • Sentiment analysis dataset generation

Credits

Each call to /api/v1/search uses 1 credit. Free tier includes 30 credits. View pricing →

Related Tools & Guides

All developer tools →

Related Endpoints

Start using /search now

Free tier — 30 requests, no credit card required.