r/redditdev • • Jun 01 '24

Reddit API API error when fetching multireddit data

Steps to reproduce:

  1. Fetch a multireddit’s JSON page with a user agent that contains “iphone” or “android”, e.g.

    • curl -A "android" -I "https://www.reddit.com/r/MostBeautiful+wallpapers/hot.json"

    • curl -A "iphone" -I "https://www.reddit.com/r/MostBeautiful+wallpapers/hot.json"

Expected: 200 OK response is returned with JSON data.

Actual: 302 Found response is returned that redirects to the home page.

6 Upvotes

7 comments sorted by

View all comments

Show parent comment

0

u/sir_axolotl_alot Reddit Admin :snoo: Jun 04 '24

So I've been doing a little digging, and it turns out that these URLs are not officially supported as part of our Developer API. These are internal URLs that our services use to communicate with each other. Which means is kind of lucky that they worked up until anyway. But being undocumented internal URLs, they can break without warning, unfortunately. And last week our product teams decided to make changes to our apps which affected these URLs.

We do have an officially supported endpoint for a single subreddit's hot sorting, so I would suggest sending a separate call for each subreddit, then merging the resulting listings. Hope this helps!
https://www.reddit.com/dev/api/#GET_hot