Reddit's Secret API

OFF TOPIC geek stuff goes here. News, reviews, mp3s, pics and videos found here.

Reddit's Secret API

Postby Steven on Thu Nov 27, 2008 6:34 pm

source

Every now and then a sharp developer uncovers a clue that leads to discovery of an undocumented, but quite real, web API. A case in point is the folks over at SEO services company Indexed Content, who noted in their blog yesterday that the popular social news web site Reddit has an API. But don’t go looking for any documentation, because it doesn’t look like there is any, at least not yet (for reference we’ve created a Reddit API summary in our directory and will update it if/when this becomes an officially supported API).

How did they find it?

Over the past few weeks I have been working on creating a tool to gather some social media metrics to track social media optimization campaigns. Friendfeed is your friend if you’re embarking on the same project. While looking for a native reddit API however I stumbled across a post on code.reddit.com that mentioned an API endpoint.


The post in question at code.reddit.com gives essentially all the documentation there is at this point:

In many applications, such as Socialite, it is valuable to look up information about a link on reddit. Currently, there are two good ways to do this using the JSON API:

Info call
Example: http://www.reddit.com/api/info.json?cou ... l=STORYURL

The API “info” call is an ideal way to look up reddit stories by URL. However, in some cases, looking up stories by URL alone presents problems:

1. URLs are not mapped to stories on a one-to-one basis. Since the same URL can be posted to many subreddits, when looking up stories by URL, it becomes necessary to constrain the search by subreddit, e.g.: http://www.reddit.com/r/subreddit/api/i ... l=STORYURL
"You've got to pay the troll toll..."
User avatar
Steven
Site Admin
 
Posts: 199
Joined: Sat Oct 25, 2008 2:02 pm

Return to Geek Heaven

Who is online

Users browsing this forum: No registered users and 1 guest

cron