Shared Count

Track URL shares, likes, and more.

API Information


Please see pricing page for detailed quota information and information on paid plans with extra API quota.

Free users utilizing API Keys have a quota of 10,000 queries per day. is a deprecated endpoint and will be permanently discontinued on January 1, 2015. All users on free plans should use

For API keys sending more than their allocated quota in a day will see their queries rejected with an HTTP Status Code of 401.

To sign up for an API key, create an account here.

You can monitor your API usage by inspecting the response headers X-Quota-Remaining. Note that cached queries may return stale quota results.

Users with API keys can check their current API quota by querying the end-point /quota?apikey={{ your_api_key }}

Values of queries may be cached for up to an hour for repeated URLs.

Signup to get an API key

API Calls

You can retrieve SharedCount data from a JSON/JSONP API. The SharedCount subdomain you should use depends on the plan you're on.
Free Plan:
Plus Plan:
Business Plan:

Note that users paying for Plus, Business or Dedicated Plans will be assigned different endpoint domains. You can see your assigned endpoints by logging in to your account.


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.

Sample Response



When an error occurs, we'll return an object with a key "Error" with a message, and a "Type" with a classification. For JSONP calls, we'll always return a 200 code.

Bulk API (Beta)

Users on paid plans have access to a bulk querying endpoint, where you can POST a large batch of URLs all at once, and poll for the result.

Read the Bulk URL API Docs here.


Generally, 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.

Securing your API key

Domain Whitelist

For users using SharedCount from the client-side, we offer the ability to whitelist specific domains that can be queried using your API key. For example, if your site is, and the only domains you query from SharedCount are on and, then you can secure your API key by only allowing these domains to utilize your API key. This is useful for sites that use SharedCount for reporting their own sites' data within the browser. You can toggle this feature from the User Center.

Sample Code - PHP 5+

Logged in users will see their API key and domain auto-populate in the below sample code.
$url = ((!empty($_SERVER['HTTPS'])) ? "https://": "http://" ) . $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
$apikey = "XXXXXXXXX";
$json = file_get_contents("" . rawurlencode($url) . "&apikey=" . $apikey); $counts = json_decode($json, true); echo "This page has " . $counts["Twitter"] ." tweets, " . $counts["Facebook"]["like_count"] . " likes, and ". $counts["GooglePlusOne"] . "+1's"; ?>


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

Sample Code - JSONP

jQuery Plugin:

Logged in users will see their API key and domain auto-populate in the below sample code.

jQuery.sharedCount = function(url, fn) {
    url = encodeURIComponent(url || location.href);
    var domain = "//"; /* SET DOMAIN */
    var apikey = "" /*API KEY HERE*/
    var arg = {
	    data: {
	    	url : url,
	    	apikey : apikey
        url: domain,
        cache: true,
        dataType: "json"
    if ('withCredentials' in new XMLHttpRequest) {
        arg.success = fn;
    else {
        var cb = "sc_" + url.replace(/\W/g, '');
        window[cb] = fn;
        arg.jsonpCallback = cb;
        arg.dataType += "p";
    return jQuery.ajax(arg);

Example: Using the jQuery plugin:
 $.sharedCount(location.href, function(data){
        $("#tweets").text(data.Twitter); $("#likes").text(data.Facebook.like_count);



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