rarbgto-api

API to search for torrent files on rarbg.to website


Keywords
torrent, api, rarbg
License
MIT
Install
npm install rarbgto-api@3.0.3

Documentation

rarbgto-api

API to search for torrent files on Rarbg website.

Installation

Like every other npm package, run the command npm install rarbgto-api

Usage example

Search torrent files for South Park season 19 episode 6.

var rarbgToApi = require('rarbgto-api');
rarbgToApi.search('South Park S19E06', { category: 'tv' }).then(torrentList => {
    torrentList.forEach(torrentInfo => console.log(torrentInfo));
});

API functions

rarbgToApi.search(searchString[, categories])

Search and return the list of torrent files found by rarbg.to.

The list is limited to the first page of results, 25 items max. It is sorted by seeds count in descending order.

Parameters

  • searchString: The search string
  • options (optional): Object containing following optional keys
    • page (optional): Integer. Query a specific page of results. Default 1.
    • order (optional): String. filename, size, seeders, leechers, data for date added. Default data.
    • by (optional): String. ASC or DESC. Default DESC
    • category (optional): String or Array of strings. Limit search to one or more categories. Default not specified, search in all categories.

Category list is the following: tv, movies, xxx, games, music, software, nonxxx, ebooks.

Note: As in the website, nonxxx does not include ebooks.

Return value

Returns a promise which is resolved when the search is complete.

This promise returns a list of objects containing the rarbg torrent unique id, title, filename, seeds count and torrent file download url.