Main entry point for the btch-downloader package.
Provides various downloader functions for social media platforms.
- Source
Methods
(async, inner) aio(url) → {Promise.<AioResponse>}
All-In-One (AIO) downloader for various social platforms.
| Name | Type | Description |
|---|---|---|
url | string | The media URL to download. |
- Deprecated
- All-In-One support is no longer actively maintained.
- Source
If the URL is invalid or the request fails.
- Type
- Error
A JSON object containing media info.
- Type:
- Promise.<AioResponse>
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)); // JSONCJS
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(async, inner) capcut(url) → {Promise.<CapCutResponse>}
CapCut template downloader
| Name | Type | Description |
|---|---|---|
url | string | The CapCut template URL (e.g., https://www.capcut.com/template-detail/7299286607478181121) |
- Source
If the URL is invalid or the request fails.
- Type
- Error
A JSON object containing template video links and metadata.
- Type:
- Promise.<CapCutResponse>
ESM
import { capcut } from 'btch-downloader';
const url = 'https://www.capcut.com/template-detail/7299286607478181121';
capcut(url).then(data => console.log(data)).catch(err => console.error(err)); // JSONCJS
const { capcut } = require('btch-downloader');
const url = 'https://www.capcut.com/template-detail/7299286607478181121';
capcut(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON(async, inner) cocofun(url) → {Promise.<CocofunResponse>}
Cocofun content downloader
| Name | Type | Description |
|---|---|---|
url | string | The Cocofun post URL (e.g., https://www.icocofun.com/share/post/379250110809) |
- Source
If the URL is invalid or the request fails.
- Type
- Error
A JSON object containing media links and post metadata.
- Type:
- Promise.<CocofunResponse>
ESM
import { cocofun } from 'btch-downloader';
const url = 'https://www.icocofun.com/share/post/379250110809';
cocofun(url).then(data => console.log(data)).catch(err => console.error(err)); // JSONCJS
const { cocofun } = require('btch-downloader');
const url = 'https://www.icocofun.com/share/post/379250110809';
cocofun(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON(async, inner) douyin(url) → {Promise.<DouyinResponse>}
Douyin (抖音) downloader for videos and images
| Name | Type | Description |
|---|---|---|
url | string | The Douyin post URL (e.g., https://v.douyin.com/ikq8axJ/) |
- Source
If the URL is invalid or the request fails.
- Type
- Error
A JSON object containing media links and post metadata.
- Type:
- Promise.<DouyinResponse>
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)); // JSONCJS
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(async, inner) fbdown(url) → {Promise.<FacebookResponse>}
Facebook video downloader
| Name | Type | Description |
|---|---|---|
url | string | The Facebook video URL (e.g., https://www.facebook.com/watch/?v=1393572814172251) |
- Source
If the URL is invalid or the media is not accessible.
- Type
- Error
A JSON object containing Normal and HD quality download links.
- Type:
- Promise.<FacebookResponse>
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)); // JSONCJS
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(async, inner) gdrive(url) → {Promise.<GoogleDriveResponse>}
Google Drive file downloader
| Name | Type | Description |
|---|---|---|
url | string | The Google Drive file URL (e.g., https://drive.google.com/file/d/1thDYWcS5p5FFhzTpTev7RUv0VFnNQyZ4/view) |
- Source
If the URL is invalid or the file is not public.
- Type
- Error
A JSON object containing file metadata and download link.
- Type:
- Promise.<GoogleDriveResponse>
ESM
import { gdrive } from 'btch-downloader';
const url = 'https://drive.google.com/file/d/1thDYWcS5p5FFhzTpTev7RUv0VFnNQyZ4/view';
gdrive(url).then(data => console.log(data)).catch(err => console.error(err)); // JSONCJS
const { gdrive } = require('btch-downloader');
const url = 'https://drive.google.com/file/d/1thDYWcS5p5FFhzTpTev7RUv0VFnNQyZ4/view';
gdrive(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON(async, inner) igdl(url) → {Promise.<InstagramResponse>}
Instagram content downloader (Reels, Posts, TV, Stories)
| Name | Type | Description |
|---|---|---|
url | string | The Instagram media URL (e.g., https://www.instagram.com/reel/DKPtUL_S9Nh/?igsh=MTE1dTVkb2E4NTFmcw==) |
- Source
If the URL is invalid or the media is not accessible.
- Type
- Error
A JSON object containing an array of media items (links and thumbnails).
- Type:
- Promise.<InstagramResponse>
ESM
import { igdl } from 'btch-downloader';
const url = 'https://www.instagram.com/reel/DKPtUL_S9Nh/?igsh=MTE1dTVkb2E4NTFmcw==';
igdl(url).then(data => console.log(data)).catch(err => console.error(err)); // JSONCJS
const { igdl } = require('btch-downloader');
const url = 'https://www.instagram.com/reel/DKPtUL_S9Nh/?igsh=MTE1dTVkb2E4NTFmcw==';
igdl(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON(async, inner) kuaishou(url) → {Promise.<KuaishouResponse>}
Kuaishou (快手) video downloader
| Name | Type | Description |
|---|---|---|
url | string | The Kuaishou video URL (e.g., https://v.kuaishou.com/JT195ZHT) |
- Source
If the URL is invalid or the request fails.
- Type
- Error
A JSON object containing video metadata and download link.
- Type:
- Promise.<KuaishouResponse>
ESM
import { kuaishou } from 'btch-downloader';
const url = 'https://v.kuaishou.com/JT195ZHT';
kuaishou(url).then(data => console.log(data)).catch(err => console.error(err)); // JSONCJS
const { kuaishou } = require('btch-downloader');
const url = 'https://v.kuaishou.com/JT195ZHT';
kuaishou(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON(async, inner) mediafire(url) → {Promise.<MediaFireResponse>}
MediaFire file downloader
| Name | Type | Description |
|---|---|---|
url | string | The MediaFire file URL (e.g., https://www.mediafire.com/file/941xczxhn27qbby/GBWA_V12.25FF-By.SamMods-.apk/file) |
- Deprecated
- MediaFire support is no longer actively maintained.
- Source
If the URL is invalid or the request fails.
- Type
- Error
A JSON object containing file metadata and download link.
- Type:
- Promise.<MediaFireResponse>
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)); // JSONCJS
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(async, inner) pinterest(query) → {Promise.<PinterestResponse>}
Pinterest content downloader or search
| Name | Type | Description |
|---|---|---|
query | string | The Pinterest pin URL or a search query. |
- Source
If the input is invalid or the request fails.
- Type
- Error
A JSON object containing pin media or search results.
- Type:
- Promise.<PinterestResponse>
ESM (URL)
import { pinterest } from 'btch-downloader';
const url = 'https://pin.it/4CVodSq';
pinterest(url).then(data => console.log(data)).catch(err => console.error(err)); // JSONESM (Search)
import { pinterest } from 'btch-downloader';
const query = 'Zhao Lusi';
pinterest(query).then(data => console.log(data)).catch(err => console.error(err)); // JSONCJS (URL)
const { pinterest } = require('btch-downloader');
const url = 'https://pin.it/4CVodSq';
pinterest(url).then(data => console.log(data)).catch(err => console.error(err)); // JSONCJS (Search)
const { pinterest } = require('btch-downloader');
const query = 'Zhao Lusi';
pinterest(query).then(data => console.log(data)).catch(err => console.error(err)); // JSON(async, inner) snackvideo(url) → {Promise.<SnackVideoResponse>}
SnackVideo content downloader
| Name | Type | Description |
|---|---|---|
url | string | The SnackVideo post URL (e.g., https://s.snackvideo.com/p/j9jKr9dR) |
- Source
If the URL is invalid or the content is not accessible.
- Type
- Error
A JSON object containing video links and metadata.
- Type:
- Promise.<SnackVideoResponse>
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)); // JSONCJS
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(async, inner) soundcloud(url) → {Promise.<SoundCloudResponse>}
SoundCloud track downloader
| Name | Type | Description |
|---|---|---|
url | string | The SoundCloud track URL (e.g., https://soundcloud.com/issabella-marchelina/sisa-rasa-mahalini-official-audio) |
- Source
If the URL is invalid or the media is not accessible.
- Type
- Error
A JSON object containing track info and download links.
- Type:
- Promise.<SoundCloudResponse>
ESM
import { soundcloud } from 'btch-downloader';
const url = 'https://soundcloud.com/issabella-marchelina/sisa-rasa-mahalini-official-audio';
soundcloud(url).then(data => console.log(data)).catch(err => console.error(err)); // JSONCJS
const { soundcloud } = require('btch-downloader');
const url = 'https://soundcloud.com/issabella-marchelina/sisa-rasa-mahalini-official-audio';
soundcloud(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON(async, inner) spotify(url) → {Promise.<SpotifyResponse>}
Spotify track downloader
| Name | Type | Description |
|---|---|---|
url | string | The Spotify track URL (e.g., https://open.spotify.com/track/3zakx7RAwdkUQlOoQ7SJRt) |
- Source
If the URL is invalid or the request fails.
- Type
- Error
A JSON object containing track metadata and download links.
- Type:
- Promise.<SpotifyResponse>
ESM
import { spotify } from 'btch-downloader';
const url = 'https://open.spotify.com/track/3zakx7RAwdkUQlOoQ7SJRt';
spotify(url).then(data => console.log(data)).catch(err => console.error(err)); // JSONCJS
const { spotify } = require('btch-downloader');
const url = 'https://open.spotify.com/track/3zakx7RAwdkUQlOoQ7SJRt';
spotify(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON(async, inner) threads(url) → {Promise.<ThreadsResponse>}
Threads (by Instagram) content downloader
| Name | Type | Description |
|---|---|---|
url | string | The Threads post URL (e.g., https://www.threads.net/@cindyyuvia/post/C_Nqx3khgkI/) |
- Source
If the URL is invalid or the content is not accessible.
- Type
- Error
A JSON object containing media links and post metadata.
- Type:
- Promise.<ThreadsResponse>
ESM
import { threads } from 'btch-downloader';
const url = 'https://www.threads.net/@cindyyuvia/post/C_Nqx3khgkI/';
threads(url).then(data => console.log(data)).catch(err => console.error(err)); // JSONCJS
const { threads } = require('btch-downloader');
const url = 'https://www.threads.net/@cindyyuvia/post/C_Nqx3khgkI/';
threads(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON(async, inner) ttdl(url) → {Promise.<TikTokResponse>}
TikTok video downloader
| Name | Type | Description |
|---|---|---|
url | string | The TikTok video URL (e.g., https://www.tiktok.com/@omagadsus/video/7025456384175017243) |
- Source
If the URL is invalid or the request fails.
- Type
- Error
A JSON object containing video info, thumbnails, and download links.
- Type:
- Promise.<TikTokResponse>
ESM
import { ttdl } from 'btch-downloader';
const url = 'https://www.tiktok.com/@omagadsus/video/7025456384175017243';
ttdl(url).then(data => console.log(data)).catch(err => console.error(err)); // JSONCJS
const { ttdl } = require('btch-downloader');
const url = 'https://www.tiktok.com/@omagadsus/video/7025456384175017243';
ttdl(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON(async, inner) twitter(url) → {Promise.<TwitterResponse>}
Twitter (X) video downloader
| Name | Type | Description |
|---|---|---|
url | string | The Twitter/X video URL (e.g., https://twitter.com/gofoodindonesia/status/1229369819511709697) |
- Source
If the URL is invalid or the media is not accessible.
- Type
- Error
A JSON object containing the video title and download link.
- Type:
- Promise.<TwitterResponse>
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)); // JSONCJS
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(async, inner) xiaohongshu(url) → {Promise.<XiaohongshuResponse>}
Xiaohongshu (Little Red Book / 小红书) downloader
| Name | Type | Description |
|---|---|---|
url | string | The Xiaohongshu post URL (e.g., http://xhslink.com/o/21DKXV988zp) |
- Source
If the URL is invalid or the content is not accessible.
- Type
- Error
A JSON object containing image/video links and post metadata.
- Type:
- Promise.<XiaohongshuResponse>
ESM
import { xiaohongshu } from 'btch-downloader';
const url = 'http://xhslink.com/o/21DKXV988zp';
xiaohongshu(url).then(data => console.log(data)).catch(err => console.error(err)); // JSONCJS
const { xiaohongshu } = require('btch-downloader');
const url = 'http://xhslink.com/o/21DKXV988zp';
xiaohongshu(url).then(data => console.log(data)).catch(err => console.error(err)); // JSON(async, inner) youtube(url) → {Promise.<YouTubeResponse>}
YouTube video and audio downloader
| Name | Type | Description |
|---|---|---|
url | string | The YouTube video URL (e.g., https://youtu.be/C8mJ8943X80) |
- Source
If the URL is invalid or the request fails.
- Type
- Error
A JSON object containing video/audio download links, title, and thumbnail.
- Type:
- Promise.<YouTubeResponse>
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)); // JSONCJS
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(async, inner) yts(query) → {Promise.<YtsResponse>}
YouTube search engine
| Name | Type | Description |
|---|---|---|
query | string | The search query for YouTube videos (e.g., Somewhere Only We Know) |
- Source
If the request fails.
- Type
- Error
A JSON object containing a list of search results.
- Type:
- Promise.<YtsResponse>
ESM
import { yts } from 'btch-downloader';
const query = 'Somewhere Only We Know';
yts(query).then(data => console.log(data)).catch(err => console.error(err)); // JSONCJS
const { yts } = require('btch-downloader');
const query = 'Somewhere Only We Know';
yts(query).then(data => console.log(data)).catch(err => console.error(err)); // JSON