scraper
Back to API docs

Overview

  • Overview

APIs

  • POSTPost
  • POSTSearch
  • POSTSubreddit
  • POSTUser Posts
  • POSTUser Comments
  • POSTCommunity

Reddit Search

1 credit

Search Reddit for posts and comments.

POST/api/v1/tools/reddit/search

Parameters

querystringrequired

Search query string.

subredditstring

Restrict results to one subreddit, with or without the r/ prefix.

sortstring

Result sort: new (default), relevance, hot, top, or comments.

timestring

Time window for top and controversial: hour, day, week, month, year, or all (default). A window narrower than "all" also filters the whole walk.

maxResultsnumber

Maximum matching posts to return; the same cap applies to matching comments. Defaults to 100. Other sorts and time windows are walked and deduplicated when needed. Upper bound is determined by your plan.

includeNsfwboolean

Include over-18 posts. When omitted, Reddit applies its own default.

fieldsstring[]

Fields to include per post/comment. Post defaults: id, author, title, text, score, createdAt, subreddit, numComments. Comment defaults: id, author, text, score, createdAt, subreddit, parentId, parentPostTitle. Use ["*"] for all fields. Available fields: id, author, title, text, score, createdAt, subreddit, numComments, parentId, url, parentPostTitle, parentPostUrl.

Response Schema

dataobject

Reddit search result

postsobject[]

Matching posts. Default fields: id, author, title, text, score, createdAt, subreddit, numComments.

commentsobject[]

Matching comments. Default fields: id, author, text, score, createdAt, subreddit, parentId, parentPostTitle.

countnumber

Total number of posts and comments returned

metaobject

Request metadata

toolstring

Tool name (reddit-search)

creditsUsednumber

Credits consumed (1)

requestIdstring

Unique request ID

Request

curl -X POST https://scraper.run/api/v1/tools/reddit/search \
-H "Authorization: Bearer sc_live_..." \
-H "Content-Type: application/json" \
-d '{
"query": "best rust web frameworks",
"subreddit": "rust",
"sort": "top",
"time": "year"
}'

Response Example

{
"data": {
"posts": [
{
"id": "t3_abc123",
"author": "rustacean",
"title": "Best Rust web frameworks in 2026?",
"text": "I have been comparing Actix, Axum, and Rocket...",
"createdAt": "2026-04-07T10:00:00.000Z",
"url": "https://www.reddit.com/r/rust/comments/abc123/best_rust_web_frameworks/",
"score": 256,
"numComments": 89,
"subreddit": "r/rust"
}
],
"comments": [
{
"id": "t1_xyz789",
"parentId": "t3_abc123",
"author": "web_dev",
"text": "Axum has the best ergonomics in my experience.",
"createdAt": "2026-04-07T11:30:00.000Z",
"score": 45,
"subreddit": "r/rust",
"parentPostTitle": "Best Rust web frameworks in 2026?"
}
],
"count": 2
},
"meta": {
"tool": "reddit-search",
"creditsUsed": 1,
"requestId": "req_abc123"
}
}