> ## Documentation Index
> Fetch the complete documentation index at: https://docs.konbiniapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search posts

> Searches public Reddit posts across the platform. Supports relevance, hot, top, new, and comments sorting with optional time windows.

## What it does

Searches public Reddit posts across the platform. Supports relevance, hot, top, new, and comments sorting with optional time windows.

## Tool details

| Field         | Value                         |
| ------------- | ----------------------------- |
| Tool name     | `reddit_search_posts`         |
| Platform      | Reddit                        |
| REST endpoint | `GET /v1/reddit/search/posts` |
| Result type   | Collection tool               |

## Parameters

| Parameter           | Type       | Required | Description                                                                                                                                     |
| ------------------- | ---------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `q`                 | `string`   | Yes      | Search query                                                                                                                                    |
| `count`             | `integer`  | No       | Number of posts to fetch (maximum: 100) Default: `25`.                                                                                          |
| `cursor`            | `string`   | No       | Pagination cursor                                                                                                                               |
| `order`             | `string`   | No       | Sort order: relevance (default), hot, top, new, or comments Default: `relevance`. Allowed values: `relevance`, `hot`, `top`, `new`, `comments`. |
| `time`              | `string`   | No       | Optional time window for search results: hour, day, week, month, year, or all Allowed values: `hour`, `day`, `week`, `month`, `year`, `all`.    |
| `projection_preset` | `string`   | No       | Defaults to `minimal`. Allowed values: `full`, `minimal`, `identity`, `engagement`, `content`.                                                  |
| `data_fields`       | `string[]` | No       | Adds top-level keys from `data` on top of the selected `projection_preset`.                                                                     |
| `item_fields`       | `string[]` | No       | Adds keys from `data.orderedItems[]` on top of the selected `projection_preset`.                                                                |

## Example

```json theme={null}
{
  "name": "reddit_search_posts",
  "arguments": {
    "q": "<q>",
    "count": 25,
    "projection_preset": "minimal",
    "data_fields": [
      "orderedItems",
      "nextCursor",
      "cursor",
      "itemCount"
    ],
    "item_fields": [
      "entityId",
      "name",
      "published",
      "content",
      "url"
    ]
  }
}
```

## Available data fields

* `@context`
* `type`
* `partOf`
* `totalItems`
* `cursor`
* `nextCursor`
* `next`
* `itemCount`
* `orderedItems`

## Available item fields

* `type`
* `id`
* `url`
* `entityId`
* `name`
* `content`
* `published`
* `isEdited`
* `isLocked`
* `isOriginal`
* `isPinned`
* `isSponsored`
* `isAdult`
* `isSpoiler`
* `isSearchable`
* `likeCount`
* `voteCount`
* `commentCount`
* `shareCount`
* `attributedTo`
* `icon`
* `image`
* `attachment`
* `tag`
* `quote`

## Response notes

Successful calls return a JSON object with a top-level `data` field and, when
available, `metadata.creditsUsed` and `metadata.creditsRemaining`. See
[response format](/getting-started/response-format),
[pagination](/getting-started/pagination), and [credits](/getting-started/credits).
