btch-downloader

Version License GitHub Stars Issues TypeScript Download

Node.js Package

A lightweight TypeScript/JavaScript library for downloading videos, images, and audio from Instagram, TikTok, YouTube, Capcut, Pinterest, Twitter, X, Google Drive, MediaFire, Douyin, SnackVideo, Xiaohongshu and Facebook.

npm badge

Installing

Package manager

Using npm:

npm install btch-downloader

Using yarn:

yarn add btch-downloader

Using pnpm:

pnpm add btch-downloader

Using bun:

bun add btch-downloader

Services

ServiceLinkStatus
DocumentationVisitOnline
BackendVisitOnline

Usage

Instagram

ESM

import { igdl } from 'btch-downloader';

const url = 'https://www.instagram.com/p/ByxKbUSnubS/?utm_source=ig_web_copy_link';
igdl(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

CJS

const { igdl } = require('btch-downloader');

const url = 'https://www.instagram.com/p/ByxKbUSnubS/?utm_source=ig_web_copy_link';
igdl(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

TikTok

ESM

import { ttdl } from 'btch-downloader';

const url = 'https://www.tiktok.com/@omagadsus/video/7025456384175017243?is_from_webapp=1&sender_device=pc&web_id6982004129280116226';
ttdl(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

CJS

const { ttdl } = require('btch-downloader');

const url = 'https://www.tiktok.com/@omagadsus/video/7025456384175017243?is_from_webapp=1&sender_device=pc&web_id6982004129280116226';
ttdl(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

Facebook

ESM

import { fbdown } from 'btch-downloader';

const url = 'https://www.facebook.com/watch/?v=1393572814172251';
fbdown(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

CJS

const { fbdown } = require('btch-downloader');

const url = 'https://www.facebook.com/watch/?v=1393572814172251';
fbdown(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

Twitter

ESM

import { twitter } from 'btch-downloader';

const url = 'https://twitter.com/gofoodindonesia/status/1229369819511709697';
twitter(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

CJS

const { twitter } = require('btch-downloader');

const url = 'https://twitter.com/gofoodindonesia/status/1229369819511709697';
twitter(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

YouTube

ESM

import { youtube } from 'btch-downloader';

const url = 'https://youtube.com/watch?v=C8mJ8943X80';
youtube(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

CJS

const { youtube } = require('btch-downloader');

const url = 'https://youtube.com/watch?v=C8mJ8943X80';
youtube(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

MediaFire (no longer maintained / 不再维护)

ESM

import { mediafire } from 'btch-downloader';

const url = 'https://www.mediafire.com/file/941xczxhn27qbby/GBWA_V12.25FF-By.SamMods-.apk/file';
mediafire(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

CJS

const { mediafire } = require('btch-downloader');

const url = 'https://www.mediafire.com/file/941xczxhn27qbby/GBWA_V12.25FF-By.SamMods-.apk/file';
mediafire(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

Capcut

ESM

import { capcut } from 'btch-downloader';

const url = 'https://www.capcut.com/template-detail/7299286607478181121?template_id=7299286607478181121&share_token=80302b19-8026-4101-81df-2fd9a9cecb9c&enter_from=template_detail®ion=ID&language=in&platform=copy_link&is_copy_link=1';
capcut(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

CJS

const { capcut } = require('btch-downloader');

const url = 'https://www.capcut.com/template-detail/7299286607478181121?template_id=7299286607478181121&share_token=80302b19-8026-4101-81df-2fd9a9cecb9c&enter_from=template_detail®ion=ID&language=in&platform=copy_link&is_copy_link=1';
capcut(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

Google Drive

ESM

import { gdrive } from 'btch-downloader';

const url = 'https://drive.google.com/file/d/1thDYWcS5p5FFhzTpTev7RUv0VFnNQyZ4/view?usp=drivesdk';
gdrive(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

CJS

const { gdrive } = require('btch-downloader');

const url = 'https://drive.google.com/file/d/1thDYWcS5p5FFhzTpTev7RUv0VFnNQyZ4/view?usp=drivesdk';
gdrive(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

Pinterest

ESM

import { pinterest } from 'btch-downloader';

const url = 'https://pin.it/4CVodSq';
pinterest(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

// Using a search query
pinterest('Zhao Lusi')
  .then(data => console.log(data))
  .catch(err => console.error(err)); // JSON

CJS

const { pinterest } = require('btch-downloader');

const url = 'https://pin.it/4CVodSq';
pinterest(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

// Using a search query
pinterest('Zhao Lusi')
  .then(data => console.log(data))
  .catch(err => console.error(err)); // JSON

AIO

ESM

import { aio } from 'btch-downloader';

const url = 'https://vt.tiktok.com/ZSkGPK9Kj/';
aio(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

CJS

const { aio } = require('btch-downloader');

const url = 'https://vt.tiktok.com/ZSkGPK9Kj/';
aio(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

Douyin

ESM

import { douyin } from 'btch-downloader';

const url = 'https://v.douyin.com/ikq8axJ/';
douyin(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

CJS

const { douyin } = require('btch-downloader');

const url = 'https://v.douyin.com/ikq8axJ/';
douyin(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

Xiaohongshu (小红书)

ESM

import { xiaohongshu } from 'btch-downloader';

const url = 'https://xhslink.com/o/588P0GrGwWf';
xiaohongshu(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

CJS

const { xiaohongshu } = require('btch-downloader');

const url = 'https://xhslink.com/o/588P0GrGwWf';
xiaohongshu(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

Snackvideo

ESM

import { snackvideo } from 'btch-downloader';

const url = 'https://s.snackvideo.com/p/j9jKr9dR';
snackvideo(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

CJS

const { snackvideo } = require('btch-downloader');

const url = 'https://s.snackvideo.com/p/j9jKr9dR';
snackvideo(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON

Important Notes

  1. This downloader can only be used to download media that is public or accessible to the public.
  2. This application is not affiliated with or endorsed by any application.
  3. Ensure you have permission or copyright to download media before using this application.

Contribution and Issue Reporting

If you encounter any issues or wish to contribute to the development of this application, please visit our GitHub repository.

License

btch-downloader is licensed under the MIT License. Please refer to the LICENSE file for more information.