Google Custom Search Engine - search by image

2020-07-24 06:18发布

问题:

Right now I'm using Custom Search Engine (CSE) to search through entire web by search term. The request looks like:

GET "https:/www.googleapis.com/customsearch/v1?key=API_KEY&cx=SEARCH_ENGINE_ID&q=SEARCH_TERM"

And this request returns me list of search results.

But, I need to implement search by image or image url. Do Google API provide such a url param? Maybe something like "image_url"? So, the request can look the following:

https://www.googleapis.com/customsearch/v1?key=API_KEY&cx=SEARCH_ENGINE_ID&image_url=http://www.example.com/image.png

Basically, I need to implement the same functionality as images.google.com/ but using my Custom Search Engine. Thanks.

Example of what I need to implement:

回答1:

As far as I know, what you're looking for is only supported by Vision AI service (partially at least, never used it before). Google CSE API only allows you to search images and not by images as you may noticed.