Socket
Socket
Sign inDemoInstall

youtube-search-scrapper

Package Overview
Dependencies
29
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    youtube-search-scrapper

Search videos on YouTube without API key


Version published
Weekly downloads
9
increased by200%
Maintainers
1
Install size
2.68 MB
Created
Weekly downloads
 

Readme

Source

youtube-search: Node.js

Search videos on youtube without API key. This is an updated fork from appit-online version

Table of contents:

Quickstart

Installing the library

npm install youtube-search-scrapper --save

Using the library

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);

Supported Node.js Versions

Our client libraries follow the Node.js release schedule. Libraries are compatible with all current active and maintenance versions of Node.js.

License

Apache Version 2.0

See LICENSE

Keywords

FAQs

Last updated on 09 Apr 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc