Questions tagged [reddit]

Use for questions involving the API for Reddit, a social news ranking website.

Reddit, pronounced /ˈrɛdɪt/ or "red-it", is a social news ranking website.

Users have the option to submit links to content on the Internet or submit "self" posts that contain original, user-submitted text.

Other users may then vote the posted links "up" or "down" with the most successful links gaining prominence by reaching the front page.

In addition, users can comment on the posted links and reply to other commentators consequently forming an online community. Reddit users (also referred to as redditors) may create their own topical sections, known as subreddits, for which to submit their links and to comment, while appealing to a specific niche.

Reddit is open source, and the primary codebase is hosted on Github. An extensive API is also provided.

1261 questions
27
votes
2 answers

Getting NEW posts from a subreddit in JSON

How would I go about getting the new posts of a subreddit in JSON? Just tacking on .json to the url (http://www.reddit.com/r/SOME_SUBREDDIT/new.json) returns the following: { kind: "Listing" - data: { modhash: "" …
Chris Cummings
  • 2,007
  • 5
  • 25
  • 39
27
votes
1 answer

Ruby - iterate over parsed JSON

I'm trying to iterate of a parsed JSON response from reddit's API. I've done some googling and seems others have had this issue but none of the solutions seem to work for me. Ruby is treating ['data]['children] as indexes and that's causing the…
mcnollster
  • 537
  • 1
  • 4
  • 14
25
votes
1 answer

Post to Reddit via URL

Is it possible to post a link to Reddit via URL? For example for Facebook you can do Share Stackoverflow on your profile! Does Reddit have an equivalent…
Don P
  • 60,113
  • 114
  • 300
  • 432
24
votes
1 answer

Reddit RSS feed, more than just the 25 results?

I'm trying to parse through the subreddits on http://reddit.com for the links, but so far I'm blocked by the limit of the 25 results given (say when visiting http://www.reddit.com/r/apple+programming.rss). Does anyone know if there is either... …
Baehr
  • 686
  • 4
  • 8
  • 14
24
votes
3 answers

Obtaining reddit data

I am interested in obtaining data from different reddit subreddits. Does anyone know if there is a reddit/other api similar like twitter does to crawl all the pages?
Budhapest
  • 601
  • 1
  • 5
  • 12
21
votes
2 answers

How to get access token? (Reddit API)

I wonder if it is possible to get a permanent access token for personal use on Reddit? It will only be me using the App. For users, the access token expires after an hour. My using the below information that I have about my client-id and secret, I…
Andreas
  • 1,121
  • 4
  • 17
  • 34
17
votes
1 answer

How much memory will a list with one million elements take up in Python?

There are more than a million subreddits on Reddit, according to redditmetrics.com. I wrote a script that repeatedly queries this Reddit API endpoint until all the subreddits are stored in an array, all_subs: all_subs = [] for sub in
Lincoln Bergeson
  • 3,301
  • 5
  • 36
  • 53
17
votes
3 answers

Get all comments from a specific reddit thread in python

The official way, r = praw.Reddit('Comment Scraper 1.0 by u/_Daimon_ see ' 'https://praw.readthedocs.org/en/latest/' 'pages/comment_parsing.html') submission =…
Phylliida
  • 4,217
  • 3
  • 22
  • 34
15
votes
3 answers

PRAW 6: Get all submission of a subreddit

I'm trying to iterate over submissions of a certain subreddit from the newest to the oldest using PRAW. I used to do it like this: subreddit = reddit.subreddit('LandscapePhotography') for submission in subreddit.submissions(None, time.time()): …
Curtwagner1984
  • 1,908
  • 4
  • 30
  • 48
15
votes
4 answers

Reddit-style nested/threaded/indented comments for Rails?

I'm wondering if someone has already built a system for threaded comments (for lack of a better term) in Rails or if I need to build it myself. In case it's not clear, what I'm referring to is a comment system like Reddit's that automatically…
Willem Obst
15
votes
4 answers

What is the alphanumeric id in a reddit URL?

What is the 7n5lu in the reddit URL http://www.reddit.com/r/reddit.com/comments/7n5lu/man_can_fly_if_you_watch_one_video_in_2 ...and how is it generated? Update: @Gerald, I initially thought this is some obfuscation of the id. It is just doing…
Shameem
  • 14,199
  • 13
  • 40
  • 43
15
votes
3 answers

Fail to call reddit's /api/submit

I couldn't get any help on reddit/r/redditdev so I'm hoping you fine folks at stackoverflow can help I'm trying to call /api/submit. I can successfully log the user in and retrieve the bearer/access token. (I use passport-reddit node module for…
kane
  • 5,465
  • 6
  • 44
  • 72
15
votes
1 answer

Is there a way to get a list or json of all the subreddits using the api?

I've been looking at the API methods and couldn't find one that would return a json with all the subreddits. Or is the only way to do this is by scraping reddit.com/reddits?
icanc
  • 3,499
  • 3
  • 35
  • 45
14
votes
2 answers

How to extract url data from Reddit API using JSON

I'm trying to extract the image post URLs from a subreddit feed, and render elements on my page. Been trying to hack together the .getJSON() Flickr example from the jQuery Docs for a while now and I'm not getting anywhere. Code in…
izolate
  • 1,590
  • 4
  • 22
  • 35
12
votes
1 answer

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

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,…
shengmin
  • 319
  • 1
  • 3
  • 13
1
2 3
84 85