Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google apps script 自定义搜索API-使用图像进行搜索_Google Apps Script_Google Custom Search - Fatal编程技术网

Google apps script 自定义搜索API-使用图像进行搜索

Google apps script 自定义搜索API-使用图像进行搜索,google-apps-script,google-custom-search,Google Apps Script,Google Custom Search,我看到这个问题被问了几次,但看起来API改变了很多,大多数答案似乎都过时了 我想用图片URL来搜索类似的图片 API正在使用我的 在这里,我启用了“按图像搜索”。这意味着这应该行得通? 将URL放入搜索查询将返回结果,但这些结果是基于URL措辞,而不是内容 以防有人需要 相关部分: var BASE_URL = "https://www.googleapis.com/customsearch/v1?searchType=image&siteSearch=unsplash.com&am

我看到这个问题被问了几次,但看起来API改变了很多,大多数答案似乎都过时了

我想用图片URL来搜索类似的图片

API正在使用我的 在这里,我启用了“按图像搜索”。这意味着这应该行得通? 将URL放入搜索查询将返回结果,但这些结果是基于URL措辞,而不是内容

以防有人需要

相关部分:

  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=那里的普通URL。

您试图做的是反向图像搜索,就像您通过UI所做的那样:

不幸的是,这是一个错误

但是,如果这对您很重要,您可以通过以下方式提交功能请求:


您要做的是反向图像搜索,就像您通过UI所做的那样:

不幸的是,这是一个错误

但是,如果这对您很重要,您可以通过以下方式提交功能请求:


您可能可以使用Cloud Vision API实现此目的:

您可能可以使用Cloud Vision API实现此目的:

请发布代码的相关部分,并说明我使用的请求URL已检索的内容,请发布代码的相关部分,并说明我使用的请求URL已检索的内容,看起来我错过了“启用图像搜索”的手册它只是搜索图像:呜呜:看起来我错过了“启用图像搜索”的手册它只是搜索图像:呜呜:是的,我担心我必须。是的,我担心我必须这样做。