sugiero
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

sugiero

Get search suggestions from a partial search term.

Installation

Using npm:

npm i sugiero

Using yarn:

yarn add sugiero

Usage

Using CommonJS

const { getSuggestions } = require('sugiero');

Using imports

import { getSuggestions } from 'sugiero';

Then

const suggestions = await getSuggestions('hotels');

// suggestions will be an array of {term, type} objects

You can choose between multiple providers by passing their name as second argument. If none is provided, Google will be used.

const suggestions = await getSuggestions('hotels', 'Yahoo');

Available search providers are:

  • Brave
  • DuckDuckGo
  • Google
  • Qwant
  • Startpage
  • Swisscows
  • Yahoo
  • YouTube
  • random (chooses a random provider between those available)

Documentation

See DOCS

Dependencies (1)

Dev Dependencies (13)

Package Sidebar

Install

npm i sugiero

Weekly Downloads

1

Version

2.1.0

License

MIT

Unpacked Size

75.7 kB

Total Files

29

Last publish

Collaborators

  • alrico88