优化 Google 搜索引擎结果

Refine Google search engine result

我想创建一个应用程序,通过我设置的特定过滤器和限制将查询提升为 google 搜索,然后向用户显示结果(过去 x 天结果中的特定关键字) .如何才能做到这一点?

这可以通过使用 Google 站点搜索来完成 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

有没有人试过类似的东西?

是的。有限制是可能的。 您只能使用 GoogleCustomSearch(您上面的链接)

  1. [key param] 转到开发人员控制台并打开 "Custom Search API" - https://console.developers.google.com 并创建 API_KEY ("Server"类型)
  2. [cx 参数] 转到 CustomSearch 控制台 https://cse.google.com/cse 并创建自定义搜索引擎("cx" 参数)

使用 Get 模板创建请求(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