Search videos on youtube without API key. This is an updated fork from appit-online version
Table of contents:
npm install youtube-search-scrapper --save
import * as yt from 'youtube-search-scrapper';
/**
* Given a search query, searching on youtube
* @param {string} search value (string or videoId).
*/
const videos = await yt.search('Hallo Welt');
const videos = await yt.search('y5kIrbG2gRc');
console.log('Videos:');
console.log(videos);
[{ kind: 'youtube#searchResult',
channel:
{ id: 'UCFzpTuxdolZ_EaZr-emNgbg',
name: 'David Koller',
url: 'https://www.youtube.com/channel/UCFzpTuxdolZ_EaZr-emNgbg' },
id:
{ videoId: 'y5kIrbG2gRc',
channelId: 'UCFzpTuxdolZ_EaZr-emNgbg' },
snippet:
{ url: 'https://www.youtube.com/watch?v=y5kIrbG2gRc',
thumbnails: {
"url":"https://i.ytimg.com/vi/y5kIrbG2gRc/hqdefault.jpg?sqp=-oaymwEjCPYBEIoBSFryq4qpAxUIARUAAAAAGAElAADIQj0AgKJDeAE=&rs=AOn4CLA-pk9HLDSz4VelSFZ01ceyeIpBSw",
"width":"246",
"height":"138"
},
publishedAt: 'vor 3 Monaten',
duration: '2:01',
title: 'How to Download Free Music On Your iPhone (OFFLINE) 2020',
views: '51',
description:
'This video will show you how to download free music and videos on your iphone easy and fast 2020 ...' }
},...]
const yt = require('youtube-search-scrapper');
/**
* Given a search query, searching on youtube
* @param {string} search value.
*/
const videos = await yt.search('My Search Query');
console.log('Videos:');
console.log(videos);
Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js.
Apache Version 2.0
See LICENSE