Digg API

 

Recent News

 

Digg's Public API Proxy and Good API Application Design

by Kurt Wilms at 11am, Apr 23rd, 2008

 

Latest API Updates

by Steve Williams at 4pm, Feb 4th, 2008

 

Gallery Photos

by Kurt Wilms at 6pm, Oct 25th, 2007

 


 

Background

 

The Digg Application Programming Interface (API) has been created to let users and partners interact programmatically with Digg. The API returns Digg data in a form that can be easily integrated into an application or a web site. While the API is available to everyone free of charge, its use is subject to acceptance of our API License Agreement.

 

We intend to make most of the data on Digg.com available through the API. Currently, you can use the API to request very specific information about news stories and videos submitted to Digg, digging activity, comments, users, and gallery photos.

 

The API accepts REST requests and offers several response types: XML, JSON, Javascript, and serialized PHP. In addition, a PEAR module is available for PHP as well other open-source toolkits.

 

Thank you for interacting with and using the Digg API. If you have any questions, comments, or suggestions, please visit the Digg API Community Support Forum.

 

Want to use the Digg API for commercial purposes? Contact us at partners@digg.com. Please provide as much detail as you can about your proposed application and how you would like the business relationship with Digg to work. We will review your proposal and get back to you as soon as we can if there is interest in discussing a commercial license for your application.

 

Getting Started

 

The Basic Concepts page describes the basics of how to use the API, including requirements, common considerations, error code information, and a current list of available Digg topics. We recommend you start with Basic Concepts.

 

The Endpoints pages describe API calls and give some sample requests and responses. There's also a handy index of all endpoints.

 

Summary of API Features

 

List Stories Endpoint

 

This endpoint returns a list of stories matching various criteria. Examples:

 

  • Get all popular stories submitted after January 1, 2007 sorted by promotion date
    • And is from the container Science
    • Or is from the topic Celebrity
  • Get the most recent 100 upcoming stories in the topic "Apple"
    • And is sorted by submission date
  • Get the first 20 stories that were promoted on or after December 25, 2005
  • Determine whether a story, identified by its URL, has been submitted to Digg and, if so, get details like the number of Diggs and comments it has received
  • Get the details of a story, identified by its URL on Digg
  • Get all stories submitted today from nytimes.com
  • Get all stories submitted by Kevin Rose (or another Digger)

 

The response is a list of stories. When there are no matches for the request, the response is an XML document that contains no stories. Each story in the response includes the following story-related information:

 

  • The id of the story
  • The title
  • The description
  • The Digg permalink URL (href)
  • Its URL (source story URL)
  • The submit date
  • The Digg count
  • The number of comments
  • The date it was promoted (if relevant)
  • The status of the story (popular or upcoming)
  • The user who submitted the story
  • The container and topic to which it was submitted

 

The request can also narrow the results to stories submitted or promoted in a particular time period or from one domain or a specific URL. Individual Digg stories can be requested by URL. The request can be limited to a maximum number of stories and the results sorted by date submitted or promoted.

 

List Events Endpoint

 

This endpoint returns the Diggs for the requested stories. Some examples:

 

  • All Diggs on popular stories Dugg yesterday
  • The most recent Diggs from user jayadelson
  • The last 5 comments made by user kevinrose

 

  • The last 10 Diggs on stories in upcoming that were Dugg today
  • The first 100 Diggs on stories Dugg by user blink21 last week
  • Whether user blink21 has Dugg story id 473148
  • All Diggs on story ids 473148, 473149 and 473150
  • All Diggs on story id 473148 sorted newest first

 

The response includes includes:

 

  • Total Digg (or comment) count
  • The number of Diggs (or comments) included in the response
  • For each event (Digg or comment):
    • The date and time the event occurred
    • The id of the story that was Dugg or commented on
    • The status of the story at the time of the event (popular or upcoming)
    • The user who Dugg or commented on the story
  • In the case of comments, up and down comment-diggs are provided as well as the comment text

 

List Users Endpoint

 

This endpoint returns a list of users, or friends or fans of users. Some examples:

 

  • Get all users
  • Get the details of a single user, sbwms
  • Get the friends of user jayadelson
  • Get the fans of user kevinrose sorted in reverse alphabetical order

 

For each user returned in a request, the response includes:

 

  • User name
  • URL of the user's icon
  • Date the user registered on Digg
  • Number of profile views

 

List Gallery Photos Endpoint

 

This endpoint returns gallery photos. Some examples:

 

  • Get all gallery photos
  • Get the details of a single gallery photo
  • Get the comments on a gallery photo

 

For each gallery photo returned in a request, the response includes:

 

  • The id of the gallery photo
  • The gallery photo title
  • The Digg gallery URL (href)
  • Its URL (image source)
  • The submit date
  • The number of comments
  • The user who uploaded the gallery photo

 

Topics Endpoint

 

This endpoint returns a list of Digg topics. Each topic includes a capitalized name for display as well as a short name used as an argument to other endpoints.

 

List Error Endpoint

 

This endpoint returns the error codes that can occur when using the API, along with descriptive messages for each.


Page Information

  • 8 months ago [history]
  • View page source
  • You're not logged in
  • No tags yet learn more

Wiki Information


Update to PBwiki 2.0

An entirely new PBwiki experience, including folders and easier editing.

Convert Now for Free | Learn more