2

I'm looking for examples in reddit API. I want to pull images from a certain subreddit (http://www.reddit.com/r/VillagePorn) and put them on a webpage. I've seen other websites do it (mainly, imgur.com/r/*) and I can't figure out how.

I tried http://www.reddit.com/r/VillagePorn/.xml but that just returns the Thumbnail of the picture. Not even the link itself.

What should I do?

Bojangles
  • 99,427
  • 50
  • 170
  • 208
test
  • 17,706
  • 64
  • 171
  • 244

1 Answers1

4

You can check out the Reddit API if you'd like. Any link can add /.json to the end of it and it fetches the information for that, including the source link for the picture.

I'm not sure how you're creating this page, but this question might help you out too.

Community
  • 1
  • 1
Wires77
  • 251
  • 1
  • 4
  • 18
  • 1
    adding /.json to get the source for the picture doesn't work. the urls for the pictures in the json that is returned all give 403 forbidden errors. – Nick May 23 '19 at 19:43
  • This answer was from almost 7 years ago, so I'm sure they've changed backend code since then, especially with the new redesign. I'm guessing they don't want people without an API token accessing all of their pictures and potentially overloading their servers – Wires77 May 24 '19 at 20:26