Google搜索API。过滤许可

时间:2015-12-03 18:01:58

标签: google-search-api

我想在特定许可下使用Google API搜索图片。但是看看API文档,我无法理解如何正确使用它。 我想搜索:

  • 免费使用或分享,甚至商业
  • 免费使用,分享或修改,甚至商业

在我看到的文档中

  • cc_publicdomain
  • cc_attribute
  • cc_sharealike
  • cc_noncommercial
  • cc_nonderived

https://developers.google.com/custom-search/json-api/v1/reference/cse/list

有人可以告诉我我的要求应该是什么样的吗?

1 个答案:

答案 0 :(得分:6)

Official site of creative commons包含每种CC许可证类型的说明。
您可以使用“cc_publicdomain”,“cc_attribute”和“cc_sharealike”,例如“免费使用,共享或修改,甚至商业
和”cc_nonderived“喜欢”免费使用或分享,甚至商业“。
要在请求中设置许可证,您可以使用“rights”参数并通过url编码的逗号传递目标许可证类型 就像在这个请求中一样:


    GET https://www.googleapis.com/customsearch/v1?q=swollen+members+night+vision&cx=004646395488064118990%3Aachgbwsn6na&rights=cc_publicdomain%2Ccc_attribute&searchType=image&fields=items&key={YOUR_API_KEY}

您也可以在线试用“任意”Google服务here,并根据您的请求here创建

相关问题