I see this question was asked few times but looks like API changed a lot and most answers seem to be out of date.
I want to use image URL to search for similar ones.
API is using my CSA where I enabled "Search by image". That kinda implies that this should work? Putting URL in search query returns results but those are based on URL wording, not content of it.
Full code in case anyone needs it.
Relevant part:
var BASE_URL = "https://www.googleapis.com/customsearch/v1?searchType=image&siteSearch=unsplash.com&siteSearchFilter=e",
query = unsplash_search.getRange("F1").getValue(),
URL = `${BASE_URL}&key=${google_key}&cx=${cseID}&q=${query}`;
query = normal URL there.
What you are trying to do is a Reverse Image Search, like you would via the UI like this:
Unfortunately, the Programmable Search Engine does not support this feature.
However, if this is important for you, you could file a Feature Request by going here: