The Real Live Search – Bing API experiment


Wouldn’t it be cool if search engines were as fast as you could type and actually showed you results as-you-type? As I found out this evening with jQuery in one hand and JSON in another, not only is it possible but turns out to be just as cool as I imagined.

Inspired by the realtime-ness of Google Wave, I wanted to build a prototype search engine that did away with a search button and page loads. Instead, search queries are sent character-by-character to the lightning fast Bing AJAX APIs which returned JSON results easily processed and formatted by Javascript on the page. The UI experience is driven solely by the browser.

The result is a truly “live” search experience which I’ve cunningly dubbed “The Real Live Search” as tribute to the former Microsoft search engine. I invite everyone to give it a quick whirl, but please bear in mind it’s only a couple hour’s work and may bite if prodded the wrong way.

73 insightful thoughts

  1. Very nice! Not really sure what use this is in its current form bout could make a good desktop gadget.
    Search box seems to collapse after the first search for me. Just becomes a small box with the “working” wheel.

  2. I agree that it’s pretty cool. Only I would suggest that the query submits only when there is a little pause in writing. Btw. I think that is MS used this strategy on their Bing site, there would be sure no. 1 in number of queries submitted 😀

  3. Chevere programa, me gusta como muestra el listado de paginas y a la ves las imagenes, la velocidad de respuesta me parece aceptable teniendo en cuenta que te ahorras el clic del boton.

    Solo encontre un error a veces aparece el mensaje “y3nh4ck3r was here!”

  4. Very cool! The one thing I did notice though was that if you type fast you can get ahead of the search engine and then it keeps scrolling through all of the things that it found. If this were to be put into use it would still need an Enter button to just call it good and display the search results.

  5. Wow seriously, this is the coolest thing ever!
    Wish bing worked like this and I think MANY more people would have used it.
    I mean, its as awesum as sex… well…. almost…. not…. but you get the point 😉

  6. Amazing. Very cool! I like better how it works with images, because they are easier to filter as you search. Nice work! 😉

    @Dorian: I think it depends on your connection, I’m getting results pretty fast here.

  7. Right now the guys at their Network Operations Center are wondering why the hell their bandwidth needs just increased 5000% “WTF? Damn it’s that Long Zheng guy again!!”

    Seriously though, if you use a timout and only send the request every half second after the last keystroke typed it would conserve the bandwidth needs for fast typers and eliminate the “catch-up” effect at the end.

    I wrote code like this once for real-time search, looks something like this:
    function doSearch(e)
    if (getSearchString().length > 1 ) {
    clearTimeout( lasttimeoutid );
    lasttimeoutid=setTimeout( ‘DoTimerSearch()’, 500)

  8. A suggestion for you:
    Grab the top “suggestion” (i.e. what’s shown in the query box dropdown) and issue a simultaneous search for that. Figure out a way to display those search results mixed or side-by-side with the results for the exact string.

    Ideally, I should be able to do something like type “windows 7 d”, and have the results for “windows 7 downloads” shown (because that’s the top suggestion).

    Otherwise, it’s cool looking, but doesn’t really help me get to my results faster.

  9. Wow, that’s awesome! I can just imagine if you got it going on a datacenter environment the size of Microsoft or Google’s and tuned it a bit.

    Long, you rock!

  10. Cool. I have to say, I am impressed. It’s still not that fast – but maybe it is just us geeks typing so fast.

    Good job, definitely. Spread the word, everyone.

  11. Well, it searches every time I type a letter, so maybe you might want to add a pause before it starts searching (your current one will hammer AJAX). Other than that, that was lightning fast!

  12. Doesn’t work on dialup(duh, self-apparent, but that’s all I have access to in my third-world state of Indiana). Looks like a good idea though.

    Interestingly, I typed in ‘iphone’ and I got a bunch of picture results of washing machines. Thought that was funny.

  13. nice job !
    you site could perhaps gracefully end with a message to user when he/she searches for gibberish words like “;”

  14. @istartedsomething : Dustin is right about this. Please don’t clutter the worldwide bandwidth. I just tried that thing for a name and it sent about 20 request. This way BING will easily dominate the charts, when they present how many requests they have been processing, BUT that won’t help the world. If one request was done when I typed the first word, it would have been enough. Perhaps you should check wheter a space-key was typed and then send a request AND check for time since last typed key as Dustin proposed earlier. This would give again a nice experience but won’t jam the data highway.

  15. Very cool but imagine like 1000000 search requests per second if google or anything would really use this mechanism…

    oh well they do have enough power to query those searches i guess 🙂

  16. Congrats!!!!

    I don’t impress easily but this is sure a big WOW!

    Sure hope you have/will copyright the concept… could make you very rich!


  17. Hey Long Zheng, have you visited, which was made by Julius Eckert? This is similar, but I like the loading throbber gif, because it isn’t too distracting and it shows that the api is working. I also like the option to hover over the results and have them instantly appear on the right side, as well as the bottom of the page. Keep up the amazing work.

  18. Cool but I feel concerned because some days back I read how much processing power a single Google query takes. Is this really needed? The keywords don’t change THAT much while searching do they?

  19. You sir, are a god among men. This reminds me of keyboardr in a way

    I think it would be cool if you could pull in some of Bing’s News results

  20. Nice. I have been building a website for my business startup that sues similar technology to filter results while you type.
    It’s pretty fast. I use MS SQL database, ASP.NET MVC and JQuery/JSON to get the results.
    I did a blog post tutorial a few months ago also.
    I’m sure I can still get it faster.

  21. So let me get this straight – you made this a year ago, Google just released it for their search engine and Microsoft never approached you within the last year to try and incorporate this into Bing? (or whatever they are calling their search engine now – it’s been revampbed and relaunched too many times)

    Kudos to you for being ahead of the curve – who knows, you might be contacted by Microsoft now that Google is doing this becuase MS does REACT a lot this days. Shame on Microsoft for not noticing this earlier – how many people are alseep at the wheel at that company????

  22. This is cool really. Bing is really evolving and i hope in future it can be better than google write now it is a very distant posibility. 500 emails, web storage, quality search. They have to beat all that. Right now it seems that google is dominating over other search engines.

  23. Very cool, I like it.(and I will use it)

    The drop down suggest list however doesn’t always respond. Especially if one moves/clicks ”to fast”.
    I was wondering if this is a built in event, a sort of a ”delay” for whatever reason and if so how to remove it.

  24. Never mind. I figured it out. It’s the css. I took away the css and it displayed default links. These are good and fast clickable.

  25. Google just released it for their search engine and Microsoft never approached you within the last year to try and incorporate this into Bing? (or whatever they are calling their search engine now – it’s been revampbed and relaunched too many times)

  26. Can I simply say what a reduction to find somebody who actually knows what theyre talking about on the internet. You positively know how you can bring a difficulty to light and make it important. Extra individuals need to read this and perceive this facet of the story. I cant believe youre no more well-liked because you definitely have the gift.

Comments are closed.