Getting urls of images in Google Maps using Google Custom Search API?

I am trying to use the Google Custom Search API to get the url of images in Google Images. How do I customize my search site to use images.google.com as my search site? I was just trying to use the Google Images url (images.google.com) when I loaded my custom search, but that doesn't seem to work.

When I try to make a REST call, this is what I get:

{
"title": "Google Custom Search - tomat",
"totalResults": "0",
"searchTerms": "tomat",
"count": 10,
"inputEncoding": "utf8",
"outputEncoding": "utf8",
"safe": "off",
"cx": "THIS IS WHERE THE CX NUMBER IS"
}

      

I am trying to get the image url of the first three hits for a search term. Any ideas?

+3


source to share


1 answer


I understood that. You must have image search enabled in your dashboard and have searchType = image in your request, but I had to add * .google.com to sites to search for. When I used the template on google.com it worked. :)



+1


source







All Articles