Endless Google Search
I felt like coding today, so I put together a little hack from an idea I have had for a while. What I came up with is a web search (powered by Google), that loads new search results as you scroll the page down. Try it, it’s actually pretty cool.
Here is how it works: there is a large div element at the bottom of the page just to take up space. When it comes onto the screen, an ajax request is made to the server to get the next 10 results from Google. The requests are made through Google’s SOAP api, which is no longer available, but I had an old API key so I was able to get it to work. I had all the client stuff working within an hour, but Google’s API took a while to figure out. Google uses SOAP, which is powerful but hard to code for compared to a simple GET API. It took me a couple of hours to get the server-side stuff working but it is still a hack, so don’t be surprised if you get an error or some unexpected behaviour.
It was designed for FireFox/Mozilla browsers. The only other browser I have tried it with is IE, which it does not work with. So if you are using Internet Explorer, you won’t see anything interesting.
Well done man. That’s pretty neat… although the results would get a little unruly after awhile. Perhaps there’s a way to cut off the top-most 20 results once they’ve been scrolled past?
Comment by Elias Puurunen — June 17, 2007 @ 2:42 pm
Pretty cool.Works on my Safari/Mac.There is a pear package available to make req to Google’s SOAP API here: http://pear.php.net/package/Services_Google , works 90% of the time.
Comment by trk7 — June 17, 2007 @ 7:22 pm
Thanks Elias and trk7.
Cutting off the results after a while is a good idea, it wouldn’t be too hard to change and it would make it harder for me to go over my daily API request limit. But then I couldn’t call it endless Google :).
I wish I knew about the PHP api before hand, but at least I got immersed in SOAP this way (no pun intended :D). The SOAP code I used is a huge hack that would never work in a real project.
Comment by Paul Butler — June 18, 2007 @ 7:11 am
dear paul
good work but i see it have a simple bug that in small results the script repeat the google result and user cant understand that it get finished!!
Comment by tayyeb — June 25, 2007 @ 10:11 am
Very nice little application you’ve created here. The question is whether visually it won’t bug people that they’ve got an endless page… like as a psychological thing. Also makes the value of seo look questionable to a certain extent, since there’s no effort involved going to “page 2″ or “3″…
keep up the good stuff!
Comment by Google critic — July 15, 2007 @ 8:51 pm
Google critic, I know what you mean, it does feel a bit uncomfortable to have no end. It is convenient though.
I think that even if Google or another search engine were to do this, they would still find that the majority of clicks come from the first page. But I think you are right, it would change the dynamics of SEO a bit.
Comment by Paul Butler — July 30, 2007 @ 7:51 am
Cool, Microsoft added this feature to their newly improved Live Image Search.
I’m sure they came up with it independently of me though. I just hope they don’t try to patent it :).
Comment by Paul Butler — August 2, 2007 @ 9:09 am
Wow, this is a really creative idea!
I like it a lot, enough to use it when I’m doing research! **Bookmarked**
Peter Kao
http://peterkao.com
Comment by Peter Kao — February 7, 2008 @ 8:09 pm
[…] I was browsing through a fellow UW undergrad’s blog when I stumbled upon his “Endless Google Search”. […]
Pingback by Endless Google Search Results | Mind of a Young Undergrad Entrepreneur — February 7, 2008 @ 8:24 pm
Interestingly, Terrill has had this feature on his own blog for quite some time now: http://www.terrill.ca/
Comment by Rajesh Kumar — February 13, 2008 @ 8:47 am
Yeah, I’ve noticed that on Terrill’s site. I spent the better part of an afternoon trying to read until the bottom of his main page, before I clued in :).
Comment by Paul Butler — February 13, 2008 @ 1:42 pm
I use a slightly different approach on my site. Instead of adding blank space at the bottom of the page I initiate requests based on the height and position of the scrollbar so that they appear more transparently.
R.I.P. “Next page” buttons
Comment by Terrill — February 26, 2008 @ 9:09 am
If you try hard it can work in IE also.
Comment by Terrill — February 26, 2008 @ 9:11 am
FYI, I implemented a Google mod (using Greasemonkey) to have endless scrolling on the results page.
http://blog.monstuff.com/archives/000337.html
Comment by Julien Couvreur — April 17, 2008 @ 5:13 pm