gifted-ytdl-esm
v0.7.0
Published
A Simple Yet Powerful YouTube Downloader Package
Downloads
415
Maintainers
Readme
Installation:
npm install gifted-ytdl-esm
Download Mp4:
import YTDL from 'gifted-ytdl-esm';
const ytdl = new YTDL();
(async() => {
await ytdl.mp4("https://youtu.be/abcdef").then((result) => {
console.log(result)
}).catch((error) => {
console.log(error)
})
})()
Example Response:
Download Mp3:
import YTDL from 'gifted-ytdl-esm';
const ytdl = new YTDL();
(async() => {
await ytdl.mp3("https://youtu.be/abcdef").then((result) => {
console.log(result)
}).catch((error) => {
console.log(error)
})
})()
Example Response:
{
"title": "Alan Walker - The Spectre (Lyrics)",
"id": "qHDJSRlNhVs",
"duration": "3:11",
"thumbnail": "https://i.ytimg.com/vi/qHDJSRlNhVs/hq720.jpg",
"yturl": "https://youtu.be/qHDJSRlNhVs",
"media": {
"64kbps": {
"url": "https://tmpfiles.org/dl/12562776/23992cbb19.mp3",
"size": ""
},
"96kbps": {
"url": "https://tmpfiles.org/dl/12562780/23992cbb19.mp3",
"size": ""
},
"192kbps": {
"url": "https://tmpfiles.org/dl/12562782/23992cbb19.mp3",
"size": ""
},
"256kbps": {
"url": "https://tmpfiles.org/dl/12562785/23992cbb19.mp3",
"size": ""
},
"320kbps": {
"url": "https://tmpfiles.org/dl/12562787/23992cbb19.mp3",
"size": ""
},
"128kbps": {
"url": "https://tmpfiles.org/dl/12562788/23992cbb19.mp3",
"size": "2.9 MB"
}
}
}
Perform Search:
import YTDL from 'gifted-ytdl-esm';
const ytdl = new YTDL();
(async() => {
await ytdl.search("Spectre").then((result) => {
console.log(result)
}).catch((error) => {
console.log(error)
})
})()
Example Response:
{
"data": [
{
"title": "Alan Walker - The Spectre",
"url": "https://youtu.be/wJnBTPUQS5A",
"img": "https://i.ytimg.com/vi/wJnBTPUQS5A/hqdefault.jpg",
"author": {
"name": "Alan Walker",
"url": "https://youtube.com/channel/UCJrOtniJ0-NWz37R30urifQ"
}
},
{
"title": "Alan Walker - The Spectre (Lyrics)",
"url": "https://youtu.be/qHDJSRlNhVs",
"img": "https://i.ytimg.com/vi/qHDJSRlNhVs/hq720.jpg",
"author": {
"name": "7clouds",
"url": "https://youtube.com/@7clouds"
}
},
{
"title": "This was the Greatest RANKED COMEBACK in Spectre Divide (HITTING EMERALD RANK)",
"url": "https://youtu.be/6uWH8dlHqn8",
"img": "https://i.ytimg.com/vi/6uWH8dlHqn8/hq720.jpg",
"author": {
"name": "staycation",
"url": "https://youtube.com/@staycationtg"
}
},
{
"title": "Spectre",
"url": "https://youtu.be/CLiDemXYSLc",
"img": "https://i.ytimg.com/vi/CLiDemXYSLc/hq720.jpg",
"author": {
"name": "Radiohead",
"url": "https://youtube.com/channel/UCq19-LqvG35A-30oyAiPiqA"
}
},
{
"title": "SPECTRE - Official Trailer - November 6",
"url": "https://youtu.be/ujmoYyEyDP8",
"img": "https://i.ytimg.com/vi/ujmoYyEyDP8/hq720.jpg",
"author": {
"name": "Sony Pictures Entertainment",
"url": "https://youtube.com/@sonypictures"
}
},
{
"title": "RDB Showcases Rolls Royce Elegance: A Spectre Experience. Plus SVJ & 720S",
"url": "https://youtu.be/0_RTK0d_bgY",
"img": "https://i.ytimg.com/vi/0_RTK0d_bgY/hqdefault.jpg",
"author": {
"name": "RDB LA",
"url": "https://youtube.com/@RDBLA"
}
},
{
"title": "Alan Walker - Spectre / Force / Fade [NCS Tribute Remake]",
"url": "https://youtu.be/KsxoJwX1w-E",
"img": "https://i.ytimg.com/vi/KsxoJwX1w-E/hq720.jpg",
"author": {
"name": "luunar!",
"url": "https://youtube.com/@1uunar"
}
},
{
"title": "Rolls-Royce Spectre - INSANE Luxury!",
"url": "https://youtu.be/ANPKMbm_cvQ",
"img": "https://i.ytimg.com/vi/ANPKMbm_cvQ/hq720.jpg",
"author": {
"name": "carwow",
"url": "https://youtube.com/@carwow"
}
},
{
"title": "Spectre Divide Gameplay and Impressions...",
"url": "https://youtu.be/CP1jk0Cta0Y",
"img": "https://i.ytimg.com/vi/CP1jk0Cta0Y/hq720.jpg",
"author": {
"name": "jackfrags",
"url": "https://youtube.com/@jackfrags"
}
},
{
"title": "Sam Smith - Writing's On The Wall (from Spectre) (Official Music Video)",
"url": "https://youtu.be/8jzDnsjYv9A",
"img": "https://i.ytimg.com/vi/8jzDnsjYv9A/hq720.jpg",
"author": {
"name": "SAM SMITH",
"url": "https://youtube.com/channel/UCvpDeGlR5wLP9Z3Tb6K0Xfg"
}
},
{
"title": "Spectre- Opening Tracking Shot in 1080p",
"url": "https://youtu.be/cbqv1kbsNUY",
"img": "https://i.ytimg.com/vi/cbqv1kbsNUY/hq720.jpg",
"author": {
"name": "Trent Newton",
"url": "https://youtube.com/@trentthedirector"
}
},
{
"title": "Spectre 1977",
"url": "https://youtu.be/LimAIJAzo1U",
"img": "https://i.ytimg.com/vi/LimAIJAzo1U/hqdefault.jpg",
"author": {
"name": "JimmyTakesPhotos",
"url": "https://youtube.com/@bookman60"
}
},
{
"title": "Spectre Divide Preview: A Breath of Fresh Air for Tactical Shooters",
"url": "https://youtu.be/sDOIzFFQ00w",
"img": "https://i.ytimg.com/vi/sDOIzFFQ00w/hq720.jpg",
"author": {
"name": "IGN",
"url": "https://youtube.com/@IGN"
}
},
{
"title": "Spectre Divide is a FAILURE!",
"url": "https://youtu.be/to0xbvkmIkY",
"img": "https://i.ytimg.com/vi/to0xbvkmIkY/hq720.jpg",
"author": {
"name": "TechWares",
"url": "https://youtube.com/@TechWares"
}
},
{
"title": "SPECTRE TRAILER",
"url": "https://youtu.be/LTDaET-JweU",
"img": "https://i.ytimg.com/vi/LTDaET-JweU/hq720.jpg",
"author": {
"name": "James Bond 007",
"url": "https://youtube.com/@007"
}
},
{
"title": "SPECTRE - Information Is All",
"url": "https://youtu.be/l_vcRIBc6Yo",
"img": "https://i.ytimg.com/vi/l_vcRIBc6Yo/hq720.jpg",
"author": {
"name": "Unnameable Media",
"url": "https://youtube.com/@UnnameableMedia"
}
},
{
"title": "Alan Walker - Spectre",
"url": "https://youtu.be/p7nIEJ1vpFM",
"img": "https://i.ytimg.com/vi/p7nIEJ1vpFM/hq720.jpg",
"author": {
"name": "Alan Walker",
"url": "https://youtube.com/channel/UCJrOtniJ0-NWz37R30urifQ"
}
},
{
"title": "Spectre 4K HDR | End Scene 2/2",
"url": "https://youtu.be/9RZSS0pl3MI",
"img": "https://i.ytimg.com/vi/9RZSS0pl3MI/hq720.jpg",
"author": {
"name": "Apex Clips",
"url": "https://youtube.com/@ApexClips4k"
}
},
{
"title": "SPECTRE | 007 Meets Madeleine Swann – Daniel Craig, Lea Séydoux | James Bond",
"url": "https://youtu.be/O-Y8-1esSLI",
"img": "https://i.ytimg.com/vi/O-Y8-1esSLI/hq720.jpg",
"author": {
"name": "James Bond 007",
"url": "https://youtube.com/@007"
}
},
{
"title": "Alan Walker ‒ The Spectre (Lyrics / Lyrics Video)",
"url": "https://youtu.be/lmyd-6zuArk",
"img": "https://i.ytimg.com/vi/lmyd-6zuArk/hq720.jpg",
"author": {
"name": "Taz Network",
"url": "https://youtube.com/@taznetwork"
}
},
{
"title": "Spectre",
"url": "https://youtu.be/gaF37WP2Vfs",
"img": "https://i.ytimg.com/vi/gaF37WP2Vfs/movieposter_en.jpg",
"author": {
"name": "YouTube Movies & TV",
"url": "https://youtube.com/channel/UCJrOtniJ0-NWz37R30urifQ"
}
}
]
}