> ## 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.

# Subreddit Posts

> Fetches posts from a subreddit with sorting and filtering options. Each post includes title, author, selftext, score, ups, upvote_ratio, num_comments, created_utc, url, permalink, subreddit_subscribers, and is_video. Supports sort (best, hot, new, top, rising), timeframe filtering, pagination via the after token, and a trim parameter for lighter responses.

### Query Parameters

| Parameter | Type | Required | Description |
| :- | :- | :- | :- |
| `subreddit` | `string` | Yes | Subreddit name |
| `timeframe` | `string` | No | Timeframe to get posts from |
| `sort` | `string` | No | Sort order |
| `after` | `string` | No | After to get more posts. Get 'after' from previous response. |
| `trim` | `boolean` | No | Set to true for a trimmed down version of the response |

### Response Example

```json theme={null}
{
  "success": true,
  "data": {
  "posts": [
    {
      "id": "1lfbo7u",
      "author": "Vetro_Nodulare2",
      "author_fullname": "t2_16syu27ar1",
      "subreddit": "AskReddit",
      "title": "What is a thing you love that lots of people hate?",
      "downs": 0,
      "name": "t3_1lfbo7u",
      "upvote_ratio": 0.9,
      "ups": 45,
      "total_awards_received": 0,
      "score": 45,
      "created": 1750341959,
      "num_comments": 349,
      "url": "https://www.reddit.com/r/AskReddit/comments/1lfbo7u/what_is_a_thing_you_love_that_lots_of_people_hate/",
      "subreddit_subscribers": 56146328,
      "is_video": false,
      "created_utc": 1750341959
    }
  ],
  "after": "t3_1lfogps"
}
}
```


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