search_posts
Search for Reddit posts within a specific subreddit using a query, sorting options, and time filters to retrieve relevant results and details.
Instructions
Search for posts within a subreddit.
Args:
params: Search parameters including subreddit name, query, and filters
Returns:
List of matching posts with their details
Input Schema
Name | Required | Description | Default |
---|---|---|---|
params | Yes |
Input Schema (JSON Schema)
{
"$defs": {
"SearchPostsParams": {
"description": "Parameters for searching posts within a subreddit",
"properties": {
"query": {
"description": "Search query string",
"title": "Query",
"type": "string"
},
"sort": {
"default": "relevance",
"description": "How to sort the results",
"enum": [
"relevance",
"hot",
"top",
"new",
"comments"
],
"title": "Sort",
"type": "string"
},
"subreddit_name": {
"description": "Name of the subreddit to search in",
"title": "Subreddit Name",
"type": "string"
},
"syntax": {
"default": "lucene",
"description": "Query syntax to use",
"enum": [
"cloudsearch",
"lucene",
"plain"
],
"title": "Syntax",
"type": "string"
},
"time_filter": {
"default": "all",
"description": "Time period to limit results to",
"enum": [
"all",
"year",
"month",
"week",
"day",
"hour"
],
"title": "Time Filter",
"type": "string"
}
},
"required": [
"subreddit_name",
"query"
],
"title": "SearchPostsParams",
"type": "object"
}
},
"properties": {
"params": {
"$ref": "#/$defs/SearchPostsParams"
}
},
"required": [
"params"
],
"title": "search_postsArguments",
"type": "object"
}