Google’s PageRank algorithm assigns a number between 1 and 10 to web domains (such as “facebook.com” or “davidlyness.com”), and is one of the main factors in determining how high to place a website in the list of Google search results. The method by which a domain’s PageRank is calculated is patented (and hence public), but a domain’s PageRank is never actually shown in the search results themselves. It is also notoriously difficult to find a simple way to query Google’s servers for this information.
When Google released the Google Toolbar back in 2000, it included a feature which displayed the PageRank of the website currently being viewed. With a bit of reverse-engineering, I developed the below function which will return the PageRank of a given domain. Interesting to note is that the returned rank is always between 1 and 9 — so sites like “google.com” that have a de facto PageRank of 10 appear as having a PageRank of 9.
- As can be seen from
$seed, abuse of this script is in violation of Google’s Terms of Service. Use at your own risk.
- Google can change the initialised value of
$resultat any time — doing so will render this script unusable until this value is updated.