如何搜索Web和图像来自Google自定义搜索JSON API?

发布于 2025-01-22 03:33:27 字数 744 浏览 4 评论 0原文

我正在实施 Google的自定义搜索JSON API 将在我的应用程序中搜索网络和图像。我可以独立查询网络和图像。
for网络:https://www.googleapis.com/customsearch/v1?key=jekequent {key}& start = $ {start}& cx = $ {cx}
对于图像:https://www.googleapis.com/customsearch/v1?key=jekequejuntion {key}& searchType = image& start& start = $ {start}& amp; cx = $ {cx}& q = = = = = $ {搜索Val}
这很好。但是,如您所见,我必须提出2个单独的请求,以获取网络结果和单个查询值的图像。这是一个问题,因为它为要超过。因此,我需要找到一种方法来提出一个请求,以使我返回特定搜索值的Web和图像结果。
任何帮助或建议将不胜感激。

I'm implementing Google's Custom Search JSON API into my application which shall search for both web and images. I am able to query for web and images independently.
For web: https://www.googleapis.com/customsearch/v1?key=${key}&start=${start}&cx=${cx}&q=${searchVal}
For images: https://www.googleapis.com/customsearch/v1?key=${key}&searchType=image&start=${start}&cx=${cx}&q=${searchVal}
This works perfectly. However, as you can see, I have to make 2 separate requests to get the web results and the images for a single query value. This is an issue since it makes room for Google's search query quota to be exceeded. So, I need to find a way to make a single request which returns me both the web and image results for a particular search value.
Any help or recommendation would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文