API Docs

Version:  v1.1

Getting Started with SharedCount

This guide will help you get started with SharedCount. You'll be operational within minutes!

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

API Calls


You can retrieve social engagement data from SharedCount's API. We will return the data in JSON format.

Your API Information

API Key: Get your API key here

Endpoint: https://api.sharedcount.com/v1.1/

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

Sample Response

{
    "Pinterest": 9,
    "Facebook": {
        "total_count": 168,
        "comment_count": 53,
        "reaction_count": 14,
        "share_count": 101,
        "comment_plugin_count": 0
    }
}

Errors


When an error occurs, SharedCount returns JSON with a key "Error" with a message, and a "Type" with a classification.

quota_exceeded (HTTP 403): Exceeded the API quota.

{
    "Error": "Free API quota exceeded. Quota will reset tomorrow. Visit SharedCount to inquire about paid plans. http://sharedcount.com/quota",
    "Type": "quota_exceeded"
}

invalid_url (HTTP 400): The URL you passed to the API is invalid.

{
    "Error": "Not a valid URL.",
    "Type": "invalid_url"
}

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 foo.com, and the only domains you query from SharedCount are on foo.com and sub.foo.com, 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 and add your domains.