Picture this: Image Search for the AJAX Search API

July 22, 2007



Since its release last year, the Google AJAX Search API has given developers a simple way to add Google Web, Local, Video, Blog, and News search to their websites and web applications. In February 2007, we extended the system to include Book Search.

After a few months of focusing on the AJAX Feed API, as well as enhancing our suite of very powerful and popular controls (Video Bar; News Bar; Slide Show; Local Search Control for Google Maps; Search Box box page element for Blogger, which includes support for Linked Custom Search Engines; AJAX Search on the iPhone), it's back to basics for us.

This morning, we are announcing Image Search in the API. Image Search is just as easy to use as all of our other searchers. For those of you using our basic search control, it's as simple as this:


var searchControl = new GSearchControl();
searchControl.addSearcher(new GimageSearch());

Image Search provides you with everything you have grown to expect from our APIs, including:

  • High-performance access to image search results
  • Easy integration with our base search control
  • Ability to use raw search results in your mashups
  • Full suite of raw, JavaScript-accessible properties (URL, size, thumbnail URL, snippets, original-context URL, etc.)
  • Pre-Constructed HTML node in case you want us to do the heavy lifting
  • Full customization of our result HTML via CSS


The sample below is just a few lines of code. Play around with it a little and then think about where something like this might fit into your site. If you are an iPhone user, you can see Image Search in action in our recently updated iPhone sample.





For more information on Image Search, refer to the documentation. As always, let us know what you think in the developer forum.