npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@vreden/youtube_scraper

v1.2.8

Published

A simple YouTube video downloader for audio and video formats with resolusi and quality.

Readme

🎬 @vreden/youtube_scraper v1.2.8

Welcome to @vreden/youtube_scraper — your all-in-one YouTube scraping, metadata, and download toolkit for Node.js! 🚀

Easily fetch YouTube video and channel metadata, search YouTube, and download videos or audio in multiple formats — all with a few lines of code. Whether you're building a bot, a content aggregator, or a research tool, this package makes YouTube integration a breeze.


✨ Features

  • 🔎 Search YouTube videos and channels
  • 🎵 Download Audio (MP3) at 92, 128, 256, or 320 kbps
  • 🎥 Download Video (MP4) at 144p, 360p, 480p, 720p, or 1080p
  • 📝 Fetch Metadata for videos and channels
  • 🤝 Multiple Providers for reliable download options
  • 🛡️ No API key required for basic operations!

🚀 Installation

npm install @vreden/youtube_scraper

⚡ Quick Start

const yt = require('@vreden/youtube_scraper');

// Download audio as MP3
yt.ytmp3('https://www.youtube.com/watch?v=dQw4w9WgXcQ', 128)
  .then(result => console.log(result));

// Download video as MP4
yt.ytmp4('https://www.youtube.com/watch?v=dQw4w9WgXcQ', 360)
  .then(result => console.log(result));

// Search YouTube
yt.search('lofi hip hop')
  .then(results => console.log(results));

// Get video metadata
yt.metadata('https://www.youtube.com/watch?v=dQw4w9WgXcQ')
  .then(info => console.log(info));

// Get channel metadata
yt.channel('@lofi_girl')
  .then(info => console.log(info));

📚 API Reference

.ytmp3(link, quality = 128)

Download YouTube audio as MP3.

  • link — YouTube URL or video ID
  • quality — Audio quality (92, 128, 256, 320 kbps)

.ytmp4(link, quality = 360)

Download YouTube video as MP4.

  • link — YouTube URL or video ID
  • quality — Video quality (144, 360, 480, 720, 1080 p)

.apimp3(link, quality = 128)

Alternative MP3 downloader (uses api.vreden.my.id).

  • Same params as .ytmp3.

.apimp4(link, quality = 360)

Alternative MP4 downloader (uses api.vreden.my.id).

  • Same params as .ytmp4.

.search(query)

Search YouTube for videos/channels/playlists.

  • query — Any search string

.metadata(link)

Fetch detailed video metadata.

  • link — YouTube video URL or ID

.channel(usernameOrUrl)

Fetch channel metadata.

  • usernameOrUrl — YouTube channel URL or username (@handle or custom URL)

🟢 Example Output

Downloader Result Example

{
  "status": true,
  "creator": "@vreden/youtube_scraper",
  "metadata": {
    "type": "video",
    "videoId": "QqJ9zrY_ITw",
    "url": "https://youtube.com/watch?v=QqJ9zrY_ITw",
    "title": "Issam Alnajjar - Hadal Ahbek (Performance Video)",
    "description": "اغنية \" حضل أحبك \". Singer/Songwriter : Issam Alnajjar Issam's instagram : https://instagram.com/issamalnajjar?igshid= ...",
    "image": "https://i.ytimg.com/vi/QqJ9zrY_ITw/hq720.jpg",
    "thumbnail": "https://i.ytimg.com/vi/QqJ9zrY_ITw/hq720.jpg",
    "seconds": 211,
    "timestamp": "3:31",
    "duration": { "seconds": 211, "timestamp": "3:31" },
    "ago": "5 years ago",
    "views": 182118356,
    "author": {
      "name": "Issam Alnajjar",
      "url": "https://youtube.com/channel/UCrjyDI5SQnxBbGnUpnfT2NA"
    }
  },
  "download": {
    "status": true,
    "quality": "128kbps",
    "availableQuality": [92, 128, 256, 320],
    "url": "https://cdn406.savetube.vip/media/QqJ9zrY_ITw/issam-alnajjar-hadal-ahbek-performance-video-128-ytshorts.savetube.me.mp3",
    "filename": "Issam Alnajjar - Hadal Ahbek (Performance Video) (128kbps).mp3"
  }
}

Metadata Result Example

{
  "id": "QqJ9zrY_ITw",
  "channel_id": "UCrjyDI5SQnxBbGnUpnfT2NA",
  "channel_title": "Issam Alnajjar",
  "title": "Issam Alnajjar - Hadal Ahbek (Performance Video)",
  "description": "اغنية \" حضل أحبك \" \n______________\n\nSinger...",
  "thumbnails": [
    {
      "quality": "default",
      "url": "https://i.ytimg.com/vi/QqJ9zrY_ITw/default.jpg",
      "width": 120,
      "height": 90
    },
    {
      "quality": "medium",
      "url": "https://i.ytimg.com/vi/QqJ9zrY_ITw/mqdefault.jpg",
      "width": 320,
      "height": 180
    },
    {
      "quality": "high",
      "url": "https://i.ytimg.com/vi/QqJ9zrY_ITw/hqdefault.jpg",
      "width": 480,
      "height": 360
    },
    {
      "quality": "standard",
      "url": "https://i.ytimg.com/vi/QqJ9zrY_ITw/sddefault.jpg",
      "width": 640,
      "height": 480
    },
    {
      "quality": "maxres",
      "url": "https://i.ytimg.com/vi/QqJ9zrY_ITw/maxresdefault.jpg",
      "width": 1280,
      "height": 720
    }
  ],
  "tags": [
    "الأردن",
    "حب",
    "موسيقى بديلة",
    "فيديو كليب",
    "فلسطين",
    "عصام النجار",
    "Jordan",
    "love",
    "music video"
  ],
  "published_date": "2020-09-27T17:00:09Z",
  "published_format": "28 Sep 2020, 00:00 WIB",
  "statistics": {
    "like": "3939033",
    "view": "182118356",
    "favorit": "0",
    "comment": "287527"
  }
}

Channel Metadata Example

{
  "id": "UCX6OQ3DkcsbYNE6H8uQQuVA",
  "title": "MrBeast",
  "description": "SUBSCRIBE FOR A COOKIE!\nNew MrBeast or...",
  "username": "@mrbeast",
  "thumbnails": [
    {
      "quality": "default",
      "url": "https://yt3.ggpht.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s88-c-k-c0x00ffffff-no-rj",
      "width": 88,
      "height": 88
    },
    {
      "quality": "medium",
      "url": "https://yt3.ggpht.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s240-c-k-c0x00ffffff-no-rj",
      "width": 240,
      "height": 240
    },
    {
      "quality": "high",
      "url": "https://yt3.ggpht.com/nxYrc_1_2f77DoBadyxMTmv7ZpRZapHR5jbuYe7PlPd5cIRJxtNNEYyOC0ZsxaDyJJzXrnJiuDE=s800-c-k-c0x00ffffff-no-rj",
      "width": 800,
      "height": 800
    }
  ],
  "banner": "https://yt3.googleusercontent.com/5KWiriZZ_KEoEdSMFTJKj2M6vR_XSiRZeQ-ix0cvG3TGZuGoi8sfAjrSiZAP0GzXBkmF8ZGytw",
  "published_date": "2012-02-20T00:43:50Z",
  "published_format": "20 Feb 2012, 07:43 WIB",
  "statistics": {
    "view": "98788932632",
    "video": "913",
    "subscriber": "448000000"
  }
}

💌 Contact & Community

Feel free to reach out for feature requests, bug reports, or just to say hi! We love hearing from developers. ✨


🛠️ Requirements

  • Node.js v14+ recommended
  • Internet connection

⚠️ Disclaimer

This module is intended for educational and personal use only. Downloading copyrighted material without permission may violate YouTube’s Terms of Service.


⭐️ Star & Share!

If you find this project useful, please star ⭐️ the repo and share it with your friends!


Made with ❤️ by @vreden