{"_id":"ytsave","_rev":"17-5e6290a78b2f1ca3c042ec67fe154ef4","name":"ytsave","dist-tags":{"latest":"1.0.7"},"versions":{"1.0.1":{"name":"ytsave","version":"1.0.1","author":"","license":"ISC","_id":"ytsave@1.0.1","maintainers":[{"name":"sefa.kozan","email":"sefakozan05@gmail.com"}],"homepage":"https://github.com/sefakozan/ytsave#readme","bugs":{"url":"https://github.com/sefakozan/ytsave/issues"},"bin":{"ytsave":"bin/ytsave.js"},"dist":{"shasum":"2992fd73ffbfddfe038e546a3ffbbb2986be1bca","tarball":"https://registry.npmjs.org/ytsave/-/ytsave-1.0.1.tgz","fileCount":7,"integrity":"sha512-eDN9+WTKlGdjTu8X0j2Y+7JLUz3UC2pYKLYHfw6o6oS0FlGFWE08Skwv+oHo7Z3x8qTBVQfnmqzV54gFb6RNVQ==","signatures":[{"sig":"MEUCIChWuVfYot7BYpXEDPbOgAZZ9Cboj3xrhWYUlM32Qh8ZAiEAic5m2yTotPfLW0xL8gm4+tgtcHvQFoTXMit3Snb+Jn4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20134},"main":"src/index.js","type":"module","gitHead":"43bcbfc1988cb1967c0115f658eb7348c6ef478c","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sefa.kozan","email":"sefakozan05@gmail.com"},"repository":{"url":"git+https://github.com/sefakozan/ytsave.git","type":"git"},"_npmVersion":"10.9.3","description":"A simple and powerful Node.js tool to download YouTube **videos** and **playlists** with ease.  \r Works both as a **CLI tool** and as a **library**. 🎥🎶","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ytsave_1.0.1_1757500035978_0.5884980235091273","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"ytsave","version":"1.0.2","author":"","license":"ISC","_id":"ytsave@1.0.2","maintainers":[{"name":"sefa.kozan","email":"sefakozan05@gmail.com"}],"homepage":"https://github.com/sefakozan/ytsave#readme","bugs":{"url":"https://github.com/sefakozan/ytsave/issues"},"bin":{"ytsave":"bin/ytsave.js"},"dist":{"shasum":"e078e4d3feea033f7fcd4e2af9e9ef095a61a5bc","tarball":"https://registry.npmjs.org/ytsave/-/ytsave-1.0.2.tgz","fileCount":7,"integrity":"sha512-OnKnHc2Q8NNlDH1VCK+lZHuXsxQQTMZQJ8bFf7CLxoLjxspdYWtrn5BLW+zKkph2u1FhSVThX2ca6UETaC/qBw==","signatures":[{"sig":"MEUCIQCU5fyv88cON41PSOVh8GqnfDN1MJBELkKIuihwvX65tgIgRAVEQL5LOj2YQj4i7RG+JQ8zUivvtp9oQIRNB3zjwLY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20652},"main":"src/index.js","type":"module","gitHead":"43bcbfc1988cb1967c0115f658eb7348c6ef478c","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sefa.kozan","email":"sefakozan05@gmail.com"},"repository":{"url":"git+https://github.com/sefakozan/ytsave.git","type":"git"},"_npmVersion":"10.9.3","description":"A simple and powerful Node.js tool to download YouTube **videos** and **playlists** with ease.  \r Works both as a **CLI tool** and as a **library**. 🎥🎶","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ytsave_1.0.2_1757500676932_0.645664391783503","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"ytsave","version":"1.0.3","author":"","license":"ISC","_id":"ytsave@1.0.3","maintainers":[{"name":"sefa.kozan","email":"sefakozan05@gmail.com"}],"homepage":"https://github.com/sefakozan/ytsave#readme","bugs":{"url":"https://github.com/sefakozan/ytsave/issues"},"bin":{"ytsave":"bin/ytsave.js"},"dist":{"shasum":"dad3f85ffede6b5ee6eeba93d716c25d4bac6ee0","tarball":"https://registry.npmjs.org/ytsave/-/ytsave-1.0.3.tgz","fileCount":7,"integrity":"sha512-cBma02sEZWrs6OBoWV3V9KC5L3advAou9uNOma6aUwcHvms5GSes7qTgKgcMBRWlnRwB+XiJXAmNtjXNHd8mqw==","signatures":[{"sig":"MEQCICZ4ixEWZnrzpHMNBfEKFsTBH+TK92pdJiLGHH+mhkhJAiBOR48GKknX6kFaBXzEx99p+UgumqVGGXqMfIUc1Rb4sQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":20922},"main":"src/index.js","type":"module","gitHead":"628d0b47d8d59499c2827c508224940099a9bef2","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sefa.kozan","email":"sefakozan05@gmail.com"},"repository":{"url":"git+https://github.com/sefakozan/ytsave.git","type":"git"},"_npmVersion":"10.9.3","description":"A simple and powerful Node.js tool to download YouTube **videos** and **playlists** with ease.  \r Works both as a **CLI tool** and as a **library**. 🎥🎶","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ytsave_1.0.3_1757501271490_0.23739396385400746","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"ytsave","version":"1.0.4","author":"","license":"ISC","_id":"ytsave@1.0.4","maintainers":[{"name":"sefa.kozan","email":"sefakozan05@gmail.com"}],"homepage":"https://github.com/sefakozan/ytsave#readme","bugs":{"url":"https://github.com/sefakozan/ytsave/issues"},"bin":{"ytsave":"bin/ytsave.js"},"dist":{"shasum":"2db94cfcd03d264b14d8608d9e100c05ff771789","tarball":"https://registry.npmjs.org/ytsave/-/ytsave-1.0.4.tgz","fileCount":7,"integrity":"sha512-2u7vLZkqkPgWiQk7Y4En0WWy3IWX4cZN5FYC4K3aRElVvtdiz81tvasSIdPKI8SnpAQ+DrBU7EYp7RKv/1r7Gg==","signatures":[{"sig":"MEUCIGh57GJIUR2cjA6S3408cFiZ3D6P8mfQr9Uw73Raz+z8AiEAr/b/qgTrnQVIMKPQcgLF6qV5iYJgd+6+KZZllhg8Zz8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21348},"main":"src/index.js","type":"module","gitHead":"f497605ed4bed22e179dad1c1b8b45ac5cdb4785","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sefa.kozan","email":"sefakozan05@gmail.com"},"repository":{"url":"git+https://github.com/sefakozan/ytsave.git","type":"git"},"_npmVersion":"10.9.3","description":"A simple and powerful Node.js tool to download YouTube **videos** and **playlists** with ease.  \r Works both as a **CLI tool** and as a **library**. 🎥🎶","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ytsave_1.0.4_1757501877104_0.12497359856041967","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"ytsave","version":"1.0.5","author":"","license":"ISC","_id":"ytsave@1.0.5","maintainers":[{"name":"sefa.kozan","email":"sefakozan05@gmail.com"}],"homepage":"https://github.com/sefakozan/ytsave#readme","bugs":{"url":"https://github.com/sefakozan/ytsave/issues"},"bin":{"ytsave":"bin/ytsave.js"},"dist":{"shasum":"d0bcb694a4dcbe036f180314bfee23e948b35847","tarball":"https://registry.npmjs.org/ytsave/-/ytsave-1.0.5.tgz","fileCount":7,"integrity":"sha512-lAgHO9D+TZ5l0kui6punSEJqN73g/1LoO3AKQNHb0npnqpqEfqoOICv7GrpZDJ+0bXystTt9oYjRNdepbBRLKQ==","signatures":[{"sig":"MEQCIB5V89PMAPH2rXfnULRVWI+5e/llYtiilkpVdp4k35HMAiA6XY1eA5sPGanjRrG5hA5mTlrZPVEtEkkZ32nRS8oIxQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22745},"main":"src/index.js","type":"module","gitHead":"b01392728a79f580f9832ae69de556176f5e6d20","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sefa.kozan","email":"sefakozan05@gmail.com"},"repository":{"url":"git+https://github.com/sefakozan/ytsave.git","type":"git"},"_npmVersion":"10.9.3","description":"A simple and powerful Node.js tool to download YouTube **videos** and **playlists** with ease.  \r Works both as a **CLI tool** and as a **library**. 🎥🎶","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ytsave_1.0.5_1757502354265_0.25032945237651316","host":"s3://npm-registry-packages-npm-production"}},"1.0.6":{"name":"ytsave","version":"1.0.6","keywords":["ytsave","youtube","youtube-downloader","yt-dlp","yt-dlp-wrapper","downloader","video-downloader","playlist-downloader","mp4","mp3","audio","video","ffmpeg","cli","command-line","node","nodejs","npm","media","download","batch-download","stream-download","playlist","save-video","save-audio"],"author":"","license":"ISC","_id":"ytsave@1.0.6","maintainers":[{"name":"sefa.kozan","email":"sefakozan05@gmail.com"}],"homepage":"https://github.com/sefakozan/ytsave#readme","bugs":{"url":"https://github.com/sefakozan/ytsave/issues"},"bin":{"ytsave":"bin/ytsave.js"},"dist":{"shasum":"152d4fb6e355aad82d107c720c3a9313d2443c46","tarball":"https://registry.npmjs.org/ytsave/-/ytsave-1.0.6.tgz","fileCount":7,"integrity":"sha512-ZHhoITE9jNe1pVeEFPWos1Sq8bNahBi7Sp5/kD5lIon3TIfjzhIRi8DIsFwDooNGW0cDDoIDMW8m1qn5Q6iJVw==","signatures":[{"sig":"MEUCIAXpOyhUbZ0vCa3VxSmFAyI7klQsWK8mpPoomY6vMNm8AiEAh/B8Tdz/CSYt6KcBmCI6lsfVzEllNonDNY39VqG69Ic=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23237},"main":"src/index.js","type":"module","gitHead":"d5c2b324442d2fa0b98a0a39ce3ea5b1058faaff","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"_npmUser":{"name":"sefa.kozan","email":"sefakozan05@gmail.com"},"repository":{"url":"git+https://github.com/sefakozan/ytsave.git","type":"git"},"_npmVersion":"10.9.3","description":"A simple and powerful Node.js tool to download YouTube **videos** and **playlists** with ease.  \r Works both as a **CLI tool** and as a **library**. 🎥🎶","directories":{},"_nodeVersion":"22.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/ytsave_1.0.6_1757519239382_0.6290592564185682","host":"s3://npm-registry-packages-npm-production"}},"1.0.7":{"name":"ytsave","version":"1.0.7","description":"A simple and powerful Node.js tool to download YouTube **videos** and **playlists** with ease.  \r Works both as a **CLI tool** and as a **library**. 🎥🎶","keywords":["ytsave","youtube","youtube-downloader","yt-dlp","yt-dlp-wrapper","downloader","video-downloader","playlist-downloader","mp4","mp3","audio","video","ffmpeg","cli","command-line","node","nodejs","npm","media","download","batch-download","stream-download","playlist","save-video","save-audio"],"main":"src/index.js","type":"module","bin":{"ytsave":"bin/ytsave.js"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/sefakozan/ytsave.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/sefakozan/ytsave/issues"},"homepage":"https://github.com/sefakozan/ytsave#readme","_id":"ytsave@1.0.7","gitHead":"d5c2b324442d2fa0b98a0a39ce3ea5b1058faaff","_nodeVersion":"22.18.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-yDwyAeiqxslM6oWeRBaoLx7LKQdl6vNDuS9jg5zOlNGDUie/iqpur9n8v/dPcHobRJpmDbKa6U62CXaZ8GoPpA==","shasum":"81cd1f2dde3d38c03ad0592201a0dc15145c5042","tarball":"https://registry.npmjs.org/ytsave/-/ytsave-1.0.7.tgz","fileCount":7,"unpackedSize":23303,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDKscar0iePNVeapZ0uWOaiANO8Jq3dhZRbwRqsnQbIhAiBug/65/80kPYm+3LmQskgM/xhlHjg7o5uP87xCu4Gy0w=="}]},"_npmUser":{"name":"sefa.kozan","email":"sefakozan05@gmail.com"},"directories":{},"maintainers":[{"name":"sefa.kozan","email":"sefakozan05@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ytsave_1.0.7_1757531517261_0.16458991753925267"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-10T10:27:15.978Z","modified":"2025-09-10T19:11:57.617Z","1.0.0":"2022-05-21T20:29:05.055Z","2.0.0":"2022-05-21T20:45:24.588Z","2.0.1":"2022-05-21T20:52:57.833Z","2.1.0":"2022-05-21T20:54:49.785Z","2.1.1":"2022-05-21T22:27:51.971Z","2.1.2":"2022-05-21T22:31:09.784Z","2.1.3":"2022-05-21T22:33:04.738Z","2.2.0":"2022-05-22T18:01:29.104Z","2.2.1":"2022-05-22T20:19:36.982Z","1.0.1":"2025-09-10T10:27:16.153Z","1.0.2":"2025-09-10T10:37:57.102Z","1.0.3":"2025-09-10T10:47:51.664Z","1.0.4":"2025-09-10T10:57:57.261Z","1.0.5":"2025-09-10T11:05:54.436Z","1.0.6":"2025-09-10T15:47:19.542Z","1.0.7":"2025-09-10T19:11:57.443Z"},"bugs":{"url":"https://github.com/sefakozan/ytsave/issues"},"license":"ISC","homepage":"https://github.com/sefakozan/ytsave#readme","keywords":["ytsave","youtube","youtube-downloader","yt-dlp","yt-dlp-wrapper","downloader","video-downloader","playlist-downloader","mp4","mp3","audio","video","ffmpeg","cli","command-line","node","nodejs","npm","media","download","batch-download","stream-download","playlist","save-video","save-audio"],"repository":{"type":"git","url":"git+https://github.com/sefakozan/ytsave.git"},"description":"A simple and powerful Node.js tool to download YouTube **videos** and **playlists** with ease.  \r Works both as a **CLI tool** and as a **library**. 🎥🎶","maintainers":[{"name":"sefa.kozan","email":"sefakozan05@gmail.com"}],"readme":"\r\n<p align=\"right\">\r\n<a href=\"https://www.npmjs.com/package/ytsave\"><img src=\"https://nodei.co/npm/ytsave.svg?data=d\"></a>\r\n</p>\r\n\r\n# ytsave\r\n\r\nA simple and powerful Node.js tool to download YouTube **videos** and **playlists** with ease.  \r\nWorks both as a **CLI tool** and as a **library**. 🎥🎶  \r\n\r\n&nbsp;\r\n\r\n## ✨ Features\r\n- 📥 Download single YouTube videos  \r\n- 🎵 Download entire playlists in one command  \r\n- 🔊 Support for both **audio-only (mp3)** and **video (mp4)** formats  \r\n- ⚡ Fast & reliable (powered by `yt-dlp`)  \r\n- 🛠 Usable both as a **CLI** and as a **library**  \r\n\r\n&nbsp;\r\n\r\n## 🚀 Installation\r\n\r\n### As CLI (global)\r\n```bash\r\nnpm install -g ytsave\r\n````\r\n\r\n### As dependency (library usage)\r\n\r\n```bash\r\nnpm install ytsave\r\n```\r\n\r\n&nbsp;\r\n\r\n## 📥 Install yt-dlp & ffmpeg\r\n\r\nytsave relies on the external tool `yt-dlp` to download media and (optionally) `ffmpeg` to merge separate video/audio streams. Install them on your system and ensure they're available on your PATH before running the CLI.\r\n\r\nWindows\r\n- Using winget:\r\n  ```powershell\r\n  winget install yt-dlp\r\n  ```\r\n- Using pip (if Python is installed):\r\n  ```powershell\r\n  pip install yt-dlp\r\n  ```\r\n- Using Scoop:\r\n  ```powershell\r\n  scoop install yt-dlp\r\n  ```\r\n- Using Chocolatey:\r\n  ```powershell\r\n  choco install yt-dlp\r\n  ```\r\n- Or download the `yt-dlp.exe` from the releases page and add it to your PATH:\r\n  https://github.com/yt-dlp/yt-dlp/releases\r\n\r\nmacOS\r\n- Using Homebrew:\r\n  ```bash\r\n  brew install yt-dlp\r\n  ```\r\n\r\nLinux\r\n- Using pip:\r\n  ```bash\r\n  pip3 install --user yt-dlp\r\n  ```\r\n- Using your distro package manager (if available) or download the binary from the releases page.\r\n\r\nffmpeg (optional but recommended)\r\n- ffmpeg is required if yt-dlp needs to merge separate video and audio streams (this happens when selecting the best video and best audio). Install ffmpeg via your platform package manager:\r\n  - Windows (scoop/choco) — `scoop install ffmpeg` or `choco install ffmpeg`\r\n  - macOS (Homebrew) — `brew install ffmpeg`\r\n  - Linux (apt/yum/pacman) — `sudo apt install ffmpeg` or equivalent\r\n\r\nAfter installing, verify both commands are available:\r\n\r\n```bash\r\nyt-dlp --version\r\nffmpeg -version\r\n```\r\n&nbsp;\r\n\r\n## 💻 CLI Usage\r\n\r\n### Download a single video or playlist\r\n\r\n#### No Parameters (default)\r\n```bash\r\nytsave https://www.youtube.com/watch?v=dQw4w9WgXcQ\r\n```\r\n\r\n```bash\r\nytsave https://www.youtube.com/playlist?list=PL123456789\r\n```\r\n\r\n#### With Parameters\r\n```bash\r\nytsave https://www.youtube.com/watch?v=dQw4w9WgXcQ --format mp4 --output ./videos \r\n```\r\n\r\n```bash\r\nytsave https://www.youtube.com/playlist?list=PL123456789 --format mp3 --output ./music\r\n```\r\n\r\n### CLI Options\r\n\r\n* `--format <mp4|mp3>` → Output format (default: `mp4`)\r\n* `--output <path>` → Output directory (default: current folder)\r\n\r\n&nbsp;\r\n\r\n## 📖 Library Usage\r\n\r\n### Import in ESM\r\n\r\n```js\r\nimport { downloadVideo, downloadPlaylist } from \"ytsave\";\r\n```\r\n\r\n### Download a single video\r\n\r\n```js\r\nawait downloadVideo(\"https://www.youtube.com/watch?v=dQw4w9WgXcQ\", {\r\n  format: \"mp4\",\r\n  output: \"./videos\",\r\n});\r\n```\r\n\r\n### Download a playlist\r\n\r\n```js\r\nawait downloadPlaylist(\"https://www.youtube.com/playlist?list=PL123456789\", {\r\n  format: \"mp3\",\r\n  output: \"./music\",\r\n});\r\n```\r\n\r\n&nbsp;\r\n\r\n## ⚙️ API\r\n\r\n### `downloadVideo(url, options)`\r\n\r\nDownloads a single YouTube video.\r\n\r\n* `url` *(string)*: YouTube video URL\r\n* `options.format` *(string)*: `\"mp4\"` or `\"mp3\"`\r\n* `options.output` *(string)*: Output directory path\r\n\r\n### `downloadPlaylist(url, options)`\r\n\r\nDownloads an entire YouTube playlist.\r\n\r\n* `url` *(string)*: YouTube playlist URL\r\n* `options.format` *(string)*: `\"mp4\"` or `\"mp3\"`\r\n* `options.output` *(string)*: Output directory path\r\n\r\n&nbsp;\r\n\r\n## ⚠️ Disclaimer\r\n\r\nThis project is for **educational purposes only**.\r\nDownloading videos or music from YouTube may violate **YouTube’s Terms of Service**.\r\nUse responsibly.\r\n\r\n","readmeFilename":"README.md"}