Search within a subreddit for posts, comments, or media matching a query
Subreddit name (e.g. 'Fitness', not 'r/Fitness' or a full URL)
"Fitness"
Search query to find matching content
"push ups"
Type of content to search for (default: posts). Response will only include the matching key
posts, comments, media "posts"
Sort order. For posts/media: relevance, hot, top, new, comments. For comments: relevance, top, new
relevance, hot, top, new, comments "relevance"
Timeframe to filter results
all, year, month, week, day, hour "all"
Cursor for pagination. Get 'cursor' from previous response
Successful response with search results
Key Response Fields:
data.posts[n].id: Reddit fullname of the post (e.g. t3_1o09lhe)data.posts[n].title: Title text of the postdata.posts[n].url: Full URL to the Reddit postdata.posts[n].votes: Net upvote countdata.posts[n].num_comments: Number of comments on the postdata.posts[n].created_at_iso: ISO 8601 creation timestampdata.posts[n].subreddit.name: Name of the subreddit the post belongs todata.cursor: Base64 pagination cursor — pass as cursor param to retrieve the next page