« Creative Commons search engine | Main | Identity Cards »

Google Suggest

Adam Stiles has been probing Google Suggest:

Google's Suggest feature is lighting up the blogosphere these days. It functions as like autocomplete for your search box, where Google attempts to determine what you are searching for and gives you suggestions. Web tinkerer that I am, I had to dig in a little and see how this works.

At its simplest, Google Suggest is javascript code that looks at what you are typing in the Google search box. When you press a key, GS phones home and passes the current contents of the search box. The server returns some suggestions are then displayed to the user. The javascript code is a little obfuscated, more to keep the size down than to obscure the contents. You can look at it here.

The script handles the onkeydown event of the search box. When that fires, it grabs the contents of the search box and sends the contents to a Google server for suggestions. …

Hacked appropriately, this could be a cool tool for generating related searches to a given keyword. Here's a quick, first attempt - I put together some sample code that grabs Google's suggestion for a given keyword (or partial). GPL'ed PHP source code is included.

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c327a53ef00d83541551369e2

Listed below are links to weblogs that reference Google Suggest:

Comments

elsewhere

Delicious Dopplr Facebook Flickr Jaiku Last.fm LinkedIn Other... Skype Twitter Upcoming YouTube


  • Preoccupations

  • ORG FTW


  • Creative Commons License
    All original material included in this weblog, its archives and any related pages is licensed under a Creative Commons License.
Blog powered by TypePad
Member since 11/2003