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

StackOverflow https://stackoverflow.com/questions/18881887

  •  29-06-2022
  •  | 
  •  

Question

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.

Était-ce utile?

La solution

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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top