# Reddit — Subreddit posts

Fetch posts from a subreddit, with sort and date filters HTML version: https://www.socialrouter.io/services/reddit/subreddit.posts

## Call it

```
POST https://api.socialrouter.io/v1/extract/reddit/subreddit.posts
Authorization: Bearer <your API key>
Content-Type: application/json

{ "urls": ["https://www.reddit.com/r/programming"] }
```

The response shape does not depend on which offer ran; `served_by` names the one that did.

## Input

- `https://www.reddit.com/r/<subreddit>` — A sort suffix (/hot, /new, /top, /rising) is accepted too. /r/all and /r/popular work.. Example: `https://www.reddit.com/r/programming`

## Options

- `sort` (enum: hot | new | top | rising) — Listing sort. Overrides a sort suffix present in the URL.
- `time` (enum: hour | day | week | month | year | all) — Time window, applied when sort is "top".
- `postedAfter` (string) — Only posts created on/after this UTC date.
- `postedBefore` (string) — Only posts created before this UTC date.

## Offers, in failover order

1. `apify/harshmaur` — $0.0069 per record, up to 10 inputs per call
2. `apify/trudax` — $0.0092 per record, up to 10 inputs per call

## See also

- Catalogue as JSON: https://api.socialrouter.io/v1/services
- OpenAPI 3.1 spec: https://api.socialrouter.io/v1/openapi.json
- Agent overview: https://www.socialrouter.io/llms.txt
- Sitemap: https://www.socialrouter.io/sitemap.xml
- Docs: https://docs.socialrouter.io
