savecategory
This WebUI API documentation applies to qBittorrent v4.1+. For other WebUI API versions, visit WebUI API .
api/vX/
(where X is API major version)
hashes
field to
/torrents/info
(
#8782
)
/torrents/setShareLimits/
method (
#8598
)
/torrents/reannounce
method (
#9229
)
/sync/maindata
categories
field from
array
to
object
(
#9228
)
savePath
field to
/torrents/createCategory
(
#9228
). This method now requires the category to already exist and will not create new categories.
/torrents/editCategory
method (
#9228
)
/torrents/categories
method (
#9586
)
/search/
methods (
#8584
)
free_space_on_disk
field to
/sync/maindata
(
#8217
)
/torrents/editTracker
and
/torrents/removeTracker
methods (
#9375
)
tier
,
num_seeds
,
num_leeches
, and
num_downloaded
fields to
/torrents/trackers
(
#9375
)
status
field from translated string to an integer for
/torrents/trackers
(
#9375
)
/torrents/filePrio
id
field to accept multiple ids (
#9541
)
/torrents/filePrio
(
#9541
)
autoTMM
field to
/torrents/add
(
#9752
)
/app/getPreferences
and
/app/setPreferences
(
create_subfolder_enabled
,
start_paused_enabled
,
auto_delete_mode
,
preallocate_all
,
incomplete_files_ext
,
auto_tmm_enabled
,
torrent_changed_tmm_enabled
,
save_path_changed_tmm_enabled
,
category_changed_tmm_enabled
,
mail_notification_sender
,
limit_lan_peers
,
slow_torrent_dl_rate_threshold
,
slow_torrent_ul_rate_threshold
,
slow_torrent_inactive_timer
,
alternative_webui_enabled
,
alternative_webui_path
) (
#9752
)
rss/refreshItem
(
#11067
)
web_ui_password
field from
/app/preferences
, this field is still writable in
/app/setPreferences
method (
#9942
)
/app/buildInfo
method (
#10096
)
/
as path separator in
/torrents/files
response (
#10153
)
/torrents/addPeers
and
/transfer/banPeers
methods (
#10158
)
/torrents/addTags
,
/torrents/removeTags
,
/torrents/tags
,
/torrents/createTags
,
/torrents/deleteTags
methods (
#10527
)
/torrents/renameFile
method (
#11029
)
stalled
,
stalled_uploading
and
stalled_downloading
as possible values for the
filter
parameter in
/torrents/info
(
#11825
)
/app/preferences
and
/app/setPreferences
(
piece_extent_affinity
,
web_ui_secure_cookie_enabled
,
web_ui_max_auth_fail_count
,
web_ui_ban_duration
,
stop_tracker_timeout
) (
#11781
,
#11726
,
#12004
,
#11834
)
enable_super_seeding
as fields from
/app/preferences
and
/app/setPreferences
(
#12423
)
web_ui_use_custom_http_headers_enabled
,
web_ui_custom_http_headers
,
rss_download_repack_proper_episodes
and
rss_smart_episode_filters
as fields to
/app/preferences
and
/app/setPreferences
(
#12579
,
#12549
)
/rss/markAsRead
and
/rss/matchingArticles
methods (
#12549
)
/search/categories
method and modified
/search/plugins
method's response (
#12705
)
contentPath
via the
content_path
field in the response to
/torrents/info
(
#13625
)
tags
optional field to
/torrents/add
(
#13882
)
/torrents/renameFolder
method and modified
/torrents/renameFile
method's parameters (
#13995
)
Note that this change was released in qBittorrent v4.3.3, but the WebAPI version was incorrectly set to v2.7.0 (see #14275 for details)
ratioLimit
and
seedingTimeLimit
optional fields to
/torrents/add
(
#14519
)
seeding_time
field to
/torrents/info
(
#14554
)
indexes
optional parameter to
/torrents/files
(
#14795
)
index
field to
/torrents/files
response (
#14795
)
tag
optional parameter to
/torrents/info
(
#15152
)
/api/v2/APIName/methodName
, where
APIName
is a certain subgroup of API methods whose functionality is related.
GET
or
POST
methods. Use
POST
when you are mutating some state (or when your request is too big to fit into
GET
) and use
GET
otherwise. Starting with qBittorrent v4.4.4, server will return
405 Method Not Allowed
when you used the wrong request method.
/api/v2/auth/login
, obviously).
All Authentication API methods are under "auth", e.g.:
/api/v2/auth/methodName
.
qBittorrent uses cookie-based authentication.
Name:
login
Parameters:
Parameter DescriptionUpon success, the response will contain a cookie with your SID. You must supply the cookie whenever you want to perform an operation that requires authentication.
Example showing how to login and execute a command that requires authentication using
curl
:
$ curl -i --header 'Referer: http://localhost:8080' --data 'username=admin&password=adminadmin' http://localhost:8080/api/v2/auth/login
HTTP/1.1 200 OK
Content-Encoding:
Content-Length: 3
Content-Type: text/plain; charset=UTF-8
Set-Cookie: SID=hBc7TxF76ERhvIw0jQQ4LZ7Z1jQUV0tQ; path=/
$ curl http://localhost:8080/api/v2/torrents/info --cookie "SID=hBc7TxF76ERhvIw0jQQ4LZ7Z1jQUV0tQ"
Note: Set
Referer
or
Origin
header to the exact same domain and port as used in the HTTP query
Host
header.
Name:
logout
Parameters:
Returns:
HTTP Status Code Scenario
All Application API methods are under "app", e.g.:
/api/v2/app/methodName
.
Name:
version
Parameters:
Returns:
HTTP Status Code Scenario
The response is a string with the application version, e.g.
v4.1.3
Name:
webapiVersion
Parameters:
Returns:
HTTP Status Code ScenarioThe response is a JSON object with several fields (key-value) pairs representing the application's settings. The contents may vary depending on which settings are present in qBittorrent.ini.
Possible fields:
Property Description
torrent_changed_tmm_enabled
True if torrent should be relocated when its Category changes
save_path_changed_tmm_enabled
True if torrent should be relocated when the default save path changes
category_changed_tmm_enabled
True if torrent should be relocated when its Category's save path changes
save_path
string
Default save path for torrents, separated by slashes
temp_path_enabled
True if folder for incomplete torrents is enabled
temp_path
string
Path for incomplete torrents, separated by slashes
scan_dirs
object
Property: directory to watch for torrent files, value: where torrents loaded from this directory should be downloaded to (see list of possible values below). Slashes are used as path separators; multiple key/value pairs can be specified
export_dir
string
Path to directory to copy .torrent files to. Slashes are used as path separators
export_dir_fin
string
Path to directory to copy .torrent files of completed downloads to. Slashes are used as path separators
mail_notification_enabled
True if e-mail notification should be enabled
mail_notification_sender
string
e-mail where notifications should originate from
mail_notification_email
string
e-mail to send notifications to
mail_notification_smtp
string
smtp server for e-mail notifications
mail_notification_ssl_enabled
True if smtp server requires SSL connection
mail_notification_auth_enabled
True if smtp server requires authentication
mail_notification_username
string
Username for smtp authentication
mail_notification_password
string
Password for smtp authentication
autorun_enabled
True if external program should be run after torrent has finished downloading
autorun_program
string
Program path/name/arguments to run if
autorun_enabled
is enabled; path is separated by slashes; you can use
%f
and
%n
arguments, which will be expanded by qBittorent as path_to_torrent_file and torrent_name (from the GUI; not the .torrent file name) respectively
queueing_enabled
True if torrent queuing is enabled
max_active_downloads
integer
Maximum number of active simultaneous downloads
max_active_torrents
integer
Maximum number of active simultaneous downloads and uploads
max_active_uploads
integer
Maximum number of active simultaneous uploads
dont_count_slow_torrents
If true torrents w/o any activity (stalled ones) will not be counted towards
max_active_*
limits; see
dont_count_slow_torrents
for more information
slow_torrent_dl_rate_threshold
integer
Download rate in KiB/s for a torrent to be considered "slow"
slow_torrent_ul_rate_threshold
integer
Upload rate in KiB/s for a torrent to be considered "slow"
slow_torrent_inactive_timer
integer
Seconds a torrent should be inactive before considered "slow"
max_ratio_enabled
True if share ratio limit is enabled
max_ratio
float
Get the global share ratio limit
max_ratio_act
integer
Action performed when a torrent reaches the maximum share ratio. See list of possible values here below.
listen_port
integer
Port for incoming connections
True if UPnP/NAT-PMP is enabled
random_port
True if the port is randomly selected
dl_limit
integer
Global download speed limit in KiB/s;
-1
means no limit is applied
up_limit
integer
Global upload speed limit in KiB/s;
-1
means no limit is applied
max_connec
integer
Maximum global number of simultaneous connections
max_connec_per_torrent
integer
Maximum number of simultaneous connections per torrent
max_uploads
integer
Maximum number of upload slots
max_uploads_per_torrent
integer
Maximum number of upload slots per torrent
stop_tracker_timeout
integer
Timeout in seconds for a
stopped
announce request to trackers
enable_piece_extent_affinity
True if the advanced libtorrent option
piece_extent_affinity
is enabled
bittorrent_protocol
integer
Bittorrent Protocol to use (see list of possible values below)
limit_utp_rate
True if
[du]l_limit
should be applied to uTP connections; this option is only available in qBittorent built against libtorrent version 0.16.X and higher
limit_tcp_overhead
True if
[du]l_limit
should be applied to estimated TCP overhead (service data: e.g. packet headers)
limit_lan_peers
True if
[du]l_limit
should be applied to peers on the LAN
alt_dl_limit
integer
Alternative global download speed limit in KiB/s
alt_up_limit
integer
Alternative global upload speed limit in KiB/s
scheduler_enabled
True if alternative limits should be applied according to schedule
schedule_from_hour
integer
Scheduler starting hour
schedule_from_min
integer
Scheduler starting minute
schedule_to_hour
integer
Scheduler ending hour
schedule_to_min
integer
Scheduler ending minute
scheduler_days
integer
Scheduler days. See possible values here below
True if DHT is enabled
True if PeX is enabled
True if LSD is enabled
encryption
integer
See list of possible values here below
anonymous_mode
If true anonymous mode will be enabled; read more
here
; this option is only available in qBittorent built against libtorrent version 0.16.X and higher
proxy_type
integer
See list of possible values here below
proxy_ip
string
Proxy IP address or domain name
proxy_port
integer
Proxy port
proxy_peer_connections
True if peer and web seed connections should be proxified; this option will have any effect only in qBittorent built against libtorrent version 0.16.X and higher
proxy_auth_enabled
True proxy requires authentication; doesn't apply to SOCKS4 proxies
proxy_username
string
Username for proxy authentication
proxy_password
string
Password for proxy authentication
proxy_torrents_only
True if proxy is only used for torrents
ip_filter_enabled
True if external IP filter should be enabled
ip_filter_path
string
Path to IP filter file (.dat, .p2p, .p2b files are supported); path is separated by slashes
ip_filter_trackers
True if IP filters are applied to trackers
web_ui_domain_list
string
Comma-separated list of domains to accept when performing Host header validation
web_ui_address
string
IP address to use for the WebUI
web_ui_port
integer
WebUI port
web_ui_upnp
True if UPnP is used for the WebUI port
web_ui_username
string
WebUI username
web_ui_password
string
For API ≥ v2.3.0: Plaintext WebUI password, not readable, write-only. For API < v2.3.0: MD5 hash of WebUI password, hash is generated from the following string:
username:Web UI Access:plain_text_web_ui_password
web_ui_csrf_protection_enabled
True if WebUI CSRF protection is enabled
web_ui_clickjacking_protection_enabled
True if WebUI clickjacking protection is enabled
web_ui_secure_cookie_enabled
True if WebUI cookie
Secure
flag is enabled
web_ui_max_auth_fail_count
integer
Maximum number of authentication failures before WebUI access ban
web_ui_ban_duration
integer
WebUI access ban duration in seconds
web_ui_session_timeout
integer
Seconds until WebUI is automatically signed off
web_ui_host_header_validation_enabled
True if WebUI host header validation is enabled
bypass_local_auth
True if authentication challenge for loopback address (127.0.0.1) should be disabled
bypass_auth_subnet_whitelist_enabled
True if webui authentication should be bypassed for clients whose ip resides within (at least) one of the subnets on the whitelist
bypass_auth_subnet_whitelist
string
(White)list of ipv4/ipv6 subnets for which webui authentication should be bypassed; list entries are separated by commas
alternative_webui_enabled
True if an alternative WebUI should be used
alternative_webui_path
string
File path to the alternative WebUI
use_https
True if WebUI HTTPS access is enabled
ssl_key
string
For API < v2.0.1: SSL keyfile contents (this is a not a path)
ssl_cert
string
For API < v2.0.1: SSL certificate contents (this is a not a path)
web_ui_https_key_path
string
For API ≥ v2.0.1: Path to SSL keyfile
web_ui_https_cert_path
string
For API ≥ v2.0.1: Path to SSL certificate
dyndns_enabled
True if server DNS should be updated dynamically
dyndns_service
integer
See list of possible values here below
dyndns_username
string
Username for DDNS service
dyndns_password
string
Password for DDNS service
dyndns_domain
string
Your DDNS domain name
rss_refresh_interval
integer
RSS refresh interval
rss_max_articles_per_feed
integer
Max stored articles per RSS feed
rss_processing_enabled
Enable processing of RSS feeds
rss_auto_downloading_enabled
Enable auto-downloading of torrents from the RSS feeds
rss_download_repack_proper_episodes
For API ≥ v2.5.1: Enable downloading of repack/proper Episodes
rss_smart_episode_filters
string
For API ≥ v2.5.1: List of RSS Smart Episode Filters
add_trackers_enabled
Enable automatic adding of trackers to new torrents
add_trackers
string
List of trackers to add to new torrent
web_ui_use_custom_http_headers_enabled
For API ≥ v2.5.1: Enable custom http headers
web_ui_custom_http_headers
string
For API ≥ v2.5.1: List of custom http headers
max_seeding_time_enabled
True enables max seeding time
max_seeding_time
integer
Number of minutes to seed a torrent
announce_ip
string
announce_to_all_tiers
True always announce to all tiers
announce_to_all_trackers
True always announce to all trackers in a tier
async_io_threads
integer
Number of asynchronous I/O threads
banned_IPs
string
List of banned IPs
checking_memory_use
integer
Outstanding memory when checking torrents in MiB
current_interface_address
string
IP Address to bind to. Empty String means All addresses
current_network_interface
string
Network Interface used
disk_cache
integer
Disk cache used in MiB
disk_cache_ttl
integer
Disk cache expiry interval in seconds
embedded_tracker_port
integer
Port used for embedded tracker
enable_coalesce_read_write
True enables coalesce reads & writes
enable_embedded_tracker
True enables embedded tracker
enable_multi_connections_from_same_ip
True allows multiple connections from the same IP address
enable_os_cache
True enables os cache
enable_upload_suggestions
True enables sending of upload piece suggestions
file_pool_size
integer
File pool size
outgoing_ports_max
integer
Maximal outgoing port (0: Disabled)
outgoing_ports_min
integer
Minimal outgoing port (0: Disabled)
recheck_completed_torrents
True rechecks torrents on completion
resolve_peer_countries
True resolves peer countries
save_resume_data_interval
integer
Save resume data interval in min
send_buffer_low_watermark
integer
Send buffer low watermark in KiB
send_buffer_watermark
integer
Send buffer watermark in KiB
send_buffer_watermark_factor
integer
Send buffer watermark factor in percent
socket_backlog_size
integer
Socket backlog size
upload_choking_algorithm
integer
Upload choking algorithm used (see list of possible values below)
upload_slots_behavior
integer
Upload slots behavior used (see list of possible values below)
upnp_lease_duration
integer
UPnP lease duration (0: Permanent lease)
utp_tcp_mixed_mode
integer
μTP-TCP mixed mode algorithm (see list of possible values below)
Possible values of
scan_dirs
:
NB: the first options allows you to use both encrypted and unencrypted connections (this is the default); other options are mutually exclusive: e.g. by forcing encryption on you won't be able to use unencrypted connections and vice versa.
Possible values of
proxy_type
:
Name:
setPreferences
Parameters:
A json object with key-value pairs of the settings you want to change and their new values.
Example:
json={"save_path":"C:/Users/Dayman/Downloads","queueing_enabled":false,"scan_dirs":{"C:/Games": 0,"D:/Downloads": 1}}
Returns:
HTTP Status Code ScenarioNotes :
token:value
pairs if you only want to change one option
scan_dirs
must exist, otherwise this option will have no effect
For a list of possible preference options see Get application preferences
Name:
defaultSavePath
Parameters:
Returns:
HTTP Status Code Scenario
The response is a string with the default save path, e.g.
C:/Users/Dayman/Downloads
.
All Log API methods are under "log", e.g.:
/api/v2/log/methodName
.
Name:
main
Parameters:
Parameter DescriptionExample:
/api/v2/log/main?normal=true&info=true&warning=true&critical=true&last_known_id=-1
Returns:
HTTP Status Code Scenario
timestamp
integer
Seconds since epoch (Note: switched from milliseconds to seconds in v4.5.0)
integer
Type of the message: Log::NORMAL:
1
, Log::INFO:
2
, Log::WARNING:
4
, Log::CRITICAL:
8
"id"
:
1
,
"message"
:
"
qBittorrent is trying to listen on any interface port: 19036
"
,
"timestamp"
:
1507969127
,
"type"
:
2
"id"
:
2
,
"message"
:
"
Peer ID: -qB3400-
"
,
"timestamp"
:
1507969127
,
"type"
:
1
"id"
:
3
,
"message"
:
"
HTTP User-Agent is 'qBittorrent/3.4.0'
"
,
"timestamp"
:
1507969127
,
"type"
:
1
"id"
:
4
,
"message"
:
"
DHT support [ON]
"
,
"timestamp"
:
1507969127
,
"type"
:
2
"id"
:
5
,
"message"
:
"
Local Peer Discovery support [ON]
"
,
"timestamp"
:
1507969127
,
"type"
:
2
"id"
:
6
,
"message"
:
"
PeX support [ON]
"
,
"timestamp"
:
1507969127
,
"type"
:
2
"id"
:
7
,
"message"
:
"
Anonymous mode [OFF]
"
,
"timestamp"
:
1507969127
,
"type"
:
2
"id"
:
8
,
"message"
:
"
Encryption support [ON]
"
,
"timestamp"
:
1507969127
,
"type"
:
2
"id"
:
9
,
"message"
:
"
Embedded Tracker [OFF]
"
,
"timestamp"
:
1507969127
,
"type"
:
2
"id"
:
10
,
"message"
:
"
UPnP / NAT-PMP support [ON]
"
,
"timestamp"
:
1507969127
,
"type"
:
2
"id"
:
11
,
"message"
:
"
Web UI: Now listening on port 8080
"
,
"timestamp"
:
1507969127
,
"type"
:
1
"id"
:
12
,
"message"
:
"
Options were saved successfully.
"
,
"timestamp"
:
1507969128
,
"type"
:
1
"id"
:
13
,
"message"
:
"
qBittorrent is successfully listening on interface :: port: TCP/19036
"
,
"timestamp"
:
1507969128
,
"type"
:
2
"id"
:
14
,
"message"
:
"
qBittorrent is successfully listening on interface 0.0.0.0 port: TCP/19036
"
,
"timestamp"
:
1507969128
,
"type"
:
2
"id"
:
15
,
"message"
:
"
qBittorrent is successfully listening on interface 0.0.0.0 port: UDP/19036
"
,
"timestamp"
:
1507969128
,
"type"
:
2
Name:
peers
Parameters:
Parameter Description
Sync API implements requests for obtaining changes since the last request.
All Sync API methods are under "sync", e.g.:
/api/v2/sync/methodName
.
Name:
maindata
Parameters:
Parameter DescriptionThe response is TODO
All Transfer info API methods are under "transfer", e.g.:
/api/v2/transfer/methodName
.
This method returns info you usually see in qBt status bar.
Name:
info
Parameters:
Returns:
HTTP Status Code Scenario
The response is
1
if alternative speed limits are enabled,
0
otherwise.
Name:
toggleSpeedLimitsMode
Parameters:
Returns:
HTTP Status Code ScenarioThe response is the value of current global download speed limit in bytes/second; this value will be zero if no limit is applied.
Name:
setDownloadLimit
Parameters:
Parameter DescriptionThe response is the value of current global upload speed limit in bytes/second; this value will be zero if no limit is applied.
Name:
setUploadLimit
Parameters:
Parameter Description
All Torrent management API methods are under "torrents", e.g.:
/api/v2/torrents/methodName
.
Name:
info
Parameters:
Parameter Description
content_path
string
Absolute path of torrent content (root path for multifile torrents, absolute file path for singlefile torrents)
dl_limit
integer
Torrent download speed limit (bytes/s).
-1
if ulimited.
dlspeed
integer
Torrent download speed (bytes/s)
downloaded
integer
Amount of data downloaded
downloaded_session
integer
Amount of data downloaded this session
integer
Torrent ETA (seconds)
f_l_piece_prio
True if first last piece are prioritized
force_start
True if force start is enabled for this torrent
string
Torrent hash
last_activity
integer
Last time (Unix Epoch) when a chunk was downloaded/uploaded
magnet_uri
string
Magnet URI corresponding to this torrent
max_ratio
float
Maximum share ratio until torrent is stopped from seeding/uploading
max_seeding_time
integer
Maximum seeding time (seconds) until torrent is stopped from seeding
string
Torrent name
num_complete
integer
Number of seeds in the swarm
num_incomplete
integer
Number of leechers in the swarm
num_leechs
integer
Number of leechers connected to
num_seeds
integer
Number of seeds connected to
priority
integer
Torrent priority. Returns -1 if queuing is disabled or torrent is in seed mode
progress
float
Torrent progress (percentage/100)
ratio
float
Torrent share ratio. Max ratio value: 9999.
ratio_limit
float
TODO (what is different from
max_ratio
?)
save_path
string
Path where this torrent's data is stored
seeding_time
integer
Torrent elapsed time while complete (seconds)
seeding_time_limit
integer
TODO (what is different from
max_seeding_time
?) seeding_time_limit is a per torrent setting, when Automatic Torrent Management is disabled, furthermore then max_seeding_time is set to seeding_time_limit for this torrent. If Automatic Torrent Management is enabled, the value is -2. And if max_seeding_time is unset it have a default value -1.
seen_complete
integer
Time (Unix Epoch) when this torrent was last seen complete
seq_dl
True if sequential download is enabled
integer
Total size (bytes) of files selected for download
state
string
Torrent state. See table here below for the possible values
super_seeding
True if super seeding is enabled
string
Comma-concatenated tag list of the torrent
time_active
integer
Total active time (seconds)
total_size
integer
Total size (bytes) of all file in this torrent (including unselected ones)
tracker
string
The first tracker with working status. Returns empty string if no tracker is working.
up_limit
integer
Torrent upload speed limit (bytes/s).
-1
if ulimited.
uploaded
integer
Amount of data uploaded
uploaded_session
integer
Amount of data uploaded this session
upspeed
integer
Torrent upload speed (bytes/s)
Possible values of
state
:
Requires knowing the torrent hash. You can get it from torrent list .
Name:
properties
Parameters:
Parameter Description
NB:
-1
is returned if the type of the property is integer but its value is not known.
Example:
"addition_date" : 1438429165 , "comment" : " \" Debian CD from cdimage.debian.org \" " , "completion_date" : 1438429234 , "created_by" : " " , "creation_date" : 1433605214 , "dl_limit" : -1 , "dl_speed" : 0 , "dl_speed_avg" : 9736015 , "eta" : 8640000 , "last_seen" : 1438430354 , "nb_connections" : 3 , "nb_connections_limit" : 250 , "peers" : 1 , "peers_total" : 89 , "piece_size" : 524288 , "pieces_have" : 1254 , "pieces_num" : 1254 , "reannounce" : 672 , "save_path" : " /Downloads/debian-8.1.0-amd64-CD-1.iso " , "seeding_time" : 1128 , "seeds" : 1 , "seeds_total" : 254 , "share_ratio" : 0.00072121022562178299 , "time_elapsed" : 1197 , "total_downloaded" : 681521119 , "total_downloaded_session" : 681521119 , "total_size" : 657457152 , "total_uploaded" : 491520 , "total_uploaded_session" : 491520 , "total_wasted" : 23481724 , "up_limit" : -1 , "up_speed" : 0 , "up_speed_avg" : 410Requires knowing the torrent hash. You can get it from torrent list .
Name:
trackers
Parameters:
Parameter Description integer Tracker priority tier. Lower tier trackers are tried before higher tiers. Tier numbers are valid when
>= 0
,
< 0
is used as placeholder when
tier
does not exist for special entries (such as DHT).
num_peers
integer
Number of peers for current torrent, as reported by the tracker
num_seeds
integer
Number of seeds for current torrent, asreported by the tracker
num_leeches
integer
Number of leeches for current torrent, as reported by the tracker
num_downloaded
integer
Number of completed downlods for current torrent, as reported by the tracker
string
Tracker message (there is no way of knowing what this message is - it's up to tracker admins)
Possible values of
status
:
Requires knowing the torrent hash. You can get it from torrent list .
Name:
webseeds
Parameters:
Parameter DescriptionRequires knowing the torrent hash. You can get it from torrent list .
Name:
files
Parameters:
Parameter Description
piece_range
integer array
The first number is the starting piece index and the second number is the ending piece index (inclusive)
availability
float
Percentage of file pieces currently available (percentage/100)
Possible values of
priority
:
Requires knowing the torrent hash. You can get it from torrent list .
Name:
pieceStates
Parameters:
Parameter DescriptionValue meanings are defined as below:
Value Description[0,0,2,1,0,0,2,1]
Requires knowing the torrent hash. You can get it from torrent list .
Name:
pieceHashes
Parameters:
Parameter DescriptionExample:
["54eddd830a5b58480a6143d616a97e3a6c23c439","f8a99d225aa4241db100f88407fc3bdaead583ab","928fb615b9bd4dd8f9e9022552c8f8f37ef76f58"]
Requires knowing the torrent hashes. You can get it from torrent list .
Name:
pause
Parameters:
Parameter DescriptionExample:
/api/v2/torrents/pause?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439
Returns:
HTTP Status Code ScenarioRequires knowing the torrent hashes. You can get it from torrent list .
Name:
resume
Parameters:
Parameter DescriptionExample:
/api/v2/torrents/resume?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439
Returns:
HTTP Status Code ScenarioRequires knowing the torrent hashes. You can get it from torrent list .
Name:
delete
Parameters:
Parameter Description
hashes
string
The hashes of the torrents you want to delete.
hashes
can contain multiple hashes separated by
|
, to delete multiple torrents, or set to
all
, to delete all torrents.
deleteFiles
If set to
true
, the downloaded data will also be deleted, otherwise has no effect.
Example:
/api/v2/torrents/delete?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32&deleteFiles=false
Returns:
HTTP Status Code ScenarioRequires knowing the torrent hashes. You can get it from torrent list .
Name:
recheck
Parameters:
Parameter DescriptionExample:
/api/v2/torrents/recheck?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439
Returns:
HTTP Status Code ScenarioRequires knowing the torrent hashes. You can get it from torrent list .
Name:
reannounce
Parameters:
Parameter DescriptionExample:
/api/v2/torrents/reannounce?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439
Returns:
HTTP Status Code Scenario
This method can add torrents from server local file or from URLs.
http://
,
https://
,
magnet:
and
bc://bt/
links are supported.
Add torrent from URLs example:
POST /api/v2/torrents/add HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: multipart/form-data; boundary=---------------------------6688794727912
Content-Length: length
-----------------------------6688794727912
Content-Disposition: form-data; name="urls"
https://torcache.net/torrent/3B1A1469C180F447B77021074DBBCCAEF62611E7.torrent
https://torcache.net/torrent/3B1A1469C180F447B77021074DBBCCAEF62611E8.torrent
-----------------------------6688794727912
Content-Disposition: form-data; name="savepath"
C:/Users/qBit/Downloads
-----------------------------6688794727912
Content-Disposition: form-data; name="cookie"
ui=28979218048197
-----------------------------6688794727912
Content-Disposition: form-data; name="category"
movies
-----------------------------6688794727912
Content-Disposition: form-data; name="skip_checking"
-----------------------------6688794727912
Content-Disposition: form-data; name="paused"
-----------------------------6688794727912
Content-Disposition: form-data; name="root_folder"
-----------------------------6688794727912--
Add torrents from files example:
POST /api/v2/torrents/add HTTP/1.1
Content-Type: multipart/form-data; boundary=-------------------------acebdf13572468
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Length: length
---------------------------acebdf13572468
Content-Disposition: form-data; name="torrents"; filename="8f18036b7a205c9347cb84a253975e12f7adddf2.torrent"
Content-Type: application/x-bittorrent
file_binary_data_goes_here
---------------------------acebdf13572468
Content-Disposition: form-data; name="torrents"; filename="UFS.torrent"
Content-Type: application/x-bittorrent
file_binary_data_goes_here
---------------------------acebdf13572468--
The above example will add two torrent files. file_binary_data_goes_here represents raw data of torrent file (basically a byte array).
Property
Description
Add trackers to torrent
Requires knowing the torrent hash. You can get it from torrent list.
POST /api/v2/torrents/addTrackers HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hash=8c212779b4abde7c6bc608063a0d008b7e40ce32&urls=http://192.168.0.1/announce%0Audp://192.168.0.1:3333/dummyAnnounce
This adds two trackers to torrent with hash 8c212779b4abde7c6bc608063a0d008b7e40ce32. Note %0A (aka LF newline) between trackers. Ampersand in tracker urls MUST be escaped.
Returns:
HTTP Status Code
Scenario
Increase torrent priority
Requires knowing the torrent hash. You can get it from torrent list.
Name: increasePrio
Parameters:
Parameter
Description
Example:
/api/v2/torrents/increasePrio?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439
Returns:
HTTP Status Code
Scenario
Decrease torrent priority
Requires knowing the torrent hash. You can get it from torrent list.
Name: decreasePrio
Parameters:
Parameter
Description
Example:
/api/v2/torrents/decreasePrio?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439
Returns:
HTTP Status Code
Scenario
Maximal torrent priority
Requires knowing the torrent hash. You can get it from torrent list.
Name: topPrio
Parameters:
Parameter
Description
Example:
/api/v2/torrents/topPrio?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439
Returns:
HTTP Status Code
Scenario
Minimal torrent priority
Requires knowing the torrent hash. You can get it from torrent list.
Name: bottomPrio
Parameters:
Parameter
Description
Example:
/api/v2/torrents/bottomPrio?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439
Returns:
HTTP Status Code
Scenario
id values correspond to file position inside the array returned by torrent contents API, e.g. id=0 for first file, id=1 for second file, etc.
Since 2.8.2 it is reccomended to use index field returned by torrent contents API (since the files can be filtered and the index value may differ from the position inside the response array).
Returns:
HTTP Status Code
Scenario
Get torrent download limit
Requires knowing the torrent hash. You can get it from torrent list.
POST /api/v2/torrents/downloadLimit HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0
hashes can contain multiple hashes separated by | or set to all
Server reply (example):
HTTP/1.1 200 OK
content-type: application/json
content-length: length
{"8c212779b4abde7c6bc608063a0d008b7e40ce32":338944,"284b83c9c7935002391129fd97f43db5d7cc2ba0":123}
8c212779b4abde7c6bc608063a0d008b7e40ce32 is the hash of the torrent and 338944 its download speed limit in bytes per second; this value will be zero if no limit is applied.
Set torrent download limit
Requires knowing the torrent hash. You can get it from torrent list.
POST /api/v2/torrents/setDownloadLimit HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&limit=131072
hashes can contain multiple hashes separated by | or set to all
limit is the download speed limit in bytes per second you want to set.
Returns:
HTTP Status Code
Scenario
Set torrent share limit
Requires knowing the torrent hash. You can get it from torrent list.
POST
/api/v2/torrents/setShareLimits HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&ratioLimit=1.0&seedingTimeLimit=60
hashes can contain multiple hashes separated by | or set to all
ratioLimit is the max ratio the torrent should be seeded until. -2 means the global limit should be used, -1 means no limit.
seedingTimeLimit is the max amount of time (minutes) the torrent should be seeded. -2 means the global limit should be used, -1 means no limit.
Returns:
HTTP Status Code
Scenario
Get torrent upload limit
Requires knowing the torrent hash. You can get it from torrent list.
POST /api/v2/torrents/uploadLimit HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0
hashes can contain multiple hashes separated by | or set to all
Server reply (example):
HTTP/1.1 200 OK
content-type: application/json
content-length: length
{"8c212779b4abde7c6bc608063a0d008b7e40ce32":338944,"284b83c9c7935002391129fd97f43db5d7cc2ba0":123}
8c212779b4abde7c6bc608063a0d008b7e40ce32 is the hash of the torrent in the request and 338944 its upload speed limit in bytes per second; this value will be zero if no limit is applied.
Set torrent upload limit
Requires knowing the torrent hash. You can get it from torrent list.
POST /api/v2/torrents/setUploadLimit HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&limit=131072
hashes can contain multiple hashes separated by | or set to all
limit is the upload speed limit in bytes per second you want to set.
Returns:
HTTP Status Code
Scenario
Set torrent location
Requires knowing the torrent hash. You can get it from torrent list.
POST /api/v2/torrents/setLocation HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&location=/mnt/nfs/media
hashes can contain multiple hashes separated by | or set to all
location is the location to download the torrent to. If the location doesn't exist, the torrent's location is unchanged.
Returns:
HTTP Status Code
Scenario
Set torrent name
Requires knowing the torrent hash. You can get it from torrent list.
POST /api/v2/torrents/rename HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hash=8c212779b4abde7c6bc608063a0d008b7e40ce32&name=This%20is%20a%20test
Returns:
HTTP Status Code
Scenario
Set torrent category
Requires knowing the torrent hash. You can get it from torrent list.
POST /api/v2/torrents/setCategory HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&category=CategoryName
hashes can contain multiple hashes separated by | or set to all
category is the torrent category you want to set.
Returns:
HTTP Status Code
Scenario
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
category=CategoryName&savePath=/path/to/dir
category
is the category you want to create.
Returns:
HTTP Status Code Scenario Cookie: SID=your_sid Content-Type: application/x-www-form-urlencoded Content-Length: length category=CategoryName&savePath=/path/to/save/torrents/toReturns:
HTTP Status Code Scenario Cookie: SID=your_sid Content-Type: application/x-www-form-urlencoded Content-Length: length categories=Category1%0ACategory2
categories
can contain multiple cateogies separated by
\n
(%0A urlencoded)
Returns:
HTTP Status Code ScenarioRequires knowing the torrent hash. You can get it from torrent list .
POST /api/v2/torrents/addTags HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&tags=TagName1,TagName2
hashes
can contain multiple hashes separated by
|
or set to
all
tags
is the list of tags you want to add to passed torrents.
Returns:
HTTP Status Code ScenarioRequires knowing the torrent hash. You can get it from torrent list .
POST /api/v2/torrents/removeTags HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&tags=TagName1,TagName2
hashes
can contain multiple hashes separated by
|
or set to
all
tags
is the list of tags you want to remove from passed torrents.
Empty list removes all tags from relevant torrents.
Returns:
HTTP Status Code Scenario Cookie: SID=your_sid Content-Type: application/x-www-form-urlencoded Content-Length: length tags=TagName1,TagName2
tags
is a list of tags you want to create.
Can contain multiple tags separated by
,
.
Returns:
HTTP Status Code Scenario Cookie: SID=your_sid Content-Type: application/x-www-form-urlencoded Content-Length: length tags=TagName1,TagName2
tags
is a list of tags you want to delete.
Can contain multiple tags separated by
,
.
Returns:
HTTP Status Code ScenarioRequires knowing the torrent hash. You can get it from torrent list .
POST /api/v2/torrents/setAutoManagement HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&enable=true
hashes
can contain multiple hashes separated by
|
or set to
all
enable
is a boolean, affects the torrents listed in
hashes
, default is
false
Returns:
HTTP Status Code ScenarioRequires knowing the torrent hash. You can get it from torrent list .
Name:
toggleSequentialDownload
Parameters:
Parameter DescriptionExample:
/api/v2/torrents/toggleSequentialDownload?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439
Returns:
HTTP Status Code ScenarioRequires knowing the torrent hash. You can get it from torrent list .
Name:
toggleFirstLastPiecePrio
Parameters:
Parameter DescriptionExample:
/api/v2/torrents/toggleFirstLastPiecePrio?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439
Returns:
HTTP Status Code ScenarioRequires knowing the torrent hash. You can get it from torrent list .
POST /api/v2/torrents/setForceStart HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32?value=true
hashes
can contain multiple hashes separated by
|
or set to
all
value
is a boolean, affects the torrents listed in
hashes
, default is
false
Returns:
HTTP Status Code ScenarioRequires knowing the torrent hash. You can get it from torrent list .
POST /api/v2/torrents/setSuperSeeding HTTP/1.1
User-Agent: Fiddler
Host: 127.0.0.1
Cookie: SID=your_sid
Content-Type: application/x-www-form-urlencoded
Content-Length: length
hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32?value=true
hashes
can contain multiple hashes separated by
|
or set to
all
value
is a boolean, affects the torrents listed in
hashes
, default is
false
Returns:
HTTP Status Code Scenario
All RSS API methods are under "rss", e.g.:
/api/v2/rss/methodName
.
Name:
addFolder
Parameters:
Parameter DescriptionReturns all RSS items in JSON format, e.g.:
"HD-Torrents.org" : " https://hd-torrents.org/rss.php " , "PowerfulJRE" : " https://www.youtube.com/feeds/videos.xml?channel_id=UCzQUP1qoWDoEbmsQxvdjxgQ " , "The Pirate Bay" : { "Audio" : " https://thepiratebay.org/rss//top100/100 " , "Video" : " https://thepiratebay.org/rss//top100/200 "
If
articleId
is provided only the article is marked as read otherwise the whole feed is going to be marked as read.
Name:
markAsRead
Parameters:
Parameter Description "addPaused" : true , "assignedCategory" : " " , "savePath" : " C:/Users/JohnDoe/Downloads/Punisher "
Name:
renameRule
Parameters:
Parameter Description
Name:
rules
Returns all auto-downloading rules in JSON format, e.g.:
"The Punisher" : { "enabled" : false , "mustContain" : " The *Punisher* " , "mustNotContain" : " " , "useRegex" : false , "episodeFilter" : " 1x01-; " , "smartFilter" : false , "previouslyMatchedEpisodes" : [ "affectedFeeds" : [ " http://showrss.info/user/134567.rss?magnets=true " "ignoreDays" : 0 , "lastMatch" : " 20 Nov 2017 09:05:11 " , "addPaused" : true , "assignedCategory" : " " , "savePath" : " C:/Users/JohnDoe/Downloads/Punisher "Returns:
HTTP Status Code ScenarioReturns all articles that match a rule by feed name in JSON format, e.g.:
"DistroWatch" :[ " sparkylinux-5.11-i686-minimalgui.iso.torrent " , " sparkylinux-5.11-x86_64-minimalgui.iso.torrent " , " sparkylinux-5.11-i686-xfce.iso.torrent " , " bluestar-linux-5.6.3-2020.04.09-x86_64.iso.torrent " , " robolinux64-mate3d-v10.10.iso.torrent " , "Linuxtracker" :[ " [Alpine Linux] alpine-extended-3.11.6 " , " [Alpine Linux] alpine-standard-3.11.6 " , " [Linuxfx] linuxfx10-wxs-lts-beta5.iso " , " [Linux Lite] linux-lite-5.0-rc1-64bit.iso (MULTI) " , " [Scientific Linux] SL-7.8-x86_64-Pack " , " [NixOS] nixos-plasma5-20.03.1418.5272327b81e-x86_64-linux.iso "Returns:
HTTP Status Code Scenario
All Search API methods are under "search", e.g.:
/api/v2/search/methodName
.
Name:
start
Parameters:
Parameter Description Offset is too large, or too small (e.g. absolute value of negative number is greater than # results) All other scenarios- see JSON belowThe response is a JSON object with the following fields
Field Description "results" : [ "descrLink" : " http://www.legittorrents.info/index.php?page=torrent-details&id=8d5f512e1acb687029b8d7cc6c5a84dce51d7a41 " , "fileName" : " Ubuntu-10.04-32bit-NeTV.ova " , "fileSize" : -1 , "fileUrl" : " http://www.legittorrents.info/download.php?id=8d5f512e1acb687029b8d7cc6c5a84dce51d7a41&f=Ubuntu-10.04-32bit-NeTV.ova.torrent " , "nbLeechers" : 1 , "nbSeeders" : 0 , "siteUrl" : " http://www.legittorrents.info " "descrLink" : " http://www.legittorrents.info/index.php?page=torrent-details&id=d5179f53e105dc2c2401bcfaa0c2c4936a6aa475 " , "fileName" : " mangOH-Legato-17_06-Ubuntu-16_04.ova " , "fileSize" : -1 , "fileUrl" : " http://www.legittorrents.info/download.php?id=d5179f53e105dc2c2401bcfaa0c2c4936a6aa475&f=mangOH-Legato-17_06-Ubuntu-16_04.ova.torrent " , "nbLeechers" : 0 , "nbSeeders" : 59 , "siteUrl" : " http://www.legittorrents.info " "status" : " Running " , "total" : 2
Name:
delete
Parameters:
Parameter Description
WebAPI uses the following versioning:
1.2.3
: