Main API

Number of APIs: 43

Full documentation for TorBox

Current API Base: https://api.torbox.app

Current API Version: v1

You can find more API docs here: http://api.torbox.app/docs (they aren't as great as these, but is in a format most people would be familiar to).

General Information

  • You can rely on both success booleans or status codes to determine if a call was a success. Status code 200 always means a success. 403 means authentication error. 500 means something went wrong on TorBox's end. 400 means the user did something wrong, or an input wasn't correct, or expected.

  • There will always be a user-friendly message in detail for a reason why a call was a failure, or a success message. You may forward these directly to users.

  • The /usenet and the /webdl API endpoints are nearly the same as the /torrents API endpoints apart from some different named inputs and outputs.

  • All outputs are JSON unless otherwise specified. Check out the examples to be sure.

Rate Limits

  • Unless stated below, all endpoints are rate limited to 5/sec per IP, no edge rate limiting.

  • POST /torrents/createtorrent is rate limited to 60/hour per IP and 10/min at edge.

  • POST /usenet/createusenetdownload is rate limited to 60/hour per IP and 10/min at edge.

  • POST /webdl/createwebdownload is rate limited to 60/hour per IP and 10/min at edge.

  • If you have a specific application, please contact us with your IP and reason to get unlimited requests.

Standard Response

{
    "success": boolean, // whether a response is successful or not
    "error": string, // an error code if there was an error, or null if success
    "detail": string, // a user-friendly message
    "data": any // usually an object/dict, but can be anything, check the examples
}

Errors Table

Errors codes are part of the standard response type. If the code ends in ERROR, the error is the server's fault else that error is something that the client caused.

Error CodeError Meaning
DATABASE_ERRORCould not access internal database/memory store information.
UNKNOWN_ERRORThe reason for the error is unknown. Usually there will be error data attached in the data key. In these cases please report the request to contact@torbox.app.
NO_AUTHThere are no provided credentials.
BAD_TOKENThe provided token is invalid.
AUTH_ERRORThere was an error verifying the given authentication.
INVALID_OPTIONThe provided option is invalid.
REDIRECT_ERRORThe server tried redirecting, but it faulted.
OAUTHVERIFICATIONERRORThe server tried verifying your OAuth token, but it was not accepted by the provider.
ENDPOINTNOTFOUNDIf you have hit an endpoint that doesn't exist.
ITEMNOTFOUNDThe item you queried cannot be found.
PLANRESTRICTEDFEATUREThis feature is restricted to users of higher plans. The user is recommended to upgrade their plan to use this endpoint.
DUPLICATE_ITEMThis item already exists.
BOZORSSFEEDThis RSS feed is invalid or not a well-formed XML.
SELLIX_ERRORThere was an error with the Sellix API. Usually in the case of payments.
TOOMUCHDATAClient sent too much data to the API. Please keep requests under 100MB in size.
DOWNLOADTOOLARGEThis download is oversized for the user's plan. The user is recommended to upgrade their plan to download this file.

Free Plan Limit: 10737418240 bytes
Essential Plan Limit: 214748364800 bytes
Standard Plan Limit: 214748364800 bytes
Pro Plan Limit: 536870912000 bytes
MISSINGREQUIREDOPTIONThe API is missing required information to process the request.
TOOMANYOPTIONSClient sent too many options. Usually this has to do with the API requiring only 1 option but the client sent more than the required.
BOZO_TORRENTThe torrent sent is not a valid torrent.
NOSERVERSAVAILABLE_ERRORThere are no download servers available to handle this request. This should never happen. If you receieve this error, please contact us at contact@torbox.app.
MONTHLY_LIMITUser has hit the maximum monthly limit. It is recommended user upgrade their account to be able to download more.
COOLDOWN_LIMITUser is on download cooldown. It is recommended user upgrade their account to be able to bypass this restriction.
ACTIVE_LIMITUser has hit their max active download limit. It is recommended user upgrade their account or purchase addons to bypass this restriction.
DOWNLOADSERVERERRORThere was an error interacting with the download on the download server. It is recommdned to simply wait some time before trying again.
BOZO_NZBThe NZB sent is not a valid NZB file.
SEARCH_ERRORThere was an error searching using the TorBox Search API.
INVALID_DEVICEThe client is sending requests from the incorrect device.
DIFF_ISSUEThe request parameters sent does not allow for this request to complete.
LINK_OFFLINEThe link given is inaccessible or has no online files.
VENDOR_DISABLEDThis vendor account has been disabled. Please contact support.
BOZO_REGEXThe regex you entered is bad.
BAD_CONFIRMATIONThe confirmation code you have given is invalid.
CONFIRMATION_EXPIREDThe confirmation code you have given is expired. Request a new code.

Translation to Real-Debrid API

Useful for if you want to add TorBox to an app where Real-Debrid is already existing. These are the API routes that are nearly the same with Real-Debrid API routes. You will have to change things such as parameters and check outputs as they both are not the same. You can find docs to Real-Debrid's API here.

Real-Debrid API RoutesTorBox API Routes
GET /torrentsGET /torrents/mylist
GET /torrents/info/{id}GET /torrents/mylist?id={id}
GET /torrents/instantAvailability/{hash}GET /torrents/checkcached
PUT /torrents/addTorrentPOST /torrents/createtorrent
POST /torrents/addMagnetPOST /torrents/createtorrent
POST /torrents/selectFiles/{id}None, not needed. Torrents will download all files. This will not be changed.
DELETE /torrents/delete/{id}POST /torrents/controltorrent
POST /unrestrict/linkGET /torrents/requestdl

Dates

All dates returned from the API are normalized to UTC time. All dates are in the format:

%Y-%m-%dT%H:%M:%SZ

Example: 2024-10-21T20:47:03Z = The 21st of October, 2024 at 8:47:03 PM UTC.

This makes it easy for users and integrations to parse these dates and change them to the user's time zone for better UX. For more information on these formats, you can take a look at this cheat sheet.

  1. Torrents - Create Torrent POST {{api_base}}/{{api_version}}/api/torrents/createtorrent

  2. Torrents - Control Torrent POST {{api_base}}/{{api_version}}/api/torrents/controltorrent

  3. Torrents - Control Queued Torrent POST {{api_base}}/{{api_version}}/api/torrents/controlqueued

  4. Torrents - Request Download Link GET {{api_base}}/{{api_version}}/api/torrents/requestdl?token={{api_key}}&torrent_id={{torrent_id}}&file_id={{torrent_file_id}}&zip_link=boolean&torrent_file=boolean&user_ip=string

  5. Torrents - Get Torrent List GET {{api_base}}/{{api_version}}/api/torrents/mylist?bypass_cache=boolean&id=integer&offset=integer&limit=integer

  6. Torrents - Get Torrent Cached Availability GET {{api_base}}/{{api_version}}/api/torrents/checkcached?hash={{torrent_hash}}&format=object&list_files=boolean

  7. Torrents - Search All Torrents From Scraper GET {{api_base}}/{{api_version}}/api/torrents/search?query={{search_query}}

  8. Torrents - Export Torrent Data GET {{api_base}}/{{api_version}}/api/torrents/exportdata?torrent_id=int&type=str

  9. Torrents - Get Torrent Info GET {{api_base}}/{{api_version}}/api/torrents/torrentinfo?hash=string&timeout=integer

  10. Torrents - Get Queued Torrents GET {{api_base}}/{{api_version}}/api/torrents/getqueued