Skip to content

Repository files navigation

cse

Use Google custom search engine on your page.

See in the wild on the American Scenic Byways website - source.

Installation

Install with npm:

$ npm install cse

API

You need to create custom search engine and obtain search engine ID whithc looks like this: 012345678901234567890:abcdefghijk

Add #cseSearchBox or #cseSearchResults (or both) to your HTML and then initialize them with google's magic.

varcseID="012345678901234567890:abcdefghijk";require('cse')(cseID);

If neither #cseSearchBox nor #cseSearchResults are found we die silently without trying to load any scripts from google.

License

MIT

About

Google custom search engine on your page

Resources

Stars

1 star

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages