How to get Google image search result in JSON?

I would like to get the JSON of Google search images. I am using jQuery. https://developers.google.com/image-search/v1/jsondevguide I am trying with this guide. This is what I have done so far.

$.getJSON("https://ajax.googleapis.com/ajax/services/search/images?callback=?",{q:input,v:'1.0'},function(data){
  $("#r").html("Picture: ");
 $("#r").append('<img src="'+data.responseData.results[0].url+'">');

 })

But it does not function as a callback. What should I do? What are the required options?

+3
source share

All Articles