geddit icon indicating copy to clipboard operation
geddit copied to clipboard

No pagination?

Open Touexe opened this issue 3 years ago • 1 comments

Getting a redditor's submissions only return 100 submissions only meanwhile there are more.
so the solution is a loop running requests using after parameter https://www.reddit.com/user/redditor/submitted.json?limit=1000&after=

Touexe avatar May 27 '21 02:05 Touexe

Reddit's API itself has a limit of 100 posts. You can not pull down more. See documentation for subreddit, its same for user as it is on subreddit. There is also no pagination in the endpoint:

Listings do not use page numbers because their content changes so frequently. Instead, they allow you to view slices of the underlying data. Listing JSON responses contain after and before fields which are equivalent to the "next" and "prev" buttons on the site and in combination with count can be used to page through the listing.

0x43eba avatar Jul 01 '21 23:07 0x43eba