An advanced, unofficial Node.js API-library for the HDRezka. This scraper and parser allows you to programmatically access movies, series, and user data with a clean, promise-based interface.
- Modern Tech Stack: Leverages
got
for robust HTTP requests,cheerio
for efficient HTML parsing, andtough-cookie
for session management. - Typed API: Fully typed with TypeScript for a superior developer experience and code safety.
- Comprehensive Parsing: Access various content types including movies, series, persons, genres, and comments.
- Authentication: Built-in support for user login and authenticated requests.
- Structured Data: Returns clean, predictable JSON objects for all parsed content.
- Extensible: Designed with a modular architecture that is easy to extend.
This library is designed to be used with Bun.
bun add rezka.js
import { Scraper, Genre } from 'rezka.js';
const scraper = new Scraper();
To perform user-specific actions, you must first authenticate.
const loginResult = await scraper.auth.login('your-email', 'your-password');
if (loginResult.success) {
const profile = await scraper.auth.getProfile();
console.log('User Profile:', profile);
}
Retrieve comprehensive details using a URL (recommended) or an ID.
// Get movie details
const movieDetails = await scraper.movie.get('https://rezka.ag/films/fiction/123-the-matrix.html');
console.log('Movie Title:', movieDetails.title);
// Get person details
const personDetails = await scraper.person.get('https://rezka.ag/actors/11-keanu-reeves/');
console.log('Person Name:', personDetails.name);
Get direct stream URLs for a specific episode. This requires the id
and translatorId
from the movieDetails
object.
const streams = await scraper.stream.get(movieDetails.id, movieDetails.translators[0].id, 1, 1);
console.log('Video Streams:', streams);
Fetch lists of movies, series, cartoons, or anime.
const series = await scraper.movies.get({ genre: Genre.SERIES, page: 1 });
console.log('Latest Series:', series.data);
Find content by a query string.
const searchResults = await scraper.search.get({ query: 'The Matrix' });
console.log('Search Results:', searchResults.data);
Retrieve the "continue watching" list for an authenticated user.
const continueWatching = await scraper.continue.extract();
console.log('Continue Watching:', continueWatching);
Fetch comments for a specific movie.
const comments = await scraper.comments.get(movieDetails.id, 1);
console.log('Comments:', comments.data);
For a complete and detailed API reference, please see the generated TypeDoc documentation.
Contributions are welcome! Please see the Contributing Guide for details on how to get started.
Important
This library is an unofficial tool and is not affiliated with, endorsed, or sponsored by HDRezka. It is intended for educational and personal use only. The data scraped belongs to the respective content owners. Please respect the terms of service of the website and use this tool responsibly. The developers of this library are not responsible for any misuse.