Let's say you want to display the score of any web site from SimpleOrNot.com on your web site. This API attempts to make this an easy process.
Right now, anyone may consume the SimpleOrNot API without an API key.
To obtain all available data about a site in XML, run this call:
http://www.simpleornot.com/api.xml?site=digg-com&from=mysite.com
Sample data returned in XML:
<?xml version="1.0" encoding="UTF-8"?>
<hash>
<score type="integer">87</score>
<thumbnail-image-medium>http://sono.s3.amazonaws.com/digg-com/medium.jpg</thumbnail-image-medium>
<link>digg.com</link>
<format>xml</format>
<result>success</result>
<thumbnail-image-small>http://sono.s3.amazonaws.com/digg-com/small.jpg</thumbnail-image-small>
<has-thumbnail type="boolean">true</has-thumbnail>
<comments-count type="integer">7</comments-count>
<name>Digg</name>
<profile>http://www.simpleornot.com/digg-com</profile>
</hash>
To obtain all available data about a site in JSON, run this call:
http://www.simpleornot.com/api.json?site=digg-com&from=mysite.com
Sample data returned in JSON:
{
"score":87,
"thumbnail_image_medium":"http://sono.s3.amazonaws.com/digg-com/digg-com/medium.jpg",
"link":"digg.com",
"format":"json",
"result":"success",
"thumbnail_image_small":"http://sono.s3.amazonaws.com/digg-com/small.jpg",
"has_thumbnail":true,
"comments_count":7,
"name":"Digg",
"profile":"http://www.simpleornot.com/digg-com"
}
The following data is returned from the call made above:
"Result" always returns "fail" and an additional "reason" field is returned when there are errors. There are two possible error messages: