gpt4 book ai didi

rest - Google Search API - 获得 "regular"Google 结果

转载 作者:行者123 更新时间:2023-12-03 16:45:19 24 4
gpt4 key购买 nike

我想做一些 Google 搜索并获得与在 www.google.se 上搜索相同的结果(我在瑞典)。我在此处创建了一个 Google API 帐户以获取 API key ,https://code.google.com/apis/console/b/0/ .

我这样调用 API:

https://www.googleapis.com/customsearch/v1?key=KEY&cx=013036536707430787589:_pqjad5hr1a&gl=se&cr=se&googlehost=google.se&q=bästa espressomaskin&alt=json

然而,这与我通常会搜索“bästa espressomaskin”的结果不同,我不知道为什么。

我的第二个问题是关于参数“cx”。它实际上是什么,它有什么作用?我只是使用了 Google API 介绍站点上提供的那个。

我还想要 10 个以上的结果,我的 API 控制台帐户上有一些美元,但是如何才能将“num”参数设置为 10 以上?

谢谢

最佳答案

cx 是您注册其自定义搜索服务时获得的 Google key 。它允许您自定义搜索。请参阅此处了解更多信息:https://developers.google.com/custom-search/v1/getting_started

至于结果,谷歌在他们的文档中说你的结果可能会有所不同。请参阅此处了解更多信息:http://support.google.com/customsearch/bin/answer.py?hl=en&answer=2633385

关于rest - Google Search API - 获得 "regular"Google 结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16405810/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com