youtube-autocomplete
Get autocomplete search queries for YouTube without API keys!
Usage
-
Install module using npm i youtube-autocomplete
-
Require the module
const AutoComplete = require('youtube-autocomplete');
-
AutoComplete(query, callback)
- function
-
query
- String : Search query for which you want suggestions
-
callback(err, queries)
- function : Callback function
err
- Error : Error message if an error occurs, null
if successfulqueries
- Object : Suggestion queries in JSON format
-
Example code:
const AutoComplete = require('youtube-autocomplete');
AutoComplete('quer', (err, queries) => {
if (err) throw err;
console.log(queries);
});
License
MIT Copyright © 2018 Akash Rajendra