Google API返回的结果不是网站 [英] Google API returning different results than website

查看:127
本文介绍了Google API返回的结果不是网站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

When I do a site-specific search on google.com:


site:http:// one-month-of-chat- logs.github.io安全性

我得到12个结果。我注册了一个自定义搜索引擎( cx:015271449006306103053:mz6wkimeenc )和API密钥,当我运行相同的搜索时,我只得到3个结果:

I get 12 results. I signed up for a custom search engine (cx: 015271449006306103053:mz6wkimeenc) and API key, and I get only 3 results when I run the same search:

$ curl 'https://www.googleapis.com/customsearch/v1?key=$MY_API_KEY&cx=015271449006306103053%3Amz6wkimeenc&q=security'

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

Why do the results differ? Is my API request actually querying something different than the search I performed on google.com?

推荐答案

寻找 https://support.google.com/customsearch/answer/70392?hl=zh_CN = b

This google page has what you are looking for https://support.google.com/customsearch/answer/70392?hl=en


您的结果不太可能与Google网页搜索返回的结果相匹配,原因如下:

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


  1. 即使将自定义搜索引擎配置为搜索整个网络,也可以使用
    来强调自己网站的搜索结果。
  2. b $ b
  3. 您的自定义搜索引擎不包含Google网页搜索功能,例如
    Oneboxes,实时结果,通用搜索,社交功能或
    个性化结果。

  4. 如果您的自定义搜索引擎包含超过
    的10个网站,结果可能来自我们索引的子集,可能
    与网站的结果不同:'在Google.com上搜索。

  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返回的结果不是网站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆