Skip to content

Unofficial API (backend) for RuTracker, Kinozal, RuTor and NoNameClub for receiving torrent files and detailed information about distribution by movie title, TV series or id, and also provides RSS news feed for all providers.

License

Notifications You must be signed in to change notification settings

Lifailon/TorAPI

Repository files navigation

Image alt


Unofficial API (backend) for RuTracker, Kinozal, RuTor and NoNameClub for receiving torrent files and detailed information about distribution by movie title, TV series or id, and also provides RSS news feed for all providers.

This project is inspired by ✨ Torrents-Api for Russian-speaking torrent providers.

👉 You can try the open and free version, which is published on 🔼 Vercel. OpenAPI specification is available on the official Swagger Hub website.

A simple implementation of the interface (frontend) is implemented in the OpenKinoposik extension for Google Chrome.

Implemented:

  • Search by title to get all available distributions from a specified torrent tracker (its ID and brief information with a link to download the torrent file) or from all trackers at once.
  • Search by ID of the specified provider to get additional information: hash for direct download via torrent-client, links to Kinopoisk and IMDb databases, detailed description of the movie or series, as well as the content of the torrent-distribution.
  • Get RSS news feeds from all used providers in XML and also JSON formats.

You can see examples of requests and responses in the static documentation posted on GitHub Wiki. Documentation in Russian language is available on GitHub Page.


🔗 Full list of available providers:

Provider name Mirrors Registration Search by ID RSS
RuTracker 3 Yes* Yes Native
Kinozal 3 Yes* Yes Native
RuTor 2 No Yes Custom
NoNameClub 1 No Yes Native

* Registration is required only when downloading a torrent file via a direct link. All distributions when searching by ID contain hash (cookies have already been added) and magnet links (containing a list of trackers), which allow you to download the contents of the distribution or generate a torrent file using any torrent client after downloading the metadata.

The RSS feed is accessed by redirecting the original feed. For providers that do not support RSS by default, a custom news feed has been implemented from the main page.


🚀 Deploy

You can deploy your own public API to Vercel from this repository, just click the button below and follow the instructions:

Vercel

🐳 Docker

Docker Hub

The project uses GitHub Actions workflows to build the Docker container and automatically test the functionality of all endpoints.

Run

Upload the image and run the container from the Docker Hub:

docker run -d --name TorAPI -p 8443:8443 --restart=unless-stopped lifailon/torapi:latest

If you are using a proxy server:

docker run -d --name TorAPI -p 8443:8443 --restart=unless-stopped \
  -e PROXY_ADDRESS="192.168.3.100" \
  -e PROXY_PORT="9090" \
  -e USERNAME="TorAPI" \
  -e PASSWORD="TorAPI" \
  lifailon/torapi:latest

Compose

You can download and use the docker-compose file to build the container from Docker Hub:

curl -sO https://github.com/raw/Lifailon/TorAPI/main/docker-compose.yml
curl -sO https://github.com/raw/Lifailon/TorAPI/main/.env.yml

Edit the environment variables file .env and build the container:

docker-compose up -d

Dockerfile

You can use project files to build from dockerfile:

git clone https://github.com/Lifailon/TorAPI
cd TorAPI

When using a proxy, edit the variables in dockerfile:

ENV PROXY_ADDRESS="192.168.3.100"
ENV PROXY_PORT="9090"
ENV USERNAME="TorAPI"
ENV PASSWORD="TorAPI"

Build the image and run the container:

docker build -t torapi .
docker run -d --name TorAPI -p 8443:8443 --restart=unless-stopped torapi

🔨 Install

Clone the repository, install dependencies and start the server:

git clone https://github.com/Lifailon/TorAPI
cd TorAPI
npm install
npm start

By default, the server will be launched on port 8443.

You can specify a different port:

npm start -- --port 2024

To dev, use run in nodemon mode:

npm run dev

📚 Documentation is available in the Swagger UI at: http://localhost:8443/docs

To create up-to-date or update Swagger documentation files in JSON and YAML format, use the command:

npm run docs

Proxy

Use a proxy for all requests:

npm start -- --port 2024 --proxyAddress 192.168.3.100 --proxyPort 9090

If authorization on a proxy server is required:

npm start -- --port 2024 --proxyAddress 192.168.3.100 --proxyPort 9090 --username TorAPI --password TorAPI

🧪 Tests

You can run testing to quickly check the health of all endpoints in the console:

npm start -- --test

During testing, a local server is started, a request is made to the /api/provider/test endpoint, and the server terminates.

Change header parameter in request:

npm start -- --test --q "The Rookie"

Other projects:

  • 🧲 Telegram bot for Kinozal - that implements remote control of the qBittorrent and Transmission torrent client, interface for the Kinozal torrent tracker and synchronization of downloaded media content with Plex Media Server.

  • ❤️ WebTorrent Desktop api - branch (fork) of the original version of WebTorrent Desktop, which add a remote control mechanism via the REST API on base Express Framework.

  • 📡 Reverse Proxy .NET - cross-platform command line utility for implementing a .NET-based reverse proxy. It is used to provide access to hosts from one network interface to remote applications via TCP, UDP or HTTP/HTTPS protocols accessible through another network interface without unnecessary settings and with authorization support.

About

Unofficial API (backend) for RuTracker, Kinozal, RuTor and NoNameClub for receiving torrent files and detailed information about distribution by movie title, TV series or id, and also provides RSS news feed for all providers.

Topics

Resources

License

Stars

Watchers

Forks