GET/v1.1/
Return share counts for a URL.
Endpoint
https://api.sharedcount.com/v1.1/
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| url | string | The URL you're querying. | true |
| apikey | string | Your API Key. | true |
Code examples
curl 'https://api.sharedcount.com/v1.1/?apikey=YOUR_API_KEY&url=https%3A%2F%2Fwww.nytimes.com%2F'
npm i sharedcount-sdk
const SharedCountApi = require('sharedcount-sdk');
let sharedCountApiInstance = new SharedCountApi('YOUR_API_KEY');
//Return share counts for a URL.
var urlGetResponse = sharedCountApiInstance.get('https%3A%2F%2Fwww.nytimes.com%2F');
pip install sharedcountsdk
from sharedcountsdk import SharedCountApi
sharedCountApiInstance = SharedCountApi('YOUR_API_KEY')
# Return share counts for a URL.
urlGetResponse = sharedCountApiInstance.get('https%3A%2F%2Fwww.nytimes.com%2F')
composer require sharedcount/sharedcount-sdk
require __DIR__ . '/vendor/sharedcount/sharedcount-sdk/lib/api.php';
$sharedcountApiInstance = new SharedcountApi('YOUR_API_KEY');
//Return share counts for a URL.
$urlGetResponse = $sharedcountApiInstance->get('https%3A%2F%2Fwww.nytimes.com%2F');
Try this endpoint
GEThttps://api.sharedcount.com/v1.1/
Your response will appear here.
URL encoding warning
⚠️ Important:
When making API requests, ensure that URL parameters are URL-encoded to pass the correct URL to the social networks.
✅ Good (Encoded): https%3A%2F%2Fwww.nytimes.com%2F%3Fq%3Dtechnology%26sort%3Dnewest
❌ Bad (Unencoded): https://www.nytimes.com/?q=technology&sort=newest
Result format
{
"Pinterest": 9,
"Facebook": {
"total_count": 168,
"comment_count": 53,
"reaction_count": 14,
"share_count": 101,
"comment_plugin_count": 0
}
}{
"Error": "Not a valid URL.",
"Type": "invalid_url"
}Implementation notes
This endpoint returns null instead of a number when a service fails to report a share count.
Check that a response field exists and handle null separately from a numeric zero.