1.0.9 • Published 6 years ago
google-search-autocomplete v1.0.9
Autocomplete
How to install
npm i autocomplete
What's this?
This is an NPM module which takes a google query and returns the autocompleted suggestions.
Example
const autocomplete = require('autocomplete');
autocomplete('How are you', 'chrome').then(response => {
console.log(response);
});
/**
* { query: 'How are you doing',
resultArray:
[ 'how are you doing answer',
'how are you doing превод',
'how are you doing today',
'how are you doing ne demek',
'how are you doing in korean',
'how are you doing gif',
'how are you doing nice meeting you',
'how are you doing in hungarian',
'how are you doing in arabic',
'how are you doing in greek',
'how are you doing over there meaning',
'how are you doing im doing just fine i lied i\'m dying inside',
'how are you doing german',
'how are you doing today siri',
'how are you doing or how is it going',
'how are you doing formal letter',
'how are you doing or how you doing',
'how are you doing meme',
'how are you doing in french',
'how are you doing in email' ],
first: 'answer',
second: 'превод',
third: 'today',
forth: 'ne demek',
fifth: 'in korean' }
*/
Docs
autocomplete(query, client)
query
is the thing to search, while client can be chrome
, firefox
, opera
and other browsers.