OPR API will let users get Page Ranks for domains via a REST API.
Base URL: https://openpagerank.com/api/v1.0/
getPageRank
https://openpagerank.com/api/v1.0/getPageRank
Get page rank APIRequest URL: https://openpagerank.com/api/v1.0/getPageRank
Request Method: GET
Type: formdata
HEADER: API-OPR:[YOUR-API-KEY-HERE]
GET Param | Value | Required |
---|---|---|
domains[] | google.com | |
domains[] | apple.com | |
domains[] | unknowndomain.com |
PHP cURL Example
$url = 'https://openpagerank.com/api/v1.0/getPageRank';
$query = http_build_query(array(
'domains' => array(
'google.com',
'apple.com',
'unknowndomain.com'
)
));
$url = $url .'?'. $query;
$ch = curl_init();
$headers = ['API-OPR: YOUR-API-KEY-HERE'];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec ($ch);
curl_close ($ch);
$output = json_decode($output,true);
Json Response:
{ "status_code":200, "response":[ { "status_code":200, "error":"", "page_rank_integer":10, "page_rank_decimal":10, "rank":"6", "domain":"google.com" }, { "status_code":200, "error":"", "page_rank_integer":8, "page_rank_decimal":7.63, "rank":"40", "domain":"apple.com" }, { "status_code":404, "error":"Domain not found", "page_rank_integer":0, "page_rank_decimal":0, "rank":null, "domain":"unknowndomain.com" } ], [last_updated] => "25th Dec 2024" }