shengmin
shengmin

Reputation: 319

Is there a way to get all posts for a given subreddit instead of just the posts newer than one month?

Is there a way to get all posts for a given subreddit instead of just the posts newer than one month?

For example, this is the "last" page of posts from IAmA subreddit we can get to, http://www.reddit.com/r/IAmA/?count=900&limit=100&after=t3_1k3tm1, and clearly this is not the last page of posts. It does not include any posts older than one month.

Upvotes: 12

Views: 21237

Answers (1)

shengmin
shengmin

Reputation: 319

After playing around with Reddit, I found a way to fetch all posts of a given subreddit is to use its search interface: http://www.reddit.com/r/<subreddit>/search.json?restrict_sr=on&t=all. For example, you can get all posts under IAmA subreddit using this request endpoint: http://www.reddit.com/r/IAmA/search.json?restrict_sr=on&t=all

Upvotes: 7

Related Questions