nexo-aio-downloader
v1.8.0
Published
Download video/photo from multiple sites
Downloads
578
Maintainers
Readme
Nexo AIO Downloader
One library. All platforms. Download video, audio, and images from 13 platforms using a unified API — all scraped directly from the source, no third‑party APIs.
Supported Sites
| | | | | | | |---|---|---|---|---|---| | Instagram | Facebook | TikTok | Twitter/X | YouTube | Google Drive | | Pixiv | Bilibili | Pinterest | Mega | Sfile | Snack | | CapCut | | | | | |
YouTube needs Python 3.7+ with
yt-dlpin PATH. If missing, the YouTube downloader auto‑disables.
Installation
npm i nexo-aio-downloaderQuick Start
const nexo = require('nexo-aio-downloader');
// AIO — auto‑detect site from URL
const result = await nexo.aio('https://...');
// → { creator: '@ShiroNexo', status: true, data: { ... } }API Reference
Every call returns a consistent shape:
// Success
{ creator: '@ShiroNexo', status: true, data: { ... } }
// Error
{ creator: '@ShiroNexo', status: false, message: 'Error description' }
nexo.aio()throws'Unsupported site'for unknown URLs — use try/catch.
nexo.aio(url, [options])
Auto‑detects the site and routes to the correct downloader.
| Param | Type | Description |
|-------|------|-------------|
| url | string | Any supported site URL |
| options | object | { proxy?, cookie? } |
All Downloaders
nexo.instagram(url, [cookie])
nexo.facebook(url, [proxy])
nexo.tiktok(url)
nexo.twitter(url)
nexo.gdrive(url)
nexo.sfile(url)
nexo.pixiv(url, [cookie])
nexo.snack(url)
nexo.mega(url, [timeout])
nexo.bilibili(url, [{ download, quality, cookie }])
nexo.capcut(url, [meta])
nexo.youtube(url, [quality])
nexo.youtubePlaylist(url, [quality], [folderPath])
nexo.pixivBatch(url, [cookie], [type])
nexo.pinterest.download(url)
nexo.pinterest.search(query, [limit])
nexo.pinterest.profile(username)Examples
Instagram often requires login cookies — otherwise you'll get empty data or block errors.
// Without cookie (may fail)
const result = await nexo.instagram('https://www.instagram.com/reel/ABC123/');
// With cookie (recommended)
const result = await nexo.instagram('https://www.instagram.com/p/ABC123/', 'sessionid=xxxx-xxxx');
// Or via aio
const result = await nexo.aio('https://www.instagram.com/p/ABC123/', {
cookie: 'sessionid=xxxx-xxxx; csrftoken=xxxx; ds_user_id=xxxx',
});How to get Instagram cookie:
- Login to instagram.com in your browser
- Press F12 → Application → Cookies →
instagram.com - Copy values for:
sessionid,csrftoken,ds_user_id - Combine them:
sessionid=...; csrftoken=...; ds_user_id=...
Return data:
{ url: string[], caption: string, username: string, like: number, comment: number, isVideo: boolean }const result = await nexo.facebook('https://www.facebook.com/share/v/...');
// With proxy
const { HttpsProxyAgent } = require('https-proxy-agent');
const proxy = new HttpsProxyAgent('http://user:pass@host:port');
const result = await nexo.facebook('https://fb.watch/abc123/', proxy);Return data:
{ user: string, quoted: string|null, isPrivate: boolean, result: [{ quality: 'HD'|'SD', type: string, url: string }] }TikTok
const result = await nexo.tiktok('https://www.tiktok.com/@user/video/123456');
// or short links
const result = await nexo.tiktok('https://vm.tiktok.com/abc123/');Return data:
{
videoId, description, createTime, videoUrl,
videoInfo: { size, duration, width, height, definition, coverUrl, subtitles },
author: { id, uniqueId, nickname, avatarThumb },
music: { id, title, authorName, playUrl, isOriginal },
stats: { likes, shares, comments, plays, collects, reposts },
videoBuffer: Buffer // Downloaded buffer
}Twitter / X
const result = await nexo.twitter('https://x.com/user/status/123456789');Return data:
{
author: string, like: number, view: number, retweet: number,
description: string, sensitiveContent: boolean,
result: [{ type: 'video'|'gif'|'image', thumb?: string, url: string }]
}YouTube
// Quality: 1=144p, 2=360p, 3=480p, 4=720p, 5=1080p, 6=1440p, 7=2160p
// 8=bestaudio, 9=bitrateList
const video = await nexo.youtube('https://www.youtube.com/watch?v=dQw4w9WgXcQ', 4);
// → data.result = MP4 Buffer
// List available audio bitrates
const bitrates = await nexo.youtube('https://www.youtube.com/watch?v=dQw4w9WgXcQ', 9);
// → data.bitrateList = [{ codec, bitrate, format_id }]
// Download audio at specific bitrate
const audio = await nexo.youtube('https://www.youtube.com/watch?v=dQw4w9WgXcQ', 160);
// Playlist
const playlist = await nexo.youtubePlaylist(
'https://www.youtube.com/playlist?list=PL...',
4, // quality
'./downloads/youtube' // output folder (default: ./temp)
);
// → data = { title, resultPath: string[], metadata: [...] }Return data (video/audio):
{ title, result: Buffer, size, quality, desc, views, likes, channel, uploadDate, thumb, type }Google Drive
const result = await nexo.gdrive('https://drive.google.com/file/d/FILE_ID/view');Return data:
{ filename: string, filesize: string, result: Buffer }Sfile
const result = await nexo.sfile('https://sfile.mobi/FILEKEY');Return data:
{ filename: string, filesize: string, mimetype: string, result: Buffer }Pixiv
// SFW (no cookie)
const sfw = await nexo.pixiv('https://www.pixiv.net/en/artworks/120829610');
// → data.result = [{ type: 'png'|'gif', buffer }]
// With cookie (R‑18, Ugoira/GIF)
const r18 = await nexo.pixiv('https://www.pixiv.net/en/artworks/...', 'your_PHPSESSID');
// Batch download all works from a user
const batch = await nexo.pixivBatch(
'https://www.pixiv.net/en/users/25030629',
'your_PHPSESSID',
'illust' // illust | manga | novels | mangaSeries | novelSeries
);
// → data = array of artwork resultsHow to get PHPSESSID:
- Login to pixiv.net
- F12 → Application → Cookies →
www.pixiv.net - Copy the
PHPSESSIDvalue
Return data:
{ title, alt, user, desc, like, view, comment, tags, result: [{ type, buffer }] }Bilibili
const result = await nexo.bilibili('https://www.bilibili.tv/id/video/2042507617', {
download: true, // true = return MP4 buffer, false = metadata only
quality: '64', // 16=360p, 32=480p (default), 64=720p
cookie: 'SESSDATA=xxxxx', // optional, needed for 1080p+
});
if (result.status && result.data.result) {
require('fs').writeFileSync(`${result.data.title}.mp4`, result.data.result);
}Return data:
{
title, locate, description, type, cover, views, like,
result: Buffer|null, // null when download: false
mediaList: { videoList: [{ quality, quality_id, url }], audioList: [{ size, url }] }
}CapCut
const result = await nexo.capcut('https://www.capcut.com/t/abc123', true);
// meta=true (default) includes extra metadata like author, likes, play countSnack
const result = await nexo.snack('https://www.snack.com/video/abc123');Return data:
{ author, description, transcript, thumbnailUrl, uploadDate, comment, audio, result: string (contentUrl) }Mega
const result = await nexo.mega('https://mega.nz/file/abc123#decryptionKey');Return data:
{ fileName: string, fileSize: number, downloadLink: string }// Pin metadata + media
const pin = await nexo.pinterest.download('https://id.pinterest.com/pin/774124930087393/');
// Search (max 50)
const search = await nexo.pinterest.search('cats', 10);
// User profile
const profile = await nexo.pinterest.profile('username');Using a Proxy
const { HttpsProxyAgent } = require('https-proxy-agent');
const proxy = new HttpsProxyAgent('http://user:pass@host:port');
// Via aio
await nexo.aio('https://www.facebook.com/...', { proxy });
// Direct
await nexo.facebook('https://www.facebook.com/...', proxy);Requirements
| Dependency | Needed For |
|------------|-----------|
| Python 3.7+ + yt-dlp | YouTube only |
| ffmpeg (in PATH) | YouTube & Bilibili video/audio merging |
If
ffmpeg-staticis installed by npm, it's used automatically. Otherwise the systemffmpegis used.
License
MIT © ShiroNexo
