google-autosuggest

You know how when you start typing on Google that autocomplete dropdown appears with common/relevant searches?


License
ISC
Install
npm install google-autosuggest@0.0.13

Documentation

Google Autosuggest

You know how when you start typing on Google that autocomplete dropdown appears with common/relevant searches?

Given a search term, this package fetches those suggested searches from Google.

Example

require('google-autosuggest')('javascript').then(resp => {
  console.log(resp)
  /*
    {
      "value": "javascript",
      "relevance": 1300,
      "set": [
        { "value": "javascript snake", "relevance": 601, "type": "QUERY" },
        { "value": "javascript array", "relevance": 600, "type": "QUERY" },
        ...
      ]
    }
  */
})