Shared Count

Track your shares, likes, tweets, and more.

API Information

At this time, there are no rate limits. Values are cached for 5 minutes at a time. So, values may be up to 5 minutes old for repeated queries.

You can retrieve the counts from a JSON and JSONP API:
HTTP Endpoint: http://api.sharedcount.com/
HTTPS Endpoint: https://sharedcount.appspot.com/

Parameters

Note: The way in which you pass the URL will effect the results, depending on the service. Some services will return different results, depending on if you include a trailing slash on the URL.

Sources

We retrieve the data from the official 'Share' buttons provided by these major services. All of the services provide a JSON API for accessing the shared counts for particular URLs.

Sample Code - PHP 5+


<?php
$url 
= ((!empty($_SERVER['HTTPS'])) ? "https://""http://" ) . $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$json file_get_contents("http://api.sharedcount.com/?url=" rawurlencode($url));
$counts json_decode($jsontrue);
echo 
"This page has " $counts["Twitter"] ." tweets, " $counts["Facebook"]["like_count"] . " likes, and "$counts["GooglePlusOne"] . "+1's";
?>

Result:

This page has 18 tweets, 0 likes, and 1+1's

Sample Code - JSONP

jQuery Plugin:

Result:

This page has 0 tweets, 0 likes, and 0 +1's.