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

@luciusexe10/onyx-dl

v1.1.1

Published

Unified intelligent downloader for videos and images from all major social media platforms

Readme

@luciusexe10/onyx-dl

Unified intelligent downloader for videos and images from all major social media platforms.

Installation

npm install @luciusexe10/onyx-dl

Quick Start

import { alldl } from '@luciusexe10/onyx-dl';

const result = await alldl('https://www.instagram.com/p/xyz');

if (result.success) {
  console.log(result.downloads);
}

Supported Platforms

Instagram • TikTok • YouTube • Facebook • Twitter/X • Pinterest • Threads • SoundCloud • Spotify • Douyin • Xiaohongshu • SnackVideo • Cocofun • CapCut • Google Drive • MediaFire

API

alldl(url)

Main unified endpoint. Automatically detects platform and downloads media.

Response:

{
  success: boolean;
  platform: string;
  metadata?: {
    title?: string;
    author?: string;
    thumbnail?: string;
    duration?: string | number;
  };
  downloads?: Array<{
    type: 'video' | 'image' | 'audio';
    url: string;
    quality?: string;
  }>;
  error?: string;
}

detectPlatform(url)

Detects platform from URL.

isValidUrl(url)

Validates URL format.

Examples

Basic Usage

import { alldl } from '@luciusexe10/onyx-dl';

const result = await alldl('https://www.instagram.com/p/xyz');

if (result.success) {
  result.downloads?.forEach(item => {
    console.log(`${item.type}: ${item.url}`);
  });
}

Multiple URLs

import { alldl } from '@luciusexe10/onyx-dl';

const urls = [
  'https://instagram.com/p/xyz',
  'https://tiktok.com/@user/video/123',
  'https://youtube.com/watch?v=abc'
];

const results = await Promise.all(urls.map(url => alldl(url)));

Express.js Server

import express from 'express';
import { alldl } from '@luciusexe10/onyx-dl';

const app = express();
app.use(express.json());

app.all('/download', async (req, res) => {
  const url = req.method === 'GET' ? req.query.url : req.body.url;
  
  if (!url) {
    return res.status(400).json({ success: false, error: 'URL required' });
  }
  
  const result = await alldl(url as string);
  res.json(result);
});

app.listen(3000);

Browser Usage

<!DOCTYPE html>
<html>
<head>
  <title>@luciusexe10/onyx-dl Demo</title>
</head>
<body>
  <input id="url" placeholder="Paste URL">
  <button onclick="download()">Download</button>
  <div id="result"></div>

  <script src="https://cdn.jsdelivr.net/npm/@luciusexe10/onyx-dl/dist/browser/index.min.js"></script>
  <script>
    async function download() {
      const url = document.getElementById('url').value;
      const result = await window.OnyxDL.alldl(url);
      
      if (result.success) {
        document.getElementById('result').innerHTML = 
          result.downloads.map(d => `<a href="${d.url}">${d.type}</a>`).join('<br>');
      } else {
        document.getElementById('result').textContent = result.error;
      }
    }
  </script>
</body>
</html>

Error Handling

import { alldl } from '@luciusexe10/onyx-dl';

try {
  const result = await alldl(url);
  
  if (!result.success) {
    console.error(result.error);
    return;
  }
  
  // Process downloads
  result.downloads?.forEach(item => {
    console.log(item.url);
  });
} catch (error) {
  console.error('Request failed:', error);
}

TypeScript

import { alldl, type UnifiedResponse } from '@luciusexe10/onyx-dl';

async function download(url: string): Promise<UnifiedResponse> {
  const result = await alldl(url);
  
  if (result.success && result.downloads) {
    result.downloads.forEach(d => {
      console.log(d.type); // 'video' | 'image' | 'audio'
      console.log(d.url);
    });
  }
  
  return result;
}

Platform Detection

import { detectPlatform, isValidUrl } from '@luciusexe10/onyx-dl';

const url = 'https://instagram.com/p/xyz';

if (isValidUrl(url)) {
  const platform = detectPlatform(url);
  console.log(platform); // 'instagram'
}

Response Examples

Success

{
  "success": true,
  "platform": "instagram",
  "metadata": {
    "title": "Photo",
    "author": "user"
  },
  "downloads": [
    {
      "type": "image",
      "url": "https://..."
    }
  ]
}

Error

{
  "success": false,
  "platform": "unknown",
  "error": "Invalid URL"
}

CDN

<!-- unpkg -->
<script src="https://unpkg.com/@luciusexe10/onyx-dl/dist/browser/index.min.js"></script>

<!-- jsDelivr -->
<script src="https://cdn.jsdelivr.net/npm/@luciusexe10/onyx-dl/dist/browser/index.min.js"></script>

<script>
  const { alldl } = window.OnyxDL;
  alldl('https://instagram.com/p/xyz').then(console.log);
</script>

Legacy API

Individual platform functions available for backward compatibility:

import { igdl, ttdl, youtube } from '@luciusexe10/onyx-dl';

const ig = await igdl('https://instagram.com/p/xyz');
const tt = await ttdl('https://tiktok.com/@user/video/123');
const yt = await youtube('https://youtube.com/watch?v=xyz');

Notes

  • Only download public media or content you have permission to access
  • Respect platform rate limits and terms of service
  • Not affiliated with any social media platform

Credits

Original API Backend

@prm2.0 (Tio)

  • Created btch-downloader package
  • Developed all platform-specific download APIs
  • Maintains backend infrastructure at https://backend1.tioo.eu.org

Unified Wrapper

Lucius

  • Wrapped APIs into single unified endpoint
  • Added intelligent platform detection
  • Standardized response format
  • Created TypeScript definitions

This package wraps the excellent btch-downloader APIs by @prm2.0 into a unified interface.

License

MIT