View Full Version : Get PR via API?
Phil Tanny
Jan 27th 2005, 7:09 pm
Is it possible to write an app using Google API that will find the Page Rank of each of the top 10 ten listings?
I'm guessing yes, can anyone point to further details?
Many thanks.
digitalpoint
Jan 27th 2005, 8:59 pm
No, you cannot get PageRank with the API.
nevetS
Jan 27th 2005, 9:42 pm
I thought there was a formula for guessing page-rank. I don't know what it is, but I thought that is what was used by the keyword tracking tool and others like the pr googlebar. I've never seen the formula, but I've seen a lot of references to the idea around.
riziko
Jan 27th 2005, 10:50 pm
I wonder how this (http://www.seochat.com/seo-tools/pagerank-search/) works then? :confused:
tomecki
Jan 27th 2005, 11:35 pm
You can get at hotscripts "PHP Google PageRank Calculator". It can "find the Google Page Rank for any URL by calculating the checksum and requesting the PR from Google's servers."
The url for this:
http://hotscripts.com/Detailed/37856.html
The hotscripts site is a great site to find some goodies :).
Phil Tanny
Jan 28th 2005, 3:46 am
Thanks guys, I appreciate it.
Here's another site that has figured out how to get Page Rank data:
http://prsearch.net
I'm writing a keyword analyzer and want to programmatically obtain the PageRank of each of the top 10 listings for a list of keywords.
So, I need the top 10 results, and the PageRank of each listing. And I need to do this over and over for a list of keywords.
If you can't get PR via API, how is it done? I see a number of sites doing it, and they must be getting the Page Rank data from Google somehow, given that Google is the source of that data, right? Or no?
I can grab this data from other sites, but I'd rather get it from Google under their TOS.
Thanks for the discussion, I appreciate any suggestions.
nevetS
Jan 28th 2005, 5:11 am
You can e-mail the author of the hotscript script to find out from him. It says in their documentation that they calculate based on a checksum as well. The code is a bit of a mish mash. I changed the "eval" to an "echo" statement to get it to spit out the code, but it was pretty unreadable. They've taken pains to obfuscate it to the point where I would just send them an e-mail if I was really interested.
tomecki
Jan 29th 2005, 3:22 am
Thanks guys, I appreciate it.
Here's another site that has figured out how to get Page Rank data:
http://prsearch.net
I'm writing a keyword analyzer and want to programmatically obtain the PageRank of each of the top 10 listings for a list of keywords.
So, I need the top 10 results, and the PageRank of each listing. And I need to do this over and over for a list of keywords.
I can write this tool - it is a piece of cake. All you have to do is query google and get PR for all the websities.
deleon
Feb 15th 2005, 11:04 pm
I think what Google license does not allow use any script for extracting PR for sites and sites, using this script may be banned.
nevetS
Feb 15th 2005, 11:12 pm
I've never seen an open script that does this, so the knowledge is held pretty tight within the group of guys who know how to do it. If one of you guys can do it, the community would appreciate a posting. It would probably lead to a lot of new free tools out there.
I'm sure it's one of the reasons that places like digital point get frequented - because they provide easy access to the data.
deleon
Feb 15th 2005, 11:51 pm
I emailed to you a PHP script for extracting Google PR.
nevetS
Feb 15th 2005, 11:57 pm
yeah, unfortunately that one uses a bit of a proprietary interface so the code isn't easy to replicate. The author does state that they'll make the source available, but I haven't emailed them, and probably won't given that I use digital point to keep track of my PR rankings. I just mentioned what I did in my previous post because there are plenty of other people here who would consider the code valuable.
To pass on the info - you can e-mail technician@gmail.com for the source code for the PR script. No details on licensing of the source code in the readme.
deleon
Feb 16th 2005, 12:11 am
No details on licensing of the source code in the readme.
It's bad. I send sources to you.
nevetS
Feb 16th 2005, 12:26 am
Ha...
I'm a programmer by trade... not a php programmer, but I've done some complex stuff in my time. This seems cryptic to me.
http://www.google.com/search?client=navclient-auto&ch=6$ch&ie=UTF-8&oe=UTF-8&features=Rank&q=info%3a(insert url here)
seems to be the key, but that page shows up as forbidden when I go there directly from a browser. There is a hash returned as part of the forbidden page, so maybe that's what to look for. I really don't know.
----
Hmm... after looking at the forbidden page, it seems that the hash changes every page view. Maybe big G disabled the page because of this script... who knows. I haven't actually uploaded the script myself to test it, I just tried getting to the url from my browser.
deleon
Feb 16th 2005, 12:40 am
You can call function getPR("http://www.mysite.com") from pagerank.php module and it result will be PR for site "http://www.mysite.com".
njurkovi
Feb 19th 2005, 3:45 pm
This script always returns PR of 8, regardless of the site ??
deleon
Feb 19th 2005, 9:28 pm
This script always returns PR of 8, regardless of the site ??
No. I checked results of this script, all is OK.
xxclixxx
Mar 17th 2005, 8:26 pm
nevets.. the reason you are getting the forbidden page is because you didn't pass the url correctly .. the $ch variable is a checksum of the $url variable. Google changes the checksum periodically to prevent the automated scripts. Read more:
http://www.mobileread.com/forums/showthread.php?t=1670&page=12&pp=15
Golgotha
Mar 28th 2005, 7:19 pm
The problem with the PHP code is that it's server-side so Google would know who is hitting them - hit them enough times and they may hit back.
What you really need is client-side code (like Java) that way Google would have no idea - to them it would simply look like a toolbar was used...
gford
May 30th 2005, 3:07 pm
The problem with the PHP code is that it's server-side so Google would know who is hitting them - hit them enough times and they may hit back.
What you really need is client-side code (like Java) that way Google would have no idea - to them it would simply look like a toolbar was used...
and where does one get the client-side? any more on this?
How does DP/seochat/mcdar etc do it?
Cheater
May 30th 2005, 10:59 pm
I run prgoogle.org (Another PR search site)
Anyone want me to write a API with PR and unlimited queries? ;)
gford
May 31st 2005, 4:48 am
I run prgoogle.org (Another PR search site)
Anyone want me to write a API with PR and unlimited queries? ;)
yes -please do. :D
sponk
May 31st 2005, 12:25 pm
The problem with the PHP code is that it's server-side so Google would know who is hitting them - hit them enough times and they may hit back.
What you really need is client-side code (like Java) that way Google would have no idea - to them it would simply look like a toolbar was used...
Actually, I have to disagree.
You can just fake headers (i.e. fake the user agent by using that of the Google Toolbar) and Google Servers would not be able to tell the difference whether it is a server- or client based query.
In addition, server-side queries are much more efficient speedwise than client-side queries.
As for retrieving the PR, you can use the source at http://www.googlemania.com/foros/tema186.html#691
It basically calculates the unique checksum for a domain, generates a URL accordingly and then just retrieves the data using the php function file(). You do not really need to fear getting banned from google as anybody can access that generated URL, unless of course if you check the pagerank more than 10 times in 10 seconds (don't quote me on this ;) ).
JamieC
Aug 25th 2005, 12:16 pm
Was there ever any progress on this? There seem to be any number of web-based tools which will happily tell you the toolbar-PR of a page you enter.
The previously posted website does indeed link to PHP code, however it's commented in what looks like Spanish!
I'm planning on writing a PR utility in C#, and will gladly share with the forum - however i've just spent 2 fruitless hours searching for any conclusive information on the checksum and other information - anyone have any info that might help?
Thanks in advance,
Jamie
picobello
Aug 29th 2005, 12:51 pm
Thanks for the great link.
Willy
Aug 29th 2005, 6:35 pm
Jamie, check out this command-line PR checker written by Shoemoney:
http://forums.digitalpoint.com/showthread.php?t=24815
It includes the checksumming code, though not any information on why it works as it works. Should be straightforward to translate from Perl into another language, though, if necessary.
JamieC
Aug 31st 2005, 2:41 pm
Jamie, check out this command-line PR checker written by Shoemoney:
http://forums.digitalpoint.com/showthread.php?t=24815
Appreciated, I didn't spot that. My Perl is terrible so I'm going to have to dig out my uni notes to understand the bitshifting going on there :D
anjanesh
Sep 1st 2005, 10:03 pm
The code is a bit of a mish mash. I changed the "eval" to an "echo" statement to get it to spit out the code, but it was pretty unreadable.
1. Insert <pre> in the beginning - just before <?
2. Change eval to echo htmlentities
You got a readable source code.
Ming Han
Oct 26th 2005, 8:35 am
So what happened to prgoogle.org?
I can't seem to access it.
Tonystreet
Nov 6th 2005, 2:20 pm
i just use pagerank.net
Xmember
Nov 9th 2005, 12:08 pm
I used the PHP script from the google community where the checksum was first spotted and then used it to check the pagerank of 1000's of pages from my desktop...
The way i did is use the phptriad from sourceforge which provides a fully configured apache php and mysql... just put the php script and voila you get a client side with no restrictions... no servers to hit back.... but sometimes i see a blackout when i hit google often so i do a sleep in random ...
good luck with the project...
thinkblogger
Nov 17th 2005, 10:25 am
I have always had the belief that public data is public and as long as it is not SOLD can be used in the manner the public sees fit... I think a script for extracting PR data would be a valuable tool for research purposes...
SEOchat.com seemed to have a great tool... http://www.seochat.com/seo-tools/pagerank-search/
BrianR2
Nov 18th 2005, 11:05 am
I got the PR script from the google community as well. This is the url where you can get the script:
http://www.googlecommunity.com/scripts/pagerank-source.phps
I'm noticing a discrepancy between the results from this script and other sources on the web and the pagerank returned by the toolbar. For instance, check this site: http://www.vxbox.com/Shopping_Online_Gifts.php?p=260
The toolbars say it's PR 3 but the script and all the datacenters at http://www.linkadage.com/linkadage-info/metrics_checker.htm, say it's 0, including the toolbar result! :confused: So, why is the toolbar reporting 3 when it should be 0?
jpcesar
Nov 30th 2005, 3:57 am
Hi guys
Does a webservice that simple return an integer telling the PR on a given url is a usefull thing your anyone here?
I made one for my own use, you can get the wsdl here:
http://81.84.242.249/prutil/getpr.asmx?wsdl
Input parameter: URL ( ex: cnn.com )
Output parameter: PR ( integer ex: 9 )
Please give feedback.
JamieC
Nov 30th 2005, 4:04 am
Awesome idea, but you're gonna get hammered and Google will probably start sending nasty emails :-)
Tuning
Nov 30th 2005, 5:02 am
Wow! jpcesar,
Thanks for sharing, it is the exact thing I was looking for!
Thanks a million!
Regards,
Tuning
jpcesar
Nov 30th 2005, 6:44 am
Thanks for sharing, it is the exact thing I was looking for!
You're welcome :) Thanks for the rep.
If you are looking for more .net webservices regarding google, I have made some more to retrieve the number of google backlinks for an URL and retrieve a keyword position for a given URL too.
These ones will require you to enter your google-api key just like the DP keyword position tracker :)
Cheers
execute
Nov 30th 2005, 7:45 pm
I made a PHP tool using it, and it also checks the RK of the server (Real PageRank), im wondering whether its gonna get caught etc tho, since it is against Google ToS so im not really releasing it on my website. Someone mentioned something about headers, but what sort of headers does the toolbar send? can u give an example?
Anyway, I am still attempting to figure out if there is a way to do it with the google API instead, and I feel that would help more. However, using SOAP and XML and PHP together is pretty hard, since i dont know how to Send an XML document to a server using POST. And don't know how to receive it. I know there is tools like PEAR::SOAP but i don't like packages, as i dont learn from them, and they are impossible to install on webservers with no access to php.ini.
Hopefully someone can give me some ideas or information about how to send and receive SOAP and the headers thing.
Shoemoney
Nov 30th 2005, 7:49 pm
nice job ;)
execute
Dec 2nd 2005, 1:37 pm
i give up... Its too complicated a process probably and i dont have the time to learn it, unless there is good direction/tutorial for it. If i find out tho, ill be sure to post tutorials (http://www.designplanet.biz/index.php?q=tutorials) about it.
I still can't figure out how to transmit SOAP (with POST) and receive it. I'm guessing using headers... like header("POST: "); but i dont know the exact thing. I'll probably read the PEAR::SOAP PHP files and find exactly how they do it.
Shoemoney
Dec 2nd 2005, 1:49 pm
its projects like this i really like cause i learn the most from the fun ones ;)
dont give up so easy... take some mild sedatives and relax
i give up... Its too complicated a process probably and i dont have the time to learn it, unless there is good direction/tutorial for it. If i find out tho, ill be sure to post tutorials (http://www.designplanet.biz/index.php?q=tutorials) about it.
I still can't figure out how to transmit SOAP (with POST) and receive it. I'm guessing using headers... like header("POST: "); but i dont know the exact thing. I'll probably read the PEAR::SOAP PHP files and find exactly how they do it.
HN Will
Dec 3rd 2005, 9:38 am
DigitalPoints post at the beginning is correct. You cannot get PR from the Google API.
execute
Dec 12th 2005, 12:14 pm
I was successful in using curl and XML (http://www.designplanet.biz/index.php?q=tutorials&id=31) to send google API with my key (but it seems theres a 1000 limit per day to it, which is annoying and defeats purpose of an API >_>) but my host doesnt have curl installed >_<, so i can only use it in localhost. What i was really hoping for is extra params, like client or something (to get PR), but i couldn't figure it out.
But i guess its good for making searches...
george23
Nov 12th 2007, 4:20 pm
Hello.
I was recently looking for google pagerank api for one of my personal projects. I found this site (http://www.temesoft.com/google-pagerank-api.jsp) where they give out java api for google pagerank functionality. They also have the php version.
Thanks.
multippt
Nov 15th 2007, 6:44 am
You can get PageRank information by querying the server through a specific URL.
http://toolbarqueries.google.com/search?sourceid=navclient-ff&client=navclient-auto-ff&hl=en&ch=(CHECKSUM)&ie=UTF-8&oe=UTF-8&features=Rank&q=info:(URL)
You'll have to look for the checksum code on your own. You can request the page via fsockopen. (Before you rush to play with your new-found knowledge, I urge you to read the paragraph below.)
However, Google would block the IP address of the server, preventing the code to work (if the code is server-side). How you overcome this is up to you. ;)
The Google TOS does not permit automated retrieval of PageRank.
BrianR2
Nov 20th 2007, 2:58 pm
You'll have to look for the checksum code on your own. You can request the page via fsockopen. (Before you rush to play with your new-found knowledge, I urge you to read the paragraph below.)
However, Google would block the IP address of the server, preventing the code to work (if the code is server-side). How you overcome this is up to you. ;)
The Google TOS does not permit automated retrieval of PageRank.
Actually, Google doesn't block the retrieval of pagerank via a server-side script. I have tested a php version on different servers and I've been using one for a long time without any blocking. The only problem is that some servers don't calculate the checksum value properly which was mentioned here where I got the script http://www.googlecommunity.com/scripts/google-pagerank.php and verified by my own tests on different servers.
Bryce
Nov 21st 2007, 10:10 pm
its projects like this i really like cause i learn the most from the fun ones ;)
dont give up so easy... take some mild sedatives and relax
Jeremy, that's funny coming from you, the person who created the lamest affiliate program of 2007 "Auction-Ads" and found a chump like Patrick Gavin to take it off your hands for a nice chunk of change in your pocket.
Man, you and Dilsmack couldn't even parse eBay's RSS feed properly (and we're talking PHP, not C/C++) . Hey, Jer (Shoe) ask me sometime and I'll teach you how to parse an RSS feed properly and show you *my* eBay affiliate product that BLOWS your former project away.
anyway, not dissing you all the way Jer, you're a good guy IMHO but you got that greed syndrome coursing through your veins. I guess it comes from being a systems administrator for a corporate entity (been there, done that).
btw, what sedatives are you taking Jer? I'd bet you're on one or more of the following... Adderal, alapazolam, Diazepam... maybe Zoloft, Prozac ???
Hey, that just gave me a great idea for my next blog post after Thanksgiving. Guess what prescription medication Shoemoney, Problogger and John Chow are on...
:cool:
Peace out, and have a Happy Thanksgiving... we still love ya shoe even if you gave birth to the biggest affiliate abortion of 2007.
BrianR2
Nov 22nd 2007, 7:30 am
Jeremy, that's funny coming from you, the person who created the lamest affiliate program of 2007 "Auction-Ads" and found a chump like Patrick Gavin to take it off your hands for a nice chunk of change in your pocket.
Man, you and Dilsmack couldn't even parse eBay's RSS feed properly (and we're talking PHP, not C/C++) . Hey, Jer (Shoe) ask me sometime and I'll teach you how to parse an RSS feed properly and show you *my* eBay affiliate product that BLOWS your former project away.
anyway, not dissing you all the way Jer, you're a good guy IMHO but you got that greed syndrome coursing through your veins. I guess it comes from being a systems administrator for a corporate entity (been there, done that).
btw, what sedatives are you taking Jer? I'd bet you're on one or more of the following... Adderal, alapazolam, Diazepam... maybe Zoloft, Prozac ???
Hey, that just gave me a great idea for my next blog post after Thanksgiving. Guess what prescription medication Shoemoney, Problogger and John Chow are on...
:cool:
Peace out, and have a Happy Thanksgiving... we still love ya shoe even if you gave birth to the biggest affiliate abortion of 2007.
That was totally off-topic, obvious self-promotion and full of ad-hominem attacks not to mention insulting to the mental health community. Mods, if you see this, please delete that post and my post...thanks. (he probably won't even see this since his post is from like 2 years ago)
minstrel
Nov 22nd 2007, 8:06 am
That was totally off-topic, obvious self-promotion and full of ad-hominem attacks not to mention insulting to the mental health community. Mods, if you see this, please delete that post and my post...thanks. (he probably won't even see this since his post is from like 2 years ago)
I totally agree.
NeoAkenz
Nov 22nd 2007, 8:08 am
lol, this is a funny but interesting topic
JochenVandeVelde
Nov 25th 2007, 9:44 am
You can't retrieve PR from the API
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.