Y
Hacker News
new
|
ask
|
show
|
jobs
by
polygot
2434 days ago
If you add .json to the end of a Reddit URL, it will return JSON data. For example:
https://www.reddit.com/r/ubuntu.json
. It also works with comment threads and posts.
6 comments
avip
2433 days ago
Wonderful feature also used by Trello
https://trello.com/b/rq2mYJNn/public-trello-boards.json
link
ludamad
2434 days ago
Now that is an ergonomic API.
link
polygot
2433 days ago
Also, it outputs XML and RSS too:
https://www.reddit.com/r/ubuntu.rss
and
https://www.reddit.com/r/ubuntu.xml
link
ahbyb
2433 days ago
xml and rss seem to be the same exact output
link
sneak
2433 days ago
I have adopted this in other projects and added the functionality there as well; it is a brilliant idea.
link
diminoten
2433 days ago
Yeah no need to scrape Reddit, their content is accessible via their API.
link
Raidion
2434 days ago
PRAW is also a great python reddit "scraper" that allows you to pull data via their API very easily.
link