17

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.

4
  • Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it. Commented Oct 26, 2016 at 11:08
  • 1
    i am not asking for a recommendation or a comparison or to find the Library but means to access the API. I am not able to access this API and need help in finding documentation (if any).Fits perfectly i suppose in the stackoverflow.
    – naves
    Commented Oct 26, 2016 at 20:43
  • If that is the case then you should re-phrase your question according to the guidelines.
    – Adam
    Commented Feb 12, 2017 at 17:06
  • bizarre this was downvoted. this is just a straightforward question, with a straightforward yes/no/heres my hack solution Commented Apr 26, 2017 at 19:11

1 Answer 1

16

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?

1
  • 2
    this is a nice hack, though limited to the 100 requests per day. did you ever find a way around this without doing a direct scrape? Commented Apr 26, 2017 at 20:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.