Unofficial Node.js client for the Torbox API. Provides a fully typed interface for interacting with Torbox's torrent, usenet, web download, and RSS services.
IMPORTANT This is a work in progress. It might be incomplete and some things haven't been tested yet, so it might be buggy.
- 🔒 Fully typed TypeScript API client
- 📦 Complete API coverage (torrents, usenet, web downloads, RSS)
- 🚀 Promise-based async methods
- 💪 Built-in TypeScript type definitions
- 🔄 Automatic request handling and error parsing
npm install node-torbox-apiimport { TorboxClient } from 'node-torbox-api';
const client = new TorboxClient({
apiKey: 'your-api-key',
baseURL: 'https://api.torbox.app' // Optional, defaults to this URL
});
// Example: Get user profile
const profile = await client.users.getProfile();
// Example: Create a torrent download
const torrent = await client.torrents.createTorrent({
magnet: 'magnet:?xt=urn:btih:...',
name: 'My Download'
});// Create a torrent download
await client.torrents.createTorrent({
magnet: 'magnet:?xt=urn:btih:...',
name: 'Optional Name'
});
// Get torrent list
const torrents = await client.torrents.getTorrentList();
// Control torrent
await client.torrents.controlTorrent(torrentId, 'pause');// Create web download
await client.web.createWebDownload({
url: 'https://example.com/file.zip',
name: 'Optional Name'
});
// Get download list
const downloads = await client.web.getDownloadList();// Create usenet download
await client.usenet.createUsenetDownload({
url: 'nzb-url',
name: 'Optional Name'
});
// Get usenet downloads
const usenetDownloads = await client.usenet.getDownloadList();// Add RSS feed
await client.rss.addRss({
url: 'https://example.com/feed.xml',
name: 'My Feed',
regex: '.*720p.*'
});// Get user profile
const profile = await client.users.getProfile();
// Refresh token
await client.users.refreshToken();All API methods return a standardized response format:
interface StandardResponse<T = any> {
success: boolean;
data?: T;
error?: string;
message?: string;
}try {
await client.torrents.createTorrent({
magnet: 'invalid-magnet'
});
} catch (error) {
console.error('API Error:', error.message);
}The module exports all TypeScript interfaces for use in your application:
TorrentInfoWebDownloadInfoUsenetDownloadInfoServerStatusNotification- And many more...
Apache-2.0
For support, please visit Torbox Support or open an issue on GitHub.