Saturday
Dec192009
Search the Live Web with Two Simple Bookmarklets

I have become addicted to Google's new real-time search feature. It's an incredible window onto the world's psyche. However, it's somewhat lacking in one small way.
By default, Google doesn't serve up real-time results for most searches. It only does so for topics that are in the news or the conversation zeitgeist. For example, as of this writing, a search for the phrase "Google" doesn't turn up any real-time results. Compare this with any of the terms listed on Google Trends, all of which will automatically feature real-time results.
If you want to easily access Google real-time results for any query, all you need is two simple bookmarklets.
The first bookmarklet once triggered will reveal the latest status updates from Twitter, Jaiku, Facebook and others. If you select text on a page it will automatically pull it into a query. If you don't select any text, the bookmarklet will pop up a box for you to enter a query.
javascript:x=escape(getSelection());if(!x)%7Bvoid(x=prompt('%20-%20Google%20Real-time%20Updates:',''))%7D;window.location='http://www.google.com/search?hl=en&rls=en&tbo=1&output=search&tbs=mbl:1&q='+x
The second bookmarklet is broader - it pulls in all real-time results from blogs, news sources and Twitter and like the one above will work on pre-selected text or a new query.
javascript:x=escape(getSelection());if(!x)%7Bvoid(x=prompt('%20-%20Google%20Real-time%20Search:',''))%7D;window.location='http://www.google.com/search?hl=en&rls=en&tbo=1&tbs=rltm:1&q='+x
Both bookmarklets should work in various browsers. I tested them in Safari and Firefox. All you need to do is create a bookmark with the precise URL listed above. (For some reason I can't get javascript code to link properly on Posterous, otherwise I wold have done so.)
Reader Comments (17)
Is it possible to tweak the first javascript to show the query results in a new tab or window?
Not sure. I bet someone can.
I seconded that, new tab would be awesome.
This works for the first bookmarklet. (open in a new tab)javascript:x=escape(getSelection());if(!x)%7Bvoid(x=prompt('%20-%20Google%20Real-time%20Updates:',''))%7D;u='http://www.google.com/search?hl=en&rls=en&tbo=1&output=search&tbs=mbl:1&q='+x;{a%20=function(){if(!w.open(u))l.href=u;};if(/Firefox/.test(navigator.userAgent))setTimeout(a,0);else%20a();}void(0)
Yay, just learned something new! The workaround to the second bookmarklet:javascript:x=escape(getSelection());if(!x)%7Bvoid(x=prompt('%20-%20Google%20Real-time%20Search:',''))%7D;window.open('http://www.google.com/search?hl=en&rls=en&tbo=1&tbs=rltm:1&q='+x)
Dear Steve Rubel ,I have used the ''Google Real-Time Search'' at some cities in Turkey, as :Twitter Or Facebook ,and posted at http://hopladedegi.wordpress.com/2009/12/19/twitter-or-facebook-some-cities-in-turkey/Thank You,and Best Wishes...
Awesome bookmarklet once again, Steve! Silly little thing but Chrome users can't just grab the code like you've got it, so if there's anyone here who wants a quick draggable link I've posted on here. http://marshallk.com/how-to-add-google-real-time-search-to-your-bookmarks
Awesome stuff, Steve. Thanks for sharing!
Checkout these guys they are still in stealth http://www.webguild.org/services/web_details.php?company=michael%20jackson
Hi Steve, the pre-selected feature is not workable for Chinese, is there any way to fix it? since I sometimes search Chinese information.
I love this, thanks for the write up! And multi-language preselect would be great if doable!@Marshal K.: I'm using chrome and I could grab the code off this page into my bookmarks bar just fine? Maybe we're using different versions?
Real time search on Google has been a big disappointment for me so far because it doesn't produce anything for virtually all the searches I'm interested in relating to my work, even about financial issues in the news.However, I've been using the bookmarklets you posted before (with tweaks) for a while with great success on Firefox, loving Marshall K's Chrome one now too.
I took this idea, and created a search plugin for Firefox. My blog post can be found here: http://bundyxc.com/?p=235You'll find a link to your blog in my post. Props on the bookmarklet.
Very cool, thanks for sharing.
yes i think its great tool.
hmm i liked the plugin thanks a lots for providing the information in you great post "bundyxc"
heh, nice plug, thx for share bro!keep good work