Does google allow businesses to use “Did you Mean” feature as an api?? I would like to use it but I am not getting anything

一个人想着一个人 提交于 2019-12-08 16:27:39

问题


I want to use Google API for Did you mean feature. So basically I want to write a piece of code, which sends a word to Google search and either Google finds the exact hits or gives a "DID YOU MEAN" reply which i would use.

Is it made available? Tried finding it but couldn't find.


回答1:


So I invested some time and this what I've found

1/ You should have your custom search engine

https://cse.google.com

2/ Configure it to search all webs

https://support.google.com/customsearch/answer/2631040?hl=en

3/ Make query to that engine following the document

https://developers.google.com/custom-search/json-api/v1/using_rest

Spelling / Did you mean repairs if possible can be found in "spelling" section. (Irrelevant sections removed) . Fox ex: I searched for "devart" here

{
  "kind": "customsearch#search",
  "url": {
    },
  "queries": {
    "request": [
      
    ]
  },
  "context": {
    
  },
  "searchInformation": {
    
  },
  "spelling": {
    "correctedQuery": "deviantart",
    "htmlCorrectedQuery": "<b><i>deviantart</i></b>"
  },
  "items": [
    
  ]
}

I had the same question and its downvoted also while they are allowing these questions on the site. You may want to read about the auto-complete apis here

https://stackoverflow.com/questions/40061449/google-auto-correct-api

Google Search autocomplete API?



来源:https://stackoverflow.com/questions/40260655/does-google-allow-businesses-to-use-did-you-mean-feature-as-an-api-i-would-l

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!