Google Blogoscoped

Monday, July 23, 2007

Google Search API Adds Image Results

Finally, you can now have image search results as part of the Google AJAX Search API. Take a look at the documentation or this page's source code to get started; to reproduce, all you need is your own API key. (Unfortunately, "setSiteRestriction" doesn't seem to work with images, so I'm adding the site operator. Another problem is that the thumbnails are downsized on the client-side, meaning that they're not only smaller than the Google Image search thumbnails, but also using potentially sub-optimal resizing; you may be able to override this with your own CSS though.)


As opposed to the now unsupported server-side search (the Google SOAP API), the client-side search relies on JavaScript and contains some accessibility issues. For instance, when you leave the page and then hit the back button, your last search query isn't visible anymore. Also, if you include this on a website which is media-independent and otherwise works fine on mobile platforms, search now become a problem for those phones not supporting JS.

If you want to provide an image search but do the coding on the server-side, you can also go for the Yahoo Image Search API (note however that Yahoo's image adult filter doesn't work well).

[Via the official Google AJAX Search API blog.]


Blog  |  Forum     more >> Archive | Feed | Google's blogs | About


This site unofficially covers Google™ and more with some rights reserved. Join our forum!