9

How do third party applications and PageRank checking websites check for the PageRank number? Does Google provide this rank number with an API or can I retrieve it by entering something into the search box? I would like to make a simple script to record my page rank and work with it as a variable and I prefer to use only Google as a source.

4
  • 5
    Google has not provided PR in years. What you see offered on sites is well over 2 years old. If you have a newer site than that, then PR will always be 0.
    – closetnoc
    Commented Sep 13, 2015 at 14:25
  • @closetnoc Interesting comment, gives me peace that I do not have to worry about it any more, but do you have any supporting evidence other than for me to go trying and checking website's PR with existing tools one by one and finding out for myself? I am still interested how did it work, how did existing websites retrieve the rank those two years ago.
    – Mike
    Commented Sep 13, 2015 at 16:09
  • 1
    searchengineland.com/… and searchengineland.com/… There are more, but this is what I could find quickly. This also means that the PR is not available through any public means. Websites used to use the Google API to gather PR- that no longer works.
    – closetnoc
    Commented Sep 13, 2015 at 17:15
  • 1
    Google doesn't provide Page-Rank via either API or their Google bar (installed it a year ago to prove a point) anymore. Third party sites are either displaying ancient information, cobbling together their own idee-fixe of what Google possibly could have at one time calculated or are outright lying to you. Worrying about Google Page Rank is one of those Cargo Cult SEO memes that indicates your SEO dude is practicing shamanism in the hopes of getting money off you, like the panic stricken rush of telling you that you are missing Meta Keywords or that you don't rank on Alexa. Commented Sep 13, 2015 at 18:09

3 Answers 3

10

As of March 7th 2016, Google has removed the public PageRank metric completely. Google's John Mueller confirmed it via Twitter. Prior to this, Google had been allowing access to this data through APIs. Those APIs are all now deprecated and now no longer function.

Public PageRank has been dying a slow death. Even when the APIs were active, Google did not frequently refresh the data. The last data refresh was in December 2013.

Google still uses PageRank internally. Their ranking algorithms depend on it. Googlebot crawls pages with higher PageRank more frequently. However, Google is no longer making this metric available to the public at all.

6

After reading comments to my question and a lot of searching I found the answer. To retrieve Google Page Rank, a query against one of Google's sub-domain http://toolbarqueries.google.com can be done. This sub-domain is actually only one of the ways I have found it may be done.

The basic query syntax is in this format:

http://toolbarqueries.google.com/tbr?client=navclient-auto&ch=[HASH]features=Rank&q=info:[URL]&num=100&filter=0

It returns the Google Page Rank number, but [HASH] and [URL] must be provided, I have found several PHP, Python and Java functions to retrieve Page Rank from Google and generate this hashed query correctly. As result when done correctly, it still works at the date of me writing this answer and you will still get response directly from Google's server. For PHP, I found this code working and easiest to customize, I checked against several websites that I know very well and it gives me same response as third party Page Rank applications.

I have also found several blogs and articles supporting evidence of Page Rank retirement, it really looks like it does not change its value over time and all the Page Rank values are frozen.

1
  • Great answer for how to get an estimate of what the PR would be..
    – dvnkiss
    Commented Sep 14, 2015 at 0:48
0

Try this code class GOOGLEPR { CONST SOURCE = 'http://toolbarqueries.google.com/'; public function __construct() { }

 static function getPageRank($page)
    {
  $hash = "Mining PageRank is AGAINST GOOGLE'S TERMS OF SERVICE. Yes, I'm talking to you, scammer.";
  $c = 16909125;
  $length = strlen($page);
  $hashpieces = str_split($hash);
  $urlpieces = str_split($page);
  for($d = 0; $d<$length; $d++){ 
   $c = $c ^ (ord($hashpieces[$d]) ^ ord($urlpieces[$d]));
   $c = (($c >> 23) & 0x1ff) | $c << 9;
   }
   $c = -(~($c & 4294967295) + 1);
   $prHash = '8' . dechex($c);
  $prUrl = self::SOURCE.'tbr?client=navclient-auto&ch=' . $prHash . '&features=Rank&q=info:' . urlencode($page);
  $out = file_get_contents($prUrl);
  if(strlen($out) > 0) {
   return trim(substr(strrchr($out, ':'), 1));
  } else {
   return 0;
  } 
    }
}

Not the answer you're looking for? Browse other questions tagged or ask your own question.