简体   繁体   English

优化Google搜索引擎结果

[英]Refine Google search engine result

I want to create an app that promotes a query to google search by specific filters and restrictions i put in place and then show the results to the user (specific keywords in results for the past x days). 我想创建一个应用程序,通过我设置的特定过滤器和限制将查询提升为Google搜索,然后将结果显示给用户(过去x天中结果中的特定关键字)。 How can this be done? 如何才能做到这一点?

Can this be accomplished by using the Google site search https://www.google.com/work/search/products/gss.html together with this API: https://developers.google.com/custom-search/json-api/v1/introduction#background-data-model 可以通过使用Google网站搜索https://www.google.com/work/search/products/gss.html和以下API来完成此操作: https : //developers.google.com/custom-search/json- API / V1 /引入#背景数据模型

Has anyone tried something similar? 有没有人尝试过类似的东西?

Yes. 是。 it's possible with restrictions. 有可能受到限制。 You can use only GoogleCustomSearch (your links above) 您只能使用GoogleCustomSearch(上面的链接)

  1. [ key param] go to Developer console and turn on "Custom Search API" - https://console.developers.google.com and create API_KEY ("Server" type) [ 关键 PARAM]去开发者控制台,打开“自定义搜索API” - https://console.developers.google.com创造API_KEY(“服务器”型)
  2. [ cx param] go to CustomSearch console https://cse.google.com/cse and create Custom search engine ("cx" param) [ cx参数]转到CustomSearch控制台https://cse.google.com/cse并创建自定义搜索引擎(“ cx”参数)

Using Get template create an request ( https://developers.google.com/custom-search/json-api/v1/using_rest ) 使用获取模板创建请求( https://developers.google.com/custom-search/json-api/v1/using_rest

GET https://www.googleapis.com/customsearch/v1?key= YOUR_KEY&cx=YOUR_CX&q=site:lenta.ru&siteSearch=lenta.ru GET https://www.googleapis.com/customsearch/v1?key= YOUR_KEY&cx = YOUR_CX&q = site:lenta.ru&siteSearch = lenta.ru

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM