google-api - Google API 返回的结果与网站不同

标签 google-api

当我在 google.com 上进行特定于站点的搜索时:

site:http://one-month-of-chat-logs.github.io security



我得到 12 个结果。我注册了一个自定义搜索引擎 ( cx: 015271449006306103053:mz6wkimeenc ) 和 API key ,当我运行相同的搜索时,我只得到 3 个结果:
$ curl 'https://www.googleapis.com/customsearch/v1?key=$MY_API_KEY&cx=015271449006306103053%3Amz6wkimeenc&q=security'

为什么结果不同?我的 API 请求实际上查询的内容与我在 google.com 上执行的搜索不同吗?

最佳答案

这个谷歌页面有你要找的东西https://support.google.com/customsearch/answer/70392?hl=en

your results are unlikely to match those returned by Google Web Search, for several reasons:

  1. Even if a custom search engine is configured to search the entire web, it’s designed to emphasize results from your own sites.
  2. Your custom search engine doesn’t include Google Web Search features such as Oneboxes, real-time results, universal search, social feaures, or personalized results.
  3. If your custom search engine includes more than ten sites, the results may be from a subset of our index and may differ from the results of a 'site:' search on Google.com.

关于google-api - Google API 返回的结果与网站不同,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20182667/

相关文章:

c# - 如何使用 ASP.Net Core Identity 从登录用户检索 Google 个人资料图片?

node.js - NodeJS,如何使用 google api 使用刷新 token 获取新 token ?

node.js - 如何删除 "google sign in account"以用于开发目的 - Google 上的操作

javascript - javascript 中的 Google Calendar API 时区覆盖

node.js - 我如何通过 NodeJs 在谷歌云中设置数据存储索引配置?

node.js - Google 身份验证挂起等待响应

php - Google Analytics API 401 无效凭据

google-analytics - Google Analytics API - 如何计算平均页面深度

unit-testing - 如何对 Google API 的调用进行单元测试

javascript - 为什么适用于 PHP 的 Google API 需要客户端 key ,而适用于 Javascript 的 Google API 则不需要?