Google Results Bookmarklet

The following bookmarklet will display the google results for a term in a format that’s easier for copying.

Just drag the following link in the big green box to your bookmark bar and when you’ve completed a search in Google it will open a new window with the results listed with position, URL and anchor text (the page title normally).

Below that are two boxes so you can easily grab the URLs themselves or use the HTML to make a resources page.

This video should make its usage clear.


Simple Google Results

Here’s the code:

javascript:( function(){ str="<link href='http://www.onlinesales.co.uk/seo/bookmarklet/seo.css' rel='stylesheet' type='text/css'>\n"; anchors=document.getElementsByTagName("a"); str+="<table>"; str+="<tr><th>#</th><th>HREF</th><th>Anchor</th></tr>\n"; var k=0; var listing=""; var links=""; for(i=0;i<anchors.length;i++){ var anchorText = anchors[i].textContent; var anchorLink = anchors[i].href; if(anchorLink.match(/^((?!google|cache|youtube\.com\/results|javascript:{}|javascript:void\(0\)|api\.technorati\.com|botw\.org\/search|del\.icio\.us\/url\/check|digg\.com\/search|search\.twitter\.com\/search|search\.yahoo\.com\/search|siteanalytics\.compete\.com|tools\.seobook\.com\/general\/keyword\/suggestions|web\.archive\.org\/web\/|whois\.domaintools\.com|www\.alexa\.com\/data\/details\/main|www\.bloglines\.com\/search|www\.majesticseo\.com\/search\.php|www\.semrush\.com\/info\/|www\.semrush\.com\/search\.php|www\.stumbleupon\.com\/url|wikipedia.org\/wiki\/Special:Search).)*$/i)){ listing+=anchorLink+"\n"; links+="<a href=\""+anchorLink+"\">"+anchorText+"</a>\n"; k=k+1; if (anchorText === undefined) anchorText = anchors[i].innerText; str+="<tr>"; str+="<td>"+k+"</td>"; str+="<td><a href="+anchors[i].href+">"+anchors[i].href+"</a></td>"; str+="<td>"+anchorText+"</td>"; str+="</tr>\n"; } } str+="</table><br/> <br/><h2>Plain Listing</h2><textarea cols=80 rows=10>"; str+=listing; str+="</textarea><br/> <br/><h2>HTML Links</h2><textarea cols=80 rows=10>"; str+=links; str+="</textarea><br/> <br/><p align=center><a href='http://www.onlinesales.co.uk/'>Bookmarklet by Liam Delahunty of Online Sales</a></p>"; with(window.open()){ document.write(str); document.close(); } })()

Author: Online Sales

Owner of Mega Products Ltd. Everyday superhero web-bloke.

31 thoughts on “Google Results Bookmarklet”

  1. Hey this is a great idea – but I tend to get loads of “javascript:void(0)” in between results – about 55 results in total from 10 results! Any idea why this could be? Is it a plugin I’m using? (have tried it with greasmonkey switched off)

    Thanks!

  2. After leaving the above comment I tried it in Chrome (should have done this first – sorry) and it works like a dream. I’ve got a lot of plugins in Firefox so tried one by one and see which caused it. Turns out it was the AVG SafeSearch plugin that gets automatically installed with AVG Anti Virus – you know, that rubbish green tick thing. Have promptly disabled it and the bookmarklet works perfectly!

  3. Thanks for your comments Jaamit. I’ve now added the filter for javascript:void(0). Try the revised code and you should be able to use it and the AVG Safe Search add-on.

    Many thanks for having the patience to test that, I appreciate it.

  4. Nice tool! Great for tracking Conversations/Posts on particular keywords. We just cut and paste your results into our CMS and our users can easily scroll through the results looking for relevant topics to contribute on.

    Thanks

  5. Thanks for this tool. It makes exacting mining data from google so much easier. And in my business, I use this bookmarklet a lot. Well Done, Guys!

Comments are closed.