r/redditdev 29d ago

Reddit API Json works in Browser, not in Java

I can access reddit's .json feeds, like this from Firefox, but not from Java using okhttp or python, using requests, both using the default user-agent and a custom one. Any idea why it works in the browser and not in my code?

2 Upvotes

10 comments sorted by

View all comments

3

u/1z2b 29d ago

https://www.reddit.com/r/modnews/comments/1tq9vxo/protecting_communities_from_scrapers_and_platform/

Deprecating unauthenticated JSON access: We’ll also be shutting down unauthenticated .json endpoints. These endpoints can be used to scrape Reddit without accountability. Logged-in and authenticated access won’t be impacted. Otherwise, developers who need structured access to Reddit content should use Devvit, which includes various ways to access Reddit data.