tags:

views:

180

answers:

1

Is there a Google Image Search API that will return data in XML format?

I know about the AJAX API:

http://code.google.com/apis/ajaxsearch/documentation/

What I am looking for is a way to parse and display images from a Google Image Search query in my own UI.

I could try to parse the HTML results from a search like:

http://images.google.com/images?q=apple

But there is no guarantee that the HTML formatting will not change.

Is there an official non AJAX API for the same (like the book search API)?

Thanks.

+2  A: 

You can indeed get results in JSON format, according to Google's AJAX Search API docs1.

For example, enter this URL in your browser to see JSON results for an image search for the query "water" on water.com:

http://ajax.googleapis.com/ajax/services/search/images?v=1.0&q=site:water.com+water

Note: you are limited to eight results at a time with this method. A list of optional query params is in the docs page I linked to.

Nevin