# List subreddit posts

List a subreddit's posts with title, score, upvote ratio, comment count, awards, media, flair and author identity per post — plus a cursor for the next page. Requires `subreddit`.

- Platform: Reddit
- Request: `GET https://api.toolzerhub.com/v1/reddit/subreddit-posts`
- Auth: `x-api-key` header
- Cost: 1 credit per successful request. Failed requests are not billed.
- Page: https://docs.toolzerhub.com/reference/reddit/subreddit/get-reddit-subreddit-posts-v2

| Parameter | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `subreddit` | query | yes | string | Community name, e.g. technology. Accepts r/technology or a reddit.com URL. 2-21 letters, digits or underscores. An unknown community returns an empty feed, not an error. |
| `count` | query | no | integer | How many distinct posts to return (max 200). Pages are walked for you; fewer results means the feed ended, which end_of_feed confirms. A higher count is slower, not more expensive. Default: 25. |
| `sort` | query | no | enum: best, hot, new, top, rising, controversial | Feed order: best (default), hot, new, top, rising or controversial. Other values are rejected. top and controversial also accept time. Default: best. |
| `time` | query | no | enum: HOUR, DAY, WEEK, MONTH, YEAR, ALL | Time window for sort=top or sort=controversial: HOUR, DAY, WEEK, MONTH, YEAR or ALL (default). Ignored by other sorts. WEEK can reach older posts; filter on created_at if you need exactly seven days. |
| `after` | query | no | string | next_cursor from the previous response; omit for the top of the feed. A post id (1vay198) or fullname (t3_1vay198) also works. Cursors don't expire. |

## Example request

```bash
curl "https://api.toolzerhub.com/v1/reddit/subreddit-posts?subreddit=<subreddit>" \
  -H "x-api-key: $TOOLZERHUB_API_KEY"
```

Success responses are wrapped as `{ "data": ... }`. Errors return `{ "error": { "code", "status", "message", "retryable", "details" } }`. See https://docs.toolzerhub.com/docs/responses-and-errors.
