API Documentation


API Information

There is a courtesy rate limit of 1,000 queries per day for each user. If you will reach that limit, you will have to wait until next day.
Values are cached for 5 hours at a time. So, values may be up to 5 hours old for repeated queries.

API URL and Parameters


You can receive the data by requesting URL:
https://socialanalytics.php8developer.com/api.php

Parameters:


API Example


Response as JSON


<?php
$url 
"https://www.google.com";
$response file_get_contents("https://socialanalytics.php8developer.com/api.php?url=".urlencode($url));
$json json_decode($responsetrue);
echo 
$url" has " .$json["facebook"]["share_count"]." shares and ".$json["pinterest"]. " pins";
?>

Response as XML


<?php
$url 
"https://www.google.com";
$response file_get_contents("https://socialanalytics.php8developer.com/api.php?url=".urlencode($url)."&response=xml");
$xml simplexml_load_string($response);
echo 
$url" has ".$xml->facebook->share_count." shares, and ".$xml->pinterest." pins";
?>