sugiero
v2.1.0
Published
Get search suggestions based on a partial search term
Downloads
1
Readme
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
- Qwant
- Startpage
- Swisscows
- Yahoo
- YouTube
- random (chooses a random provider between those available)
Documentation
See DOCS