All Projects → serenader2014 → rarbg-api

serenader2014 / rarbg-api

Licence: MIT license
A simple node.js wrapper for rarbg.to api

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to rarbg-api

IMDb-Scout-Mod
Auto search for movie/series on torrent, usenet, ddl, subtitles, streaming, predb and other sites. Adds links to IMDb pages from hundreds various sites. Adds movies/series to Radarr/Sonarr. Adds external ratings from Metacritic, Rotten Tomatoes, Letterboxd, Douban, Allocine. Media Server indicators for Plex, Jellyfin, Emby. Dark theme/style for …
Stars: ✭ 177 (+742.86%)
Mutual labels:  torrent, bittorrent, rarbg
Cratetorrent
A BitTorrent V1 engine library for Rust (and currently Linux)
Stars: ✭ 233 (+1009.52%)
Mutual labels:  torrent, bittorrent
Magnetissimo
Web application that indexes all popular torrent sites, and saves it to the local database.
Stars: ✭ 2,551 (+12047.62%)
Mutual labels:  torrent, bittorrent
torrent-hound
Search torrents from multiple websites via the CLI
Stars: ✭ 28 (+33.33%)
Mutual labels:  torrent, bittorrent
PeerflixServerZH
🚀 Peerflix Server(BT) 汉化、美化
Stars: ✭ 32 (+52.38%)
Mutual labels:  torrent, bittorrent
Ipmagnet
Check which IP adresses your BitTorrent client is handing out to trackers
Stars: ✭ 200 (+852.38%)
Mutual labels:  torrent, bittorrent
mad-torrent
Delphi bittorrent protocol implementation
Stars: ✭ 30 (+42.86%)
Mutual labels:  torrent, bittorrent
Magnet Uri
Parse a magnet URI and return an object of keys/values
Stars: ✭ 183 (+771.43%)
Mutual labels:  torrent, bittorrent
torrent-webseed-creator
Webseeded torrent creator using GitHub Actions
Stars: ✭ 54 (+157.14%)
Mutual labels:  torrent, bittorrent
exatorrent
Easy to Use Torrent Client. Can be hosted in Cloud. Files can be streamed in Browser/Media Player.
Stars: ✭ 1,557 (+7314.29%)
Mutual labels:  torrent, bittorrent
bthello
Python3 DHT 磁力种子爬虫 种子解析 种子搜索 演示地址
Stars: ✭ 43 (+104.76%)
Mutual labels:  torrent, bittorrent
Vlc Bittorrent
A bittorrent plugin for VLC.
Stars: ✭ 198 (+842.86%)
Mutual labels:  torrent, bittorrent
Transgui
🧲 A feature rich cross platform Transmission BitTorrent client. Faster and has more functionality than the built-in web GUI.
Stars: ✭ 2,488 (+11747.62%)
Mutual labels:  torrent, bittorrent
bencode
PHP Bencode (BitTorrent) Encoder/Decoder
Stars: ✭ 19 (-9.52%)
Mutual labels:  torrent, bittorrent
Dht
dht is used by anacrolix/torrent, and is intended for use as a library in other projects both torrent related and otherwise
Stars: ✭ 184 (+776.19%)
Mutual labels:  torrent, bittorrent
porla
A high performance BitTorrent client for servers and seedboxes.
Stars: ✭ 83 (+295.24%)
Mutual labels:  torrent, bittorrent
Sickchill
Less rage, more chill.
Stars: ✭ 2,166 (+10214.29%)
Mutual labels:  torrent, rarbg
Biglybt Android
BiglyBT for Android, torrent client and remote control app
Stars: ✭ 180 (+757.14%)
Mutual labels:  torrent, bittorrent
Katastrophe
Command Line Tool to download torrents
Stars: ✭ 85 (+304.76%)
Mutual labels:  torrent, bittorrent
simple-torrent-android
A torrent client library for Android that utilizes frostwire-jlibtorrent. It supports sequential and simultaneous downloads.
Stars: ✭ 85 (+304.76%)
Mutual labels:  torrent, bittorrent

Rarbg.to API

This is an unofficial nodejs api wrapper for rarbg.to website.

Build Status npm module dependencies

Installation

First download this package from npm registry

npm i --save rarbg-api

and require it from your project:

const rarbgApi = require('rarbg-api')

Environment Flags

NODE_ENV

  • Can be set to debug to see debug messages and errors

LOCAL_ADDRESS

  • Can be set to a network interface ip address in order to send requests from that source
  • See http.request.options for more details

API

.list([options: Object]): Array

List torrent.

Parameters

Returns

The api returns a promise which will resolve a list of torrent.

.search(keyword[, options, type]): Array

Search torrent using a keyword.

Parameters

  • keyword

    • String

    Specify a keyword to search.

  • options

    • Object
    • Optional

    See additional options section

  • type

    • String
    • Optional

    Specify a search mode to use. Available type is: ['imdb', 'tvdb', 'themoviedb', 'tvrage']. If search type is provided, the search keyword is a specific id, for example, if you provide imdb search type, the keyword must be a imdb id. Eg: search('tt0944947', null, 'imdb').

Returns

The api returns a promise which will resolve the search result.

Additional options

Some of the apis support category filtering and sorting, and other options. All available options are:

  const defaultParams = {
    category: null,
    limit: 25,
    sort: 'last',
    min_seeders: null,
    min_leechers: null,
    format: 'json_extended',
    ranked: null,
  }

category

You can specify a category to filter the torrent. Category information can be imported by require('./index').CATEGORY. This options support an array.

Eg:

const rarbgApi = require('./index')

rarbgApi.list({
  category: rarbgApi.CATEGORY.MOVIES
}).then(data => console.log(data))

The above example will list latest movie torrents.

4K Support

const rarbgApi = require('./index')

rarbgApi.list({
  category: rarbgApi.CATEGORY['4K']
}).then(data => console.log(data))

The above example will list latest 4K movie torrents.

limit

Limit the result torrent's size. Default size is 25, all supported options are: 25, 50, 100

Eg:

const rarbgApi = require('./index')

rarbgApi.list({
  limit: 50
}).then(data => console.log(data.length))

sort

Specify the sorting. Default sorting is last. Available options are: last, seeders, leechers

Eg:

const rarbgApi = require('./index')

rarbgApi.list({
  sort: 'seeders'
}).then(data => console.log(data))

min_seeders, min_leechers

Filtering the torrent by specify the torrent's minimal seeders or minimal leechers. It's value is a number. Default is null.

Eg:

const rarbgApi = require('./index')
rarbgApi.list({
  min_seeders: 100
}).then(data => console.log(data))

format

Specify which format will the api returns. Default is json_extended, which will include the detail infomations of each torrent. Other supported option is json.

The json_extended format is:

{ 
    "title": "Logan.2017.1080p.WEB-DL.DD5.1.H264-FGT",
    "category": "Movies/x264/1080",
    "download": "magnet:?xt=urn:btih:d2d6a72b60cdb2cc5e80d3277d89d5df18c3ecbc&dn=Logan.2017.1080p.WEB-DL.DD5.1.H264-FGT&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2710&tr=udp%3A%2F%2F9.rarbg.to%3A2710&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce",
    "seeders": 848,
    "leechers": 116,
    "size": 5100226269,
    "pubdate": "2017-05-15 09:37:27 +0000",
    "episode_info": { 
        "imdb": "tt3315342",
        "tvrage": null,
        "tvdb": null,
        "themoviedb": "263115" 
    }
}

The json format is:

{
    "filename": "Real.Time.With.Bill.Maher.2017.06.09.1080p.WEB.h264-TBS[rartv]",
    "category": "TV HD Episodes",
    "download": "magnet:?xt=urn:btih:f6afb0028270ccca6d4535be4c42a0583a5a5737&dn=Real.Time.With.Bill.Maher.2017.06.09.1080p.WEB.h264-TBS%5Brartv%5D&tr=http%3A%2F%2Ftracker.trackerfix.com%3A80%2Fannounce&tr=udp%3A%2F%2F9.rarbg.me%3A2710&tr=udp%3A%2F%2F9.rarbg.to%3A2710&tr=udp%3A%2F%2Fopen.demonii.com%3A1337%2Fannounce"
}

ranked

By default the api will return only ranked torrents ( internal ) , scene releases + -rarbg releases + -rartv releases.

If you want other groups included in the results use the ranked parameter with a value of 0 to get them included.

Test

Clone this project, and install the dependencies npm i, npm run build and run npm run test to see the test result.

Note that sometimes the test will fail because of the network problem. Currently all the tests timeout is 60000ms, if your network is poor, you may encounter test timeout error.

Limitation

Due to the rarbg api's limitation, you may encounter error like:

{
  "error": "Too many requests per second. Maximum requests allowed are 1req/2sec Please try again later!",
  "error_code": 5
}

The api is limit to 1req/2sec, so you should control the frequency.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].