当我在 google.com 上进行特定于站点的搜索时:
我得到 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:
- Even if a custom search engine is configured to search the entire web, it’s designed to emphasize results from your own sites.
- Your custom search engine doesn’t include Google Web Search features such as Oneboxes, real-time results, universal search, social feaures, or personalized results.
- 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/