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

@lmna22/aio-downloader

v2.0.3

Published

All-in-one media downloader for YouTube, Instagram, TikTok, Pinterest, Pixiv, and X/Twitter. Scrape and download videos, audio, and images from multiple platforms with a single library.

Downloads

823

Readme

@lmna22/aio-downloader

All-in-one media downloader for YouTube, Instagram, TikTok, Pinterest, Pixiv, X (Twitter), Lahelu, Xiaohongshu (RedNote), and more.

npm version License: MIT Node.js

Scrape and download videos, audio, and images from multiple platforms with a single, unified API. No API keys required.


✨ Features

| Platform | Video | Audio | Image | Search | |---|---|---|---|---| | YouTube | ✅ (Multiple qualities) | ✅ (MP3) | — | — | | Instagram | ✅ | — | ✅ | — | | TikTok | ✅ (Buffer) | ✅ | ✅ (Photo/Slides) | — | | Pinterest | — | — | ✅ | ✅ | | Pixiv | — | — | ✅ (Original Resolution) | ✅ | | X / Twitter | ✅ (Best quality) | — | ✅ | — | | Lahelu | ✅ | — | ✅ | — | | Xiaohongshu/RedNote | ✅ | — | ✅ | — | | Dailymotion | ✅ | ✅ | ✅ | ✅ | | Spotify | — | ✅ (MP3, Opus, WAV) | — | — |

  • 🔗 Auto-detect platform from URL — just pass any supported link
  • 📦 Programmatic API — designed for Node.js applications, bots, and scripts
  • 📥 Built-in download helper with progress callback
  • 🔍 Search support for Pinterest and Pixiv (pass keywords instead of URLs)
  • 🚫 No API keys — all data is scraped from public sources
  • 🔄 Multi-method fallback — Instagram uses 4 methods, TikTok uses 2 methods for maximum reliability
  • 🎬 YouTube quality selection — choose from 144p to 2160p, or audio-only MP3

📦 Installation

npm install @lmna22/aio-downloader

All required dependencies are bundled and will be installed automatically.

Optional: For Pinterest/Pixiv fallback when axios scraping is blocked:

npm install puppeteer

🚀 Quick Start

const { lmna, aioDownloader } = require("@lmna22/aio-downloader");

// Recommended: use the lmna namespace
const result = await lmna.youtube("https://www.youtube.com/watch?v=dQw4w9WgXcQ", 5);
console.log(result);

// Unified: auto-detect platform from URL
const result2 = await aioDownloader("https://www.instagram.com/p/ABC123/");
console.log(result2);

📖 Usage Examples

YouTube

const { lmna } = require("@lmna22/aio-downloader");

// Quality: 1=144p, 2=360p, 5=1080p, 8=MP3, 9=bitrate list
const result = await lmna.youtube("https://www.youtube.com/watch?v=dQw4w9WgXcQ", 5);

if (result.status) {
    console.log(result.data.title);
    const fs = require("fs");
    fs.writeFileSync(`${result.data.title}.${result.data.type}`, result.data.result);
}

Instagram

const { lmna } = require("@lmna22/aio-downloader");
const result = await lmna.instagram("https://www.instagram.com/p/ABC123/");

TikTok

const { lmna } = require("@lmna22/aio-downloader");
const result = await lmna.tiktok("https://www.tiktok.com/@user/video/1234567890");

Xiaohongshu / RedNote

const { lmna } = require("@lmna22/aio-downloader");

const result = await lmna.xiaohongshu("https://www.xiaohongshu.com/explore/abc123");

if (result.status) {
    console.log(result.data.title);
    console.log(result.data.author.nickname);
    console.log(result.data.stats.likes);
    console.log(result.data.stats.collects);
    console.log(result.data.stats.comments);
    console.log(result.data.media.url);

    // Download the media
    const { download } = require("@lmna22/aio-downloader");
    await download(result.data.media.url, `./downloads/${result.data.fileName}`);
}

Dailymotion

const { lmna } = require("@lmna22/aio-downloader");

// Download video
const result = await lmna.dailymotion("https://www.dailymotion.com/video/x8z3v2y");

if (result.status) {
    console.log(result.data.title);
    console.log(result.data.author);
    console.log(result.data.views);
    console.log(result.data.url);
}

// Search videos
const searchResult = await lmna.dailymotion("https://www.dailymotion.com/search/programming", { query: "programming", limit: 10 });

if (searchResult.status) {
    console.log(searchResult.data.videos);
}

Spotify

const { lmna } = require("@lmna22/aio-downloader");

// Get track metadata (returns search query, does not download)
const result = await lmna.spotify("https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT");

if (result.status) {
    console.log(result.data.title);
    console.log(result.data.artist);
    console.log(result.data.cover);
    console.log(result.data.searchQuery); // Use this to download with yt-dlp
    
    // Download using yt-dlp or similar tool
    // Example: yt-dlp "ytsearch1:Never Gonna Give You Up audio" --extract-audio --audio-format mp3
}

// Supported formats: mp3, opus, wav
const mp3Result = await lmna.spotify("https://open.spotify.com/track/abc123", { format: 'mp3' });
const opusResult = await lmna.spotify("https://open.spotify.com/track/abc123", { format: 'opus' });
const wavResult = await lmna.spotify("https://open.spotify.com/track/abc123", { format: 'wav' });

Note: Spotify scraper returns metadata and a search query. Use yt-dlp or similar tool to download the actual audio file using the provided searchQuery.

(See the API Reference below for other platforms: Pinterest, Pixiv, Twitter, Lahelu, Dailymotion)


📥 Download Helper

Use the built-in download helper to save files to disk:

const { download } = require("@lmna22/aio-downloader");

// Download with progress tracking
const result = await download("https://example.com/video.mp4", "./downloads/video.mp4", {
    onProgress: ({ downloaded, total, percentage }) => {
        console.log(`${percentage}% - ${downloaded}/${total} bytes`);
    },
});

console.log(result);
// { path: "./downloads/video.mp4", size: 26345678, filename: "video.mp4" }

🌐 Auto-detect Platform

const { aioDownloader, detectPlatform } = require("@lmna22/aio-downloader");

// Auto-detect and scrape
await aioDownloader("https://www.youtube.com/watch?v=abc123", { quality: 5 });
await aioDownloader("https://www.instagram.com/p/xyz/");
await aioDownloader("https://www.tiktok.com/@user/video/123");
await aioDownloader("https://www.pinterest.com/pin/456/");
await aioDownloader("https://www.pixiv.net/artworks/789");
await aioDownloader("https://x.com/user/status/101112");
await aioDownloader("https://lahelu.com/post/abc123");
await aioDownloader("https://www.xiaohongshu.com/explore/abc123");
await aioDownloader("https://www.rednote.com/explore/abc123");
await aioDownloader("https://xhslink.com/abc123");
await aioDownloader("https://www.dailymotion.com/video/x8z3v2y");
await aioDownloader("https://www.dailymotion.com/search/programming");
await aioDownloader("https://open.spotify.com/track/4cOdK2wGLETKBW3PvgPWqT");

// Force a specific platform
await aioDownloader("https://example.com/video", { platform: "youtube", quality: 5 });

// Detect platform only
detectPlatform("https://youtube.com/watch?v=abc");  // "youtube"
detectPlatform("https://instagram.com/p/xyz");       // "instagram"
detectPlatform("https://tiktok.com/@user/video/1");  // "tiktok"
detectPlatform("https://pinterest.com/pin/123");     // "pinterest"
detectPlatform("https://pin.it/abc123");             // "pinterest"
detectPlatform("https://pixiv.net/artworks/456");    // "pixiv"
detectPlatform("https://x.com/user/status/789");     // "twitter"
detectPlatform("https://lahelu.com/post/abc");       // "lahelu"
detectPlatform("https://xiaohongshu.com/explore/abc"); // "xiaohongshu"
detectPlatform("https://rednote.com/explore/abc");   // "xiaohongshu"
detectPlatform("https://xhslink.com/abc");           // "xiaohongshu"
detectPlatform("https://dailymotion.com/video/x8z3v2y"); // "dailymotion"
detectPlatform("https://dailymotion.com/search/music"); // "dailymotion"
detectPlatform("https://open.spotify.com/track/abc123"); // "spotify"
detectPlatform("https://unknown.com");               // null

📚 API Reference

lmna Namespace (Mandatory for individual scrapers)

Instead of individual function exports, all scrapers are now grouped under the lmna object:

const { lmna } = require("@lmna22/aio-downloader");

await lmna.youtube(url, quality);
await lmna.youtubePlaylist(url, quality, folderPath);
await lmna.instagram(url);
await lmna.tiktok(url);
await lmna.pinterest(url, options);
await lmna.pixiv(url, options);
await lmna.twitter(url);
await lmna.lahelu(url);
await lmna.xiaohongshu(url);
await lmna.dailymotion(url, options);
await lmna.spotify(url, options);

// All return: { status, platform, data?, message? }

aioDownloader(url, options?)

Auto-detect platform and scrape media data.

| Parameter | Type | Description | |---|---|---| | url | string | The URL to scrape | | options.platform | string | Force a specific platform | | options.quality | number | YouTube quality (1-9) |


Utility Exports

const { detectPlatform, download } = require("@lmna22/aio-downloader");

| Function | Description | |---|---| | detectPlatform(url) | Returns the platform name from URL | | download(url, path, options) | Helper to download files to disk |


⚠️ Error Handling

All functions return { status: false, platform: "...", message: "..." } on failure.


📋 Requirements

  • Node.js >= 14.0.0
  • puppeteer (optional) — fallback for Pinterest/Pixiv

📄 License

MIT