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 🙏

© 2026 – Pkg Stats / Ryan Hefner

iguro-ytdl

v1.0.1

Published

Módulo Node.js para baixar áudios e vídeos do YouTube com ytmp3, ytmp4 e ytplay.

Readme

npm version license


Instalação

npm install iguro-ytdl

Funções

| Função | Descrição | |--------|-----------| | ytmp3(url) | Retorna link de download de áudio (MP3) de uma URL do YouTube | | ytmp4(url, quality?) | Retorna link de download de vídeo (MP4) de uma URL do YouTube | | ytplay(query) | Aceita URL ou termo de busca e retorna links de MP3 + MP4 |


Como usar

const { ytmp3, ytmp4, ytplay } = require("iguro-ytdl");

ytmp3(url)

Retorna informações de download de áudio para uma URL do YouTube.

const resultado = await ytmp3("https://www.youtube.com/watch?v=MI9ZpIKgyf0");
console.log(resultado);

Resposta:

{
  "status": true,
  "result": {
    "title": "Ed Sheeran - Azizam (Official Music Video)",
    "channel": "Ed Sheeran",
    "views": "44.8M",
    "thumbnail": "https://i.ytimg.com/vi/MI9ZpIKgyf0/sddefault.jpg",
    "duration": "03:27",
    "quality": "128kbps",
    "url": "https://cdn.savetube.vip/media/..."
  }
}

ytmp4(url, quality?)

Retorna informações de download de vídeo. O parâmetro quality é opcional (padrão: melhor qualidade disponível).

Qualidades aceitas: "144p", "240p", "360p", "480p", "720p", "1080p", "FHD", etc.

const resultado = await ytmp4("https://www.youtube.com/watch?v=MI9ZpIKgyf0", "1080p");
console.log(resultado);

Resposta:

{
  "status": true,
  "result": {
    "title": "Ed Sheeran - Azizam (Official Music Video)",
    "channel": "Ed Sheeran",
    "views": "44.8M",
    "thumbnail": "https://i.ytimg.com/vi/MI9ZpIKgyf0/sddefault.jpg",
    "duration": "00:03:27",
    "quality": "FHD",
    "size": "30.12 MB",
    "url": "https://rr2---sn-....googlevideo.com/videoplayback/...",
    "worker": "https://s21.worker03.com/v5/video/..."
  }
}

ytplay(query)

Aceita uma URL do YouTube ou um termo de busca. Retorna metadados e links de download em MP3 e MP4, além de todos os formatos disponíveis.

// Com URL
const resultado = await ytplay("https://www.youtube.com/watch?v=MI9ZpIKgyf0");

// Com termo de busca
const resultado = await ytplay("Ed Sheeran Azizam");

console.log(resultado);

Resposta:

{
  "status": true,
  "result": {
    "title": "Ed Sheeran - Azizam (Official Music Video)",
    "channel": "Ed Sheeran",
    "views": "44.8M",
    "thumbnail": "https://i.ytimg.com/vi/MI9ZpIKgyf0/sddefault.jpg",
    "duration": "03:27",
    "url": "https://www.youtube.com/watch?v=MI9ZpIKgyf0",
    "download": {
      "mp3": "https://cdn.savetube.vip/media/....mp3",
      "mp4": "https://rr2---sn-....googlevideo.com/videoplayback/..."
    },
    "formats": {
      "mp3": [],
      "mp4": []
    }
  }
}

Tratamento de erros

Todas as funções retornam um formato de resposta consistente. Em caso de falha, status será false e error conterá a mensagem:

{
  "status": false,
  "error": "Algo deu errado"
}

Sempre verifique result.status antes de usar os dados:

const res = await ytmp3("https://www.youtube.com/watch?v=...");
if (!res.status) {
  console.error("Erro:", res.error);
} else {
  console.log("URL de download:", res.result.url);
}

Dependências


Licença

MIT © Anonimo.js