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

# Search

> Searches across all of Reddit for posts matching a query. Each post includes title, author, selftext, subreddit, score, ups, upvote_ratio, num_comments, created_utc, url, permalink, and is_video. Supports sort (relevance, new, top, comment_count), timeframe filtering, pagination via the after token, and a trim parameter for lighter responses.

### Query Parameters

| Parameter | Type | Required | Description |
| :- | :- | :- | :- |
| `query` | `string` | Yes | Search query |
| `sort` | `string` | No | Sort by |
| `timeframe` | `string` | No | Timeframe |
| `after` | `string` | No | Used to paginate to next page |
| `trim` | `boolean` | No | Set to true for a trimmed down version of the response |

### Response Example

```json theme={null}
{
  "success": true,
  "data": {
  "success": true,
  "posts": [
    {
      "id": "w63dgy",
      "author": "Morgentau7",
      "author_fullname": "t2_2hy2xjit",
      "subreddit": "MadeMeSmile",
      "title": "Player realizes that he nearly stole the dogs job",
      "downs": 0,
      "name": "t3_w63dgy",
      "upvote_ratio": 0.97,
      "ups": 220403,
      "total_awards_received": 0,
      "score": 220403,
      "created": 1658580900,
      "num_comments": 1246,
      "url": "https://www.reddit.com/r/MadeMeSmile/comments/w63dgy/player_realizes_that_he_nearly_stole_the_dogs_job/",
      "subreddit_subscribers": 11605207,
      "is_video": true,
      "created_utc": 1658580900
    }
  ],
  "after": "t3_1izmcgx"
}
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.