Skip to content

Wrapper for suggestqueries.google.com queries. Gets the autocomplete suggestions that the Google search bar would give you if you were typing in it.

Notifications You must be signed in to change notification settings

jimkang/autocompl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

autocompl

This module gets you Google Search autocomplete suggestions for given strings. It's a wrapper around calls to suggestqueries.google.com as documented in Sheryas Chand's blog post.

(The joke in the module name is derived from incompl's username.)

Installation

npm install autocompl

Usage

var autocompl = require('../autocompl');
autocompl('Batman and', function done(error, suggestions) {
  console.log(suggestions);
});

Output:

[ 
  'batman and robin',
  'batman and robin costumes',
  'batman and catwoman',
  'batman and superman',
  'batman and wonder woman',
  'batman and robin quotes',
  'batman and son',
  'batman and robin 35',
  'batman and robin poison ivy',
  'batman and superman team up'
]

It will also take a opts object as the first paramter that lets you specify:

  • partialSearchTerm: The search string you want autocompleted.
  • request: A function that has the same signature as request, in case you want to have another module handle http.

Tests

Run tests with make test.

License

MIT.

About

Wrapper for suggestqueries.google.com queries. Gets the autocomplete suggestions that the Google search bar would give you if you were typing in it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published