Hacker News new | ask | show | jobs
by bambax 670 days ago
> Then I’ve discovered that you could get the whole page in JSON format by adding .json to the end of the URL. That was my big aha moment.

This is actually still working! Trying on one of the top posts right now, if you change

https://www.reddit.com/r/funny/comments/1ezq3po/asked_for_my...

to

https://www.reddit.com/r/funny/comments/1ezq3po/asked_for_my...

you get all comments as json, with no need for authentication. So it's probably trivial to develop a client that would use this and have a nice ui and bypass any and all ads. Interesting.

3 comments

> you get all comments as json

AFAIK, you don't actually get all comments, and it's impossible to enumerate all comments to a post via that method. Give it a try to enumerate based on the data that gets returned, and you'll end up with a way smaller number than the reddit UI shows on the website.

It still supports JSONP [1] too, a little React app I haven't touched for 9 years which used it [2] is still chugging along

[1] https://www.reddit.com/r/programming/comments/cxh3a/we_just_...

[2] http://insin.github.io/just-dadjokes/

And now this is commented it will be changed. :(
Maybe not. The incident described by the OP happened in Aug. 2023; it has worked since then, despite Reddit being very much aware of it. It's possible there is something in Reddit's architecture that would make it very costly to change...