SharedCount API

Guides, examples, and live requests for API v1.1.

Current versionv1.1

Quickstart

Make your first API request

Retrieve social engagement data for a public URL in a few minutes. You only need an API key and the URL you want to analyze.

  1. 1Get an API key
  2. 2Send a request
  3. 3Read the response

Authentication

Get your API key

Every API request includes your key in the apikey query parameter.

Need a key?

Create an account for 500 free requests per day. No credit card is required.

Keep your key private. Store it in a server-side environment variable. If you call the API from a browser, restrict the key with your domain whitelist.

Request

Send a request

Use GET /v1.1/ with an API key and a URL. The playground makes a real request, so successful calls count against your daily quota.

GEThttps://api.sharedcount.com/v1.1/?apikey=YOUR_API_KEY&url=URL_TO_ANALYZE
curl --get 'https://api.sharedcount.com/v1.1/' \
  --data-urlencode 'apikey=YOUR_API_KEY' \
  --data-urlencode 'url=https://www.nytimes.com/'

Try this endpoint

GEThttps://api.sharedcount.com/v1.1/

Live request

This calls the live SharedCount API. Successful requests count against your daily quota.

Ready
Your response will appear here.

Tip: Let your HTTP library encode query parameters. If you build the URL yourself, percent-encode the URL value before sending it.

Response

Read the JSON response

A successful response contains engagement totals reported by each supported network.

HTTP 200 · application/jsonExample response
{
  "Pinterest": 9,
  "Facebook": {
    "total_count": 168,
    "comment_count": 53,
    "reaction_count": 14,
    "share_count": 101,
    "comment_plugin_count": 0
  }
}
Facebook.total_count
The total Facebook engagement count for the canonical URL.
Pinterest
The Pinterest count reported for the URL.
null values
A provider did not return a count. Handle this separately from a numeric zero.
Responses may be cached for up to one hour. Repeating the same URL can return a cached value during that window.

Troubleshooting

Common API errors

Errors are JSON objects with an Error message and a machine-readable Type.

400

invalid_url

Send a complete public URL, including http:// or https://, and make sure the query value is encoded.

403

quota_exceeded

Your daily allowance is exhausted. Check your quota or compare plans; the response message tells you when to retry.

Next steps

Continue building

Choose the guide that matches what you want to do next.

Get your API key