SearchStories
Fetches a list of Digg stories for the query provided.
Example Request
Retrieve stories that match the query "apple":
http://services.digg.com/search/stories?query=apple&appkey=http://www.myapp.com
Retrieve stories from "wsj.com":
http://services.digg.com/search/stories/source/wsj.com?appkey=http://www.myapp.com
Example Responses
XML
<?xml version="1.0" encoding="UTF-8"?>
<stories count="3" offset="0" timestamp="1245169167" total="3" version="1.0">
<story link="http://www.variety.com/article/VR1118004916.html?categoryid=1009&cs=1" submit_date="1245037400" diggs="397" id="13305892" comments="43" href="http://digg.com/apple/Hollywood_just_can_t_quit_Apple" status="popular" media="news">
<description>Apple and Hollywood are a bit like Eliza Doolittle and Henry Higgins. They're from different worlds, they never expected to wind up together, and they frequently infuriate one another.</description>
<title>Hollywood just can't quit Apple</title>
<user icon="/users/noupsell/l.png" name="noupsell" profileviews="56000" registered="1151051314"/>
<topic name="Apple" short_name="apple"/>
<container name="Technology" short_name="technology"/>
<shorturl short_url="http://digg.com/d1tpTA" view_count="1511"/>
</story>
<story link="http://musicindustryreport.org/?p=9008" submit_date="1245077585" diggs="606" id="13315243" comments="138" href="http://digg.com/music/Apple_s_iTunes_Now_Nation_s_Largest_Music_Seller" status="popular" media="news">
<description>Apple’s iTunes is now the nation’s largest music seller - with 20 percent of the market. Amazon has about 8 percent. And some studies show most music is now downloaded for free illegally.</description>
<title>Apple's iTunes Now Nation's Largest Music Seller</title>
<user icon="/users/msaleem/l.png" name="msaleem" profileviews="206365" registered="1126518985"/>
<topic name="Music" short_name="music"/>
<container name="Entertainment" short_name="entertainment"/>
<shorturl short_url="http://digg.com/d1trtz" view_count="849"/>
</story>
<story link="http://www.appleinsider.com/articles/09/06/15/apple_plugs_critical_java_security_hole_affecting_tiger_leopard.html" submit_date="1245101450" diggs="342" id="13323661" comments="76" href="http://digg.com/apple/Critical_Java_security_hole_affecting_Tiger_Leopard_Apple" status="popular" media="news">
<description>Apple on Monday finally got around to patching a widely-publicized security flaw in the version of Java shipping with Mac OS X, which could leave a Mac open to attack while browsing the web. </description>
<title>Critical Java security hole affecting Tiger, Leopard [Apple]</title>
<user icon="/users/SirPopper/l.png" name="SirPopper" profileviews="55672" registered="1207243211"/>
<topic name="Apple" short_name="apple"/>
<container name="Technology" short_name="technology"/>
<shorturl short_url="http://digg.com/d1tu5l" view_count="677"/>
</story>
</stories>
JSON
{
"stories":[
{
"link":"http:\/\/www.variety.com\/article\/VR1118004916.html?categoryid=1009&cs=1",
"submit_date":1245037400,
"shorturl":{
"link":null,
"short_url":"http:\/\/digg.com\/d1tpTA",
"itemid":null,
"view_count":1515
},
"diggs":397,
"id":13305892,
"comments":43,
"href":"http:\/\/digg.com\/apple\/Hollywood_just_can_t_quit_Apple",
"promote_date":null,
"status":"popular",
"media":"news",
"description":"Apple and Hollywood are a bit like Eliza Doolittle and Henry Higgins. They're from different worlds, they never expected to wind up together, and they frequently infuriate one another.",
"title":"Hollywood just can't quit Apple",
"user":{
"name":"noupsell",
"icon":"\/users\/noupsell\/l.png",
"registered":1151051314,
"profileviews":56000,
"fullname":null,
"links":[]
},
"topic":{
"name":"Apple",
"short_name":"apple"
},
"container":{
"name":"Technology",
"short_name":"technology"
}
},
{
"link":"http:\/\/musicindustryreport.org\/?p=9008",
"submit_date":1245077585,
"shorturl":{
"link":null,
"short_url":"http:\/\/digg.com\/d1trtz",
"itemid":null,
"view_count":850
},
"diggs":606,
"id":13315243,
"comments":138,
"href":"http:\/\/digg.com\/music\/Apple_s_iTunes_Now_Nation_s_Largest_Music_Seller",
"promote_date":null,
"status":"popular",
"media":"news",
"description":"Apple\u2019s iTunes is now the nation\u2019s largest music seller - with 20 percent of the market. Amazon has about 8 percent. And some studies show most music is now downloaded for free illegally.",
"title":"Apple's iTunes Now Nation's Largest Music Seller",
"user":{
"name":"msaleem",
"icon":"\/users\/msaleem\/l.png",
"registered":1126518985,
"profileviews":206367,
"fullname":null,
"links":[]
},
"topic":{
"name":"Music",
"short_name":"music"
},
"container":{
"name":"Entertainment",
"short_name":"entertainment"
}
},
{
"link":"http:\/\/www.appleinsider.com\/articles\/09\/06\/15\/apple_plugs_critical_java_security_hole_affecting_tiger_leopard.html",
"submit_date":1245101450,
"shorturl":{
"link":null,
"short_url":"http:\/\/digg.com\/d1tu5l",
"itemid":null,
"view_count":677
},
"diggs":343,
"id":13323661,
"comments":76,
"href":"http:\/\/digg.com\/apple\/Critical_Java_security_hole_affecting_Tiger_Leopard_Apple",
"promote_date":null,
"status":"popular",
"media":"news",
"description":"Apple on Monday finally got around to patching a widely-publicized security flaw in the version of Java shipping with Mac OS X, which could leave a Mac open to attack while browsing the web. ",
"title":"Critical Java security hole affecting Tiger, Leopard [Apple]",
"user":{
"name":"SirPopper",
"icon":"\/users\/SirPopper\/l.png",
"registered":1207243211,
"profileviews":55673,
"fullname":null,
"links":[]
},
"topic":{
"name":"Apple",
"short_name":"apple"
},
"container":{
"name":"Technology",
"short_name":"technology"
}
}
],
"timestamp":1245169665,
"version":"1.0",
"total":3,
"count":3,
"offset":0
}
PHP
O:14:"DiggAPIStories":6:{s:7:"stories";a:3:{i:0;O:12:"DiggAPIStory":14:{s:4:"link";s:69:"http://www.variety.com/article/VR1118004916.html?categoryid=1009&cs=1";s:11:"submit_date";i:1245037400;s:8:"shorturl";O:15:"DiggAPIShortURL":2:{s:9:"short_url";s:22:"http://digg.com/d1tpTA";s:10:"view_count";i:1516;}s:5:"diggs";i:397;s:2:"id";i:13305892;s:8:"comments";i:43;s:4:"href";s:53:"http://digg.com/apple/Hollywood_just_can_t_quit_Apple";s:6:"status";s:7:"popular";s:5:"media";s:4:"news";s:11:"description";s:184:"Apple and Hollywood are a bit like Eliza Doolittle and Henry Higgins. They're from different worlds, they never expected to wind up together, and they frequently infuriate one another.";s:5:"title";s:31:"Hollywood just can't quit Apple";s:4:"user";O:11:"DiggAPIUser":4:{s:4:"name";s:8:"noupsell";s:4:"icon";s:21:"/users/noupsell/l.png";s:10:"registered";i:1151051314;s:12:"profileviews";i:56000;}s:5:"topic";O:12:"DiggAPITopic":2:{s:4:"name";s:5:"Apple";s:10:"short_name";s:5:"apple";}s:9:"container";O:16:"DiggAPIContainer":2:{s:4:"name";s:10:"Technology";s:10:"short_name";s:10:"technology";}}i:1;O:12:"DiggAPIStory":14:{s:4:"link";s:38:"http://musicindustryreport.org/?p=9008";s:11:"submit_date";i:1245077585;s:8:"shorturl";O:15:"DiggAPIShortURL":2:{s:9:"short_url";s:22:"http://digg.com/d1trtz";s:10:"view_count";i:850;}s:5:"diggs";i:606;s:2:"id";i:13315243;s:8:"comments";i:138;s:4:"href";s:70:"http://digg.com/music/Apple_s_iTunes_Now_Nation_s_Largest_Music_Seller";s:6:"status";s:7:"popular";s:5:"media";s:4:"news";s:11:"description";s:191:"Apple’s iTunes is now the nation’s largest music seller - with 20 percent of the market. Amazon has about 8 percent. And some studies show most music is now downloaded for free illegally.";s:5:"title";s:48:"Apple's iTunes Now Nation's Largest Music Seller";s:4:"user";O:11:"DiggAPIUser":4:{s:4:"name";s:7:"msaleem";s:4:"icon";s:20:"/users/msaleem/l.png";s:10:"registered";i:1126518985;s:12:"profileviews";i:206367;}s:5:"topic";O:12:"DiggAPITopic":2:{s:4:"name";s:5:"Music";s:10:"short_name";s:5:"music";}s:9:"container";O:16:"DiggAPIContainer":2:{s:4:"name";s:13:"Entertainment";s:10:"short_name";s:13:"entertainment";}}i:2;O:12:"DiggAPIStory":14:{s:4:"link";s:114:"http://www.appleinsider.com/articles/09/06/15/apple_plugs_critical_java_security_hole_affecting_tiger_leopard.html";s:11:"submit_date";i:1245101450;s:8:"shorturl";O:15:"DiggAPIShortURL":2:{s:9:"short_url";s:22:"http://digg.com/d1tu5l";s:10:"view_count";i:677;}s:5:"diggs";i:343;s:2:"id";i:13323661;s:8:"comments";i:76;s:4:"href";s:79:"http://digg.com/apple/Critical_Java_security_hole_affecting_Tiger_Leopard_Apple";s:6:"status";s:7:"popular";s:5:"media";s:4:"news";s:11:"description";s:191:"Apple on Monday finally got around to patching a widely-publicized security flaw in the version of Java shipping with Mac OS X, which could leave a Mac open to attack while browsing the web. ";s:5:"title";s:60:"Critical Java security hole affecting Tiger, Leopard [Apple]";s:4:"user";O:11:"DiggAPIUser":4:{s:4:"name";s:9:"SirPopper";s:4:"icon";s:22:"/users/SirPopper/l.png";s:10:"registered";i:1207243211;s:12:"profileviews";i:55674;}s:5:"topic";O:12:"DiggAPITopic":2:{s:4:"name";s:5:"Apple";s:10:"short_name";s:5:"apple";}s:9:"container";O:16:"DiggAPIContainer":2:{s:4:"name";s:10:"Technology";s:10:"short_name";s:10:"technology";}}}s:9:"timestamp";i:1245169729;s:7:"version";s:3:"1.0";s:5:"total";i:3;s:5:"count";i:3;s:6:"offset";i:0;}
Endpoints
GET /search/stories
Stories that are relevant to the query provided.
404 No matches for query.
GET /search/stories/source/{domain}
Stories that are relevant to the domain part of the path.
404 No matches for query.
Arguments
Additional query string parameters to endpoints above. See also ResponseTypes and ApplicationKeys.
For /search/stories
query
Specific query for which you want a list of Digg stories returned. This query string needs to be url encoded.
String, e.g.: digg
"query"
Exact match on the query provided.
String, e.g.: "keyboard cat"
query +b
Return only buried stories that match the query provided.
String, e.g.: apple +b
query +p
Return only popular stories that match the query provided.
String, e.g.: obama +p
query +u
Return only upcoming stories that match the query provided.
String, e.g.: obama +u
-query
Return stories that exclude stories for the term after the minus site.
String, e.g.: apple -ipod
count (defaults to 10, maximum of 100)
The number of stories to retrieve
offset (defaults to 0)
The offset used to determine the starting point in the ordered stories result set to return from.
sort (defaults to site search default weighting score)
Sort either by promote_date-desc (date promoted in descending order), promote_date-asc (date promoted in ascending order), submit_date-desc (date submitted in descending order), submit_date-asc (date submitted in ascending order), digg_count-desc (digg count in descending order), and digg_count-asc (digg count in ascending order)
media (defaults to all)
Filter out result to set to contain a combination of news, video, or image. For example,
media=image: get only images stories
media=news,video: get only news and videos stories
container (defaults to all)
Limit search results to return only stories that are from a specific container. To get a list of valid container see /topics endpoint.
topic (defaults to all)
Limit search results to return only stories that are from a specific topic. To get a list of valid container see /topics endpoint
For /search/stories/source
count (defaults to 10, maximum of 100)
The number of stories to retrieve
offset (defaults to 0)
The offset used to determine the starting point in the ordered stories result set to return from.
sort (defaults to site search default weighting score)
Sort either by promote_date-desc (date promoted in descending order), submit_date-desc (date submitted in descending order), and digg_count-desc (digg count in descending order)
Comments (0)
You don't have permission to comment on this page.