# Vyla SDK (`@vyla-entertainment/sdk`)

The official Node.js scraping and resolver library for movies, television series, subtitles, downloads, and manga.

Vyla SDK developer tools and multi-platform support ## Overview `@vyla-entertainment/sdk` is the core media resolver engine powering the entire Vyla ecosystem. Available as a pure ES Module for Node.js environments, the SDK aggregates over 60 streaming providers, extracts multi-language subtitle tracks, discovers direct download packages, and interfaces with manga archives. Whether you are building a custom backend API, an automated scraper pipeline, a command-line tool, or an embeddable player backend, the SDK provides a clean, typed JavaScript and TypeScript interface. --- ## Installation Install the package via npm, pnpm, or yarn: ```bash npm install @vyla-entertainment/sdk ``` ### System Requirements - **Node.js**: v20.0.0 or higher (ESM native) - **TMDB API Key (Optional but Recommended)**: Required for sources that query metadata by IMDb ID or episode titles. Obtain a free key from [The Movie Database](https://www.themoviedb.org/). --- ## SDK Capabilities | Functional Engine | Primary Methods | Output Data & Features | | :--- | :--- | :--- | | **Stream Engine** | `getStream()`, `getSources()`, `probeSource()` | Direct MP4 and adaptive HLS (`.m3u8`) links, quality tags, and verified playback flags. | | **Subtitle Parser** | `getSubtitles()` | Multi-language WebVTT (`.vtt`) and SubRip (`.srt`) track descriptors with language labels. | | **Download Engine** | `getDownloads()` | Direct high-speed download links, file sizes in bytes, and container specifications (MKV/MP4). | | **Manga Engine** | `searchManga()`, `getManga()`, `getMangaChapter()` | Titles, covers, chapter indexes, and image page URLs bypassing TLS fingerprint protection. | ### 1. Video Stream Resolution Queries active providers for direct MP4 and adaptive HLS streaming links based on TMDB movie or TV identifiers. ### 2. Multi-Language Subtitles Extracts clean `.vtt` and `.srt` subtitle tracks from multiple open subtitle providers, categorized by language label. ### 3. Media Downloads Resolves high-speed direct media download packages (including MKV containers with file size metadata). ### 4. Manga Discovery & Reading Features a dedicated manga scraping module leveraging `node-tls-client` with Chrome 131 TLS fingerprinting to search manga, view chapters, and retrieve high-resolution page assets. --- ## Quick Example ```javascript import VylaSDK from '@vyla-entertainment/sdk'; const sdk = new VylaSDK({ tmdbApiKey: process.env.TMDB_API_KEY }); const sources = sdk.getSources(true); console.log(`Active providers: ${sources.length}`); try { const stream = await sdk.getStream('vidlink', 155); console.log('Stream resolved:', stream.url); console.log('Format:', stream.type); } catch (err) { console.error('Resolution error:', err.message); } const subtitles = await sdk.getSubtitles(155); console.log(`Found ${subtitles.length} subtitle tracks`); ``` --- ## SDK Navigation - **[SDK Quickstart](/sdk/vyla-sdk/quickstart)**: Practical, step-by-step tutorial for resolving movies, TV episodes, and handling errors. - **[Complete API Reference](/sdk/vyla-sdk/reference)**: Exhaustive documentation of all classes, methods, parameters, and TypeScript types. - **[Manga Module Guide](/sdk/vyla-sdk/manga)**: Guide for manga search, chapter page extraction, and aspect-ratio rendering. - **[Contributing a Source](/sdk/vyla-sdk/contributing)**: How to author, test, and contribute a new provider scraper.