Skip to content

WebUI API (qBittorrent 4.1)

angrynode edited this page Mar 24, 2025 · 43 revisions

This WebUI API documentation applies to qBittorrent v4.1-v4.6.x. For other WebUI API versions, visit WebUI API.

Table of Contents

  1. Changes
    1. API v2.0
    2. API v2.0.1
    3. API v2.0.2
    4. API v2.1.0
    5. API v2.1.1
    6. API v2.2.0
    7. API v2.2.1
    8. API v2.3.0
    9. API v2.4.0
    10. API v2.4.1
    11. API v2.5.0
    12. API v2.5.1
    13. API v2.6.0
    14. API v2.6.1
    15. API v2.6.2
    16. API v2.7.0
    17. API v2.8.0
    18. API v2.8.1
    19. API v2.8.2
    20. API v2.8.3
  2. General information
  3. Authentication
    1. Login
    2. Logout
  4. Application
    1. Get application version
    2. Get API version
    3. Get build info
    4. Shutdown application
    5. Get application preferences
    6. Set application preferences
    7. Get default save path
  5. Log
    1. Get log
    2. Get peer log
  6. Sync
    1. Get main data
    2. Get torrent peers data
  7. Transfer info
    1. Get global transfer info
    2. Get alternative speed limits state
    3. Toggle alternative speed limits
    4. Get global download limit
    5. Set global download limit
    6. Get global upload limit
    7. Set global upload limit
    8. Ban peers
  8. Torrent management
    1. Get torrent list
    2. Get torrent generic properties
    3. Get torrent trackers
    4. Get torrent web seeds
    5. Get torrent contents
    6. Get torrent pieces' states
    7. Get torrent pieces' hashes
    8. Pause torrents
    9. Resume torrents
    10. Delete torrents
    11. Recheck torrents
    12. Reannounce torrents
    13. Edit trackers
    14. Remove trackers
    15. Add peers
    16. Add new torrent
    17. Add trackers to torrent
    18. Increase torrent priority
    19. Decrease torrent priority
    20. Maximal torrent priority
    21. Minimal torrent priority
    22. Set file priority
    23. Get torrent download limit
    24. Set torrent download limit
    25. Set torrent share limit
    26. Get torrent upload limit
    27. Set torrent upload limit
    28. Set torrent location
    29. Set torrent name
    30. Set torrent category
    31. Get all categories
    32. Add new category
    33. Edit category
    34. Remove categories
    35. Add torrent tags
    36. Remove torrent tags
    37. Get all tags
    38. Create tags
    39. Delete tags
    40. Set automatic torrent management
    41. Toggle sequential download
    42. Set first/last piece priority
    43. Set force start
    44. Set super seeding
    45. Rename file
    46. Rename folder
  9. RSS (experimental)
    1. Add folder
    2. Add feed
    3. Remove item
    4. Move item
    5. Get all items
    6. Mark as read
    7. Refresh item
    8. Set auto-downloading rule
    9. Rename auto-downloading rule
    10. Remove auto-downloading rule
    11. Get all auto-downloading rules
    12. Get all articles matching a rule
  10. Search
    1. Start search
    2. Stop search
    3. Get search status
    4. Get search results
    5. Delete search
    6. Get search plugins
    7. Install search plugin
    8. Uninstall search plugin
    9. Enable search plugin
    10. Update search plugins
  11. WebAPI versioning

Changes

API v2.0

  • New version naming scheme: X.Y.Z (where X - major version, Y - minor version, Z - release version)
  • New API paths. All API methods are under api/vX/ (where X is API major version)
  • API methods are under new scopes

API v2.0.1

  • Add hashes field to /torrents/info (#8782)
  • Add /torrents/setShareLimits/ method (#8598)

API v2.0.2

  • Add /torrents/reannounce method (#9229)

API v2.1.0

  • Change /sync/maindatacategories field from array to object (#9228)
  • Add savePath field to /torrents/createCategory (#9228). This method now requires the category to already exist and will not create new categories.
  • Add /torrents/editCategory method (#9228)

API v2.1.1

  • Add /torrents/categories method (#9586)
  • Add /search/ methods (#8584)
  • Add free_space_on_disk field to /sync/maindata (#8217)

API v2.2.0

  • Add /torrents/editTracker and /torrents/removeTracker methods (#9375)
  • Add tier, num_seeds, num_leeches, and num_downloaded fields to /torrents/trackers (#9375)
  • Change status field from translated string to an integer for /torrents/trackers (#9375)
  • Change /torrents/filePrioid field to accept multiple ids (#9541)
  • Throw additional errors for failed requests to /torrents/filePrio (#9541)
  • Add autoTMM field to /torrents/add (#9752)
  • Add various fields to /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)

API v2.2.1

API v2.3.0

  • Remove web_ui_password field from /app/preferences, this field is still writable in /app/setPreferences method (#9942)
  • Add /app/buildInfo method (#10096)
  • Always use / as path separator in /torrents/files response (#10153)
  • Add /torrents/addPeers and /transfer/banPeers methods (#10158)
  • Add /torrents/addTags, /torrents/removeTags, /torrents/tags, /torrents/createTags, /torrents/deleteTags methods (#10527)

API v2.4.0

  • Add /torrents/renameFile method (#11029)

API v2.4.1

  • Add stalled, stalled_uploading and stalled_downloading as possible values for the filter parameter in /torrents/info (#11825)
  • Add various fields to /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)

API v2.5.0

  • Removes enable_super_seeding as fields from /app/preferences and /app/setPreferences (#12423)

API v2.5.1

  • Add 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)
  • Add /rss/markAsRead and /rss/matchingArticles methods (#12549)

API v2.6.0

  • Removed /search/categories method and modified /search/plugins method's response (#12705)

API v2.6.1

  • Exposed contentPath via the content_path field in the response to /torrents/info (#13625)

API v2.6.2

  • Added tags optional field to /torrents/add (#13882)

API v2.8.0

  • Added /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)

API v2.8.1

  • Added ratioLimit and seedingTimeLimit optional fields to /torrents/add (#14519)
  • Added seeding_time field to /torrents/info (#14554)

API v2.8.2

  • Added indexes optional parameter to /torrents/files (#14795)
  • Added index field to /torrents/files response (#14795)

API v2.8.3

  • Added tag optional parameter to /torrents/info (#15152)

General Information

  • All API methods follows the format /api/v2/APIName/methodName, where APIName is a certain subgroup of API methods whose functionality is related.
  • All API methods only allows 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.
  • All API methods require authentication (except /api/v2/auth/login, obviously).

Authentication

All Authentication API methods are under "auth", e.g.: /api/v2/auth/methodName.

qBittorrent uses cookie-based authentication.

Login

Name: login

Parameters:

ParameterTypeDescription
usernamestringUsername used to access the WebUI
passwordstringPassword used to access the WebUI

Returns:

HTTP Status CodeScenario
403User's IP is banned for too many failed login attempts
200All other scenarios

Upon 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.

Logout

Name: logout

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios

Application

All Application API methods are under "app", e.g.: /api/v2/app/methodName.

Get application version

Name: version

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios

The response is a string with the application version, e.g. v4.1.3

Get API version

Name: webapiVersion

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios

The response is a string with the WebAPI version, e.g. 2.0

Get build info

Name: buildInfo

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios- see JSON below

The response is a JSON object containing the following fields

PropertyTypeDescription
qtstringQT version
libtorrentstringlibtorrent version
booststringBoost version
opensslstringOpenSSL version
bitnessintApplication bitness (e.g. 64-bit)

Shutdown application

Name: shutdown

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios

Get application preferences

Name: preferences

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios- see JSON below

The 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:

PropertyTypeDescription
localestringCurrently selected language (e.g. en_GB for English)
create_subfolder_enabledboolTrue if a subfolder should be created when adding a torrent
start_paused_enabledboolTrue if torrents should be added in a Paused state
auto_delete_modeintegerTODO
preallocate_allboolTrue if disk space should be pre-allocated for all files
incomplete_files_extboolTrue if ".!qB" should be appended to incomplete files
auto_tmm_enabledboolTrue if Automatic Torrent Management is enabled by default
torrent_changed_tmm_enabledboolTrue if torrent should be relocated when its Category changes
save_path_changed_tmm_enabledboolTrue if torrent should be relocated when the default save path changes
category_changed_tmm_enabledboolTrue if torrent should be relocated when its Category's save path changes
save_pathstringDefault save path for torrents, separated by slashes
temp_path_enabledboolTrue if folder for incomplete torrents is enabled
temp_pathstringPath for incomplete torrents, separated by slashes
scan_dirsobjectProperty: 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_dirstringPath to directory to copy .torrent files to. Slashes are used as path separators
export_dir_finstringPath to directory to copy .torrent files of completed downloads to. Slashes are used as path separators
mail_notification_enabledboolTrue if e-mail notification should be enabled
mail_notification_senderstringe-mail where notifications should originate from
mail_notification_emailstringe-mail to send notifications to
mail_notification_smtpstringsmtp server for e-mail notifications
mail_notification_ssl_enabledboolTrue if smtp server requires SSL connection
mail_notification_auth_enabledboolTrue if smtp server requires authentication
mail_notification_usernamestringUsername for smtp authentication
mail_notification_passwordstringPassword for smtp authentication
autorun_enabledboolTrue if external program should be run after torrent has finished downloading
autorun_programstringProgram 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_enabledboolTrue if torrent queuing is enabled
max_active_downloadsintegerMaximum number of active simultaneous downloads
max_active_torrentsintegerMaximum number of active simultaneous downloads and uploads
max_active_uploadsintegerMaximum number of active simultaneous uploads
dont_count_slow_torrentsboolIf 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_thresholdintegerDownload rate in KiB/s for a torrent to be considered "slow"
slow_torrent_ul_rate_thresholdintegerUpload rate in KiB/s for a torrent to be considered "slow"
slow_torrent_inactive_timerintegerSeconds a torrent should be inactive before considered "slow"
max_ratio_enabledboolTrue if share ratio limit is enabled
max_ratiofloatGet the global share ratio limit
max_ratio_actintegerAction performed when a torrent reaches the maximum share ratio. See list of possible values here below.
listen_portintegerPort for incoming connections
upnpboolTrue if UPnP/NAT-PMP is enabled
random_portboolTrue if the port is randomly selected
dl_limitintegerGlobal download speed limit in KiB/s; -1 means no limit is applied
up_limitintegerGlobal upload speed limit in KiB/s; -1 means no limit is applied
max_connecintegerMaximum global number of simultaneous connections
max_connec_per_torrentintegerMaximum number of simultaneous connections per torrent
max_uploadsintegerMaximum number of upload slots
max_uploads_per_torrentintegerMaximum number of upload slots per torrent
stop_tracker_timeoutintegerTimeout in seconds for a stopped announce request to trackers
enable_piece_extent_affinityboolTrue if the advanced libtorrent option piece_extent_affinity is enabled
bittorrent_protocolintegerBittorrent Protocol to use (see list of possible values below)
limit_utp_rateboolTrue 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_overheadboolTrue if [du]l_limit should be applied to estimated TCP overhead (service data: e.g. packet headers)
limit_lan_peersboolTrue if [du]l_limit should be applied to peers on the LAN
alt_dl_limitintegerAlternative global download speed limit in KiB/s
alt_up_limitintegerAlternative global upload speed limit in KiB/s
scheduler_enabledboolTrue if alternative limits should be applied according to schedule
schedule_from_hourintegerScheduler starting hour
schedule_from_minintegerScheduler starting minute
schedule_to_hourintegerScheduler ending hour
schedule_to_minintegerScheduler ending minute
scheduler_daysintegerScheduler days. See possible values here below
dhtboolTrue if DHT is enabled
pexboolTrue if PeX is enabled
lsdboolTrue if LSD is enabled
encryptionintegerSee list of possible values here below
anonymous_modeboolIf 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_typeintegerSee list of possible values here below
proxy_ipstringProxy IP address or domain name
proxy_portintegerProxy port
proxy_peer_connectionsboolTrue 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_enabledboolTrue proxy requires authentication; doesn't apply to SOCKS4 proxies
proxy_usernamestringUsername for proxy authentication
proxy_passwordstringPassword for proxy authentication
proxy_torrents_onlyboolTrue if proxy is only used for torrents
ip_filter_enabledboolTrue if external IP filter should be enabled
ip_filter_pathstringPath to IP filter file (.dat, .p2p, .p2b files are supported); path is separated by slashes
ip_filter_trackersboolTrue if IP filters are applied to trackers
web_ui_domain_liststringSemicolon-separated list of domains to accept when performing Host header validation
web_ui_addressstringIP address to use for the WebUI
web_ui_portintegerWebUI port
web_ui_upnpboolTrue if UPnP is used for the WebUI port
web_ui_usernamestringWebUI username
web_ui_passwordstringFor 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_enabledboolTrue if WebUI CSRF protection is enabled
web_ui_clickjacking_protection_enabledboolTrue if WebUI clickjacking protection is enabled
web_ui_secure_cookie_enabledboolTrue if WebUI cookie Secure flag is enabled
web_ui_max_auth_fail_countintegerMaximum number of authentication failures before WebUI access ban
web_ui_ban_durationintegerWebUI access ban duration in seconds
web_ui_session_timeoutintegerSeconds until WebUI is automatically signed off
web_ui_host_header_validation_enabledboolTrue if WebUI host header validation is enabled
bypass_local_authboolTrue if authentication challenge for loopback address (127.0.0.1) should be disabled
bypass_auth_subnet_whitelist_enabledboolTrue if webui authentication should be bypassed for clients whose ip resides within (at least) one of the subnets on the whitelist
bypass_auth_subnet_whiteliststring(White)list of ipv4/ipv6 subnets for which webui authentication should be bypassed; list entries are separated by commas
alternative_webui_enabledboolTrue if an alternative WebUI should be used
alternative_webui_pathstringFile path to the alternative WebUI
use_httpsboolTrue if WebUI HTTPS access is enabled
ssl_keystringFor API < v2.0.1: SSL keyfile contents (this is a not a path)
ssl_certstringFor API < v2.0.1: SSL certificate contents (this is a not a path)
web_ui_https_key_pathstringFor API ≥ v2.0.1: Path to SSL keyfile
web_ui_https_cert_pathstringFor API ≥ v2.0.1: Path to SSL certificate
dyndns_enabledboolTrue if server DNS should be updated dynamically
dyndns_serviceintegerSee list of possible values here below
dyndns_usernamestringUsername for DDNS service
dyndns_passwordstringPassword for DDNS service
dyndns_domainstringYour DDNS domain name
rss_refresh_intervalintegerRSS refresh interval
rss_max_articles_per_feedintegerMax stored articles per RSS feed
rss_processing_enabledboolEnable processing of RSS feeds
rss_auto_downloading_enabledboolEnable auto-downloading of torrents from the RSS feeds
rss_download_repack_proper_episodesboolFor API ≥ v2.5.1: Enable downloading of repack/proper Episodes
rss_smart_episode_filtersstringFor API ≥ v2.5.1: List of RSS Smart Episode Filters
add_trackers_enabledboolEnable automatic adding of trackers to new torrents
add_trackersstringList of trackers to add to new torrent
web_ui_use_custom_http_headers_enabledboolFor API ≥ v2.5.1: Enable custom http headers
web_ui_custom_http_headersstringFor API ≥ v2.5.1: List of custom http headers
max_seeding_time_enabledboolTrue enables max seeding time
max_seeding_timeintegerNumber of minutes to seed a torrent
announce_ipstringTODO
announce_to_all_tiersboolTrue always announce to all tiers
announce_to_all_trackersboolTrue always announce to all trackers in a tier
async_io_threadsintegerNumber of asynchronous I/O threads
banned_IPsstringList of banned IPs
checking_memory_useintegerOutstanding memory when checking torrents in MiB
current_interface_addressstringIP Address to bind to. Empty String means All addresses
current_network_interfacestringNetwork Interface used
disk_cacheintegerDisk cache used in MiB
disk_cache_ttlintegerDisk cache expiry interval in seconds
embedded_tracker_portintegerPort used for embedded tracker
enable_coalesce_read_writeboolTrue enables coalesce reads & writes
enable_embedded_trackerboolTrue enables embedded tracker
enable_multi_connections_from_same_ipboolTrue allows multiple connections from the same IP address
enable_os_cacheboolTrue enables os cache
enable_upload_suggestionsboolTrue enables sending of upload piece suggestions
file_pool_sizeintegerFile pool size
outgoing_ports_maxintegerMaximal outgoing port (0: Disabled)
outgoing_ports_minintegerMinimal outgoing port (0: Disabled)
recheck_completed_torrentsboolTrue rechecks torrents on completion
resolve_peer_countriesboolTrue resolves peer countries
save_resume_data_intervalintegerSave resume data interval in min
send_buffer_low_watermarkintegerSend buffer low watermark in KiB
send_buffer_watermarkintegerSend buffer watermark in KiB
send_buffer_watermark_factorintegerSend buffer watermark factor in percent
socket_backlog_sizeintegerSocket backlog size
upload_choking_algorithmintegerUpload choking algorithm used (see list of possible values below)
upload_slots_behaviorintegerUpload slots behavior used (see list of possible values below)
upnp_lease_durationintegerUPnP lease duration (0: Permanent lease)
utp_tcp_mixed_modeintegerμTP-TCP mixed mode algorithm (see list of possible values below)

Possible values of scan_dirs:

ValueDescription
0Download to the monitored folder
1Download to the default save path
"/path/to/download/to"Download to this path

Possible values of scheduler_days:

ValueDescription
0Every day
1Every weekday
2Every weekend
3Every Monday
4Every Tuesday
5Every Wednesday
6Every Thursday
7Every Friday
8Every Saturday
9Every Sunday

Possible values of encryption:

ValueDescription
0Prefer encryption
1Force encryption on
2Force encryption off

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:

ValueDescription
-1Proxy is disabled
1HTTP proxy without authentication
2SOCKS5 proxy without authentication
3HTTP proxy with authentication
4SOCKS5 proxy with authentication
5SOCKS4 proxy without authentication

Possible values of dyndns_service:

ValueDescription
0Use DyDNS
1Use NOIP

Possible values of max_ratio_act:

ValueDescription
0Pause torrent
1Remove torrent

Possible values of bittorrent_protocol:

ValueDescription
0TCP and μTP
1TCP
2μTP

Possible values of upload_choking_algorithm:

ValueDescription
0Round-robin
1Fastest upload
2Anti-leech

Possible values of upload_slots_behavior:

ValueDescription
0Fixed slots
1Upload rate based

Possible values of utp_tcp_mixed_mode:

ValueDescription
0Prefer TCP
1Peer proportional

Example:

{ "add_trackers": "", "add_trackers_enabled": false, "alt_dl_limit": 10240, "alt_up_limit": 10240, "alternative_webui_enabled": false, "alternative_webui_path": "/home/user/Documents/qbit-webui", "announce_ip": "", "announce_to_all_tiers": true, "announce_to_all_trackers": false, "anonymous_mode": false, "async_io_threads": 4, "auto_delete_mode": 0, "auto_tmm_enabled": false, "autorun_enabled": false, "autorun_program": "", "banned_IPs": "", "bittorrent_protocol": 0, "bypass_auth_subnet_whitelist": "", "bypass_auth_subnet_whitelist_enabled": false, "bypass_local_auth": false, "category_changed_tmm_enabled": false, "checking_memory_use": 32, "create_subfolder_enabled": true, "current_interface_address": "", "current_network_interface": "", "dht": true, "disk_cache": -1, "disk_cache_ttl": 60, "dl_limit": 0, "dont_count_slow_torrents": false, "dyndns_domain": "changeme.dyndns.org", "dyndns_enabled": false, "dyndns_password": "", "dyndns_service": 0, "dyndns_username": "", "embedded_tracker_port": 9000, "enable_coalesce_read_write": false, "enable_embedded_tracker": false, "enable_multi_connections_from_same_ip": false, "enable_os_cache": true, "enable_piece_extent_affinity": false, "enable_upload_suggestions": false, "encryption": 0, "export_dir": "/home/user/Downloads/all", "export_dir_fin": "/home/user/Downloads/completed", "file_pool_size": 40, "incomplete_files_ext": false, "ip_filter_enabled": false, "ip_filter_path": "", "ip_filter_trackers": false, "limit_lan_peers": true, "limit_tcp_overhead": false, "limit_utp_rate": true, "listen_port": 58925, "locale": "en", "lsd": true, "mail_notification_auth_enabled": false, "mail_notification_email": "", "mail_notification_enabled": false, "mail_notification_password": "", "mail_notification_sender": "qBittorrent_notification@example.com", "mail_notification_smtp": "smtp.changeme.com", "mail_notification_ssl_enabled": false, "mail_notification_username": "", "max_active_downloads": 3, "max_active_torrents": 5, "max_active_uploads": 3, "max_connec": 500, "max_connec_per_torrent": 100, "max_ratio": -1, "max_ratio_act": 0, "max_ratio_enabled": false, "max_seeding_time": -1, "max_seeding_time_enabled": false, "max_uploads": -1, "max_uploads_per_torrent": -1, "outgoing_ports_max": 0, "outgoing_ports_min": 0, "pex": true, "preallocate_all": false, "proxy_auth_enabled": false, "proxy_ip": "0.0.0.0", "proxy_password": "", "proxy_peer_connections": false, "proxy_port": 8080, "proxy_torrents_only": false, "proxy_type": 0, "proxy_username": "", "queueing_enabled": false, "random_port": false, "recheck_completed_torrents": false, "resolve_peer_countries": true, "rss_auto_downloading_enabled":true, "rss_download_repack_proper_episodes":true, "rss_max_articles_per_feed":50, "rss_processing_enabled":true, "rss_refresh_interval":30, "rss_smart_episode_filters":"s(\\d+)e(\\d+)\n(\\d+)x(\\d+)\n(\\d{4}[.\\-]\\d{1,2}[.\\-]\\d{1,2})", "save_path": "/home/user/Downloads/", "save_path_changed_tmm_enabled": false, "save_resume_data_interval": 60, "scan_dirs": { "/home/user/Downloads/incoming/games": 0, "/home/user/Downloads/incoming/movies": 1, }, "schedule_from_hour": 8, "schedule_from_min": 0, "schedule_to_hour": 20, "schedule_to_min": 0, "scheduler_days": 0, "scheduler_enabled": false, "send_buffer_low_watermark": 10, "send_buffer_watermark": 500, "send_buffer_watermark_factor": 50, "slow_torrent_dl_rate_threshold": 2, "slow_torrent_inactive_timer": 60, "slow_torrent_ul_rate_threshold": 2, "socket_backlog_size": 30, "start_paused_enabled": false, "stop_tracker_timeout": 1, "temp_path": "/home/user/Downloads/temp", "temp_path_enabled": false, "torrent_changed_tmm_enabled": true, "up_limit": 0, "upload_choking_algorithm": 1, "upload_slots_behavior": 0, "upnp": true, "use_https": false, "utp_tcp_mixed_mode": 0, "web_ui_address": "*", "web_ui_ban_duration": 3600, "web_ui_clickjacking_protection_enabled": true, "web_ui_csrf_protection_enabled": true, "web_ui_custom_http_headers": "", "web_ui_domain_list": "*", "web_ui_host_header_validation_enabled": true, "web_ui_https_cert_path": "", "web_ui_https_key_path": "", "web_ui_max_auth_fail_count": 5, "web_ui_port": 8080, "web_ui_secure_cookie_enabled": true, "web_ui_session_timeout": 3600, "web_ui_upnp": false, "web_ui_use_custom_http_headers_enabled": false, "web_ui_username": "admin" }

Set application preferences

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 CodeScenario
200All scenarios

Notes:

  1. There is no need to pass all possible preferences' token:value pairs if you only want to change one option
  2. Paths in scan_dirs must exist, otherwise this option will have no effect
  3. String values must be quoted; integer and boolean values must never be quoted

For a list of possible preference options see Get application preferences

Get default save path

Name: defaultSavePath

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios

The response is a string with the default save path, e.g. C:/Users/Dayman/Downloads.

Log

All Log API methods are under "log", e.g.: /api/v2/log/methodName.

Get log

Name: main

Parameters:

ParameterTypeDescription
normalboolInclude normal messages (default: true)
infoboolInclude info messages (default: true)
warningboolInclude warning messages (default: true)
criticalboolInclude critical messages (default: true)
last_known_idintegerExclude messages with "message id" <= last_known_id (default: -1)

Example:

/api/v2/log/main?normal=true&info=true&warning=true&critical=true&last_known_id=-1

Returns:

HTTP Status CodeScenario
200All scenarios- see JSON below

The response is a JSON array in which each element is an entry of the log.

Each element of the array has the following properties:

PropertyTypeDescription
idintegerID of the message
messagestringText of the message
timestampintegerSeconds since epoch (Note: switched from milliseconds to seconds in v4.5.0)
typeintegerType of the message: Log::NORMAL: 1, Log::INFO: 2, Log::WARNING: 4, Log::CRITICAL: 8

Example:

[ { "id":0, "message":"qBittorrent v3.4.0 started", "timestamp":1507969127, "type":1 }, { "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 } ]

Get peer log

Name: peers

Parameters:

ParameterTypeDescription
last_known_idintegerExclude messages with "message id" <= last_known_id (default: -1)

Returns:

HTTP Status CodeScenario
200All scenarios- see JSON below

The response a JSON array. Each element of the array of objects (each object is the information relative to a peer) containing the following fields

PropertyTypeDescription
idintegerID of the peer
ipstringIP of the peer
timestampintegerSeconds since epoch
blockedbooleanWhether or not the peer was blocked
reasonstringReason of the block

Sync

Sync API implements requests for obtaining changes since the last request. All Sync API methods are under "sync", e.g.: /api/v2/sync/methodName.

Get main data

Name: maindata

Parameters:

ParameterTypeDescription
ridintegerResponse ID. If not provided, rid=0 will be assumed. If the given rid is different from the one of last server reply, full_update will be true (see the server reply details for more info)

Example:

/api/v2/sync/maindata?rid=14

Returns:

HTTP Status CodeScenario
200All scenarios- see JSON below

The response is a JSON object with the following possible fields

PropertyTypeDescription
ridintegerResponse ID
full_updateboolWhether the response contains all the data or partial data
torrentsobjectProperty: torrent hash, value: same as torrent list
torrents_removedarrayList of hashes of torrents removed since last request
categoriesobjectInfo for categories added since last request
categories_removedarrayList of categories removed since last request
tagsarrayList of tags added since last request
tags_removedarrayList of tags removed since last request
server_stateobjectGlobal transfer info

Example:

{ "rid":15, "torrents": { "8c212779b4abde7c6bc608063a0d008b7e40ce32": { "state":"pausedUP" } } }

Get torrent peers data

Name: torrentPeers

Parameters:

ParameterTypeDescription
hashstringTorrent hash
ridintegerResponse ID. If not provided, rid=0 will be assumed. If the given rid is different from the one of last server reply, full_update will be true (see the server reply details for more info)

Example:

/api/v2/sync/torrentPeers?hash=8c212779b4abde7c6bc608063a0d008b7e40ce32?rid=14

Returns:

HTTP Status CodeScenario
404Torrent hash was not found
200All other scenarios- see JSON below

The response is TODO

Transfer info

All Transfer info API methods are under "transfer", e.g.: /api/v2/transfer/methodName.

Get global transfer info

This method returns info you usually see in qBt status bar.

Name: info

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios- see JSON below

The response is a JSON object with the following fields

PropertyTypeDescription
dl_info_speedintegerGlobal download rate (bytes/s)
dl_info_dataintegerData downloaded this session (bytes)
up_info_speedintegerGlobal upload rate (bytes/s)
up_info_dataintegerData uploaded this session (bytes)
dl_rate_limitintegerDownload rate limit (bytes/s)
up_rate_limitintegerUpload rate limit (bytes/s)
dht_nodesintegerDHT nodes connected to
connection_statusstringConnection status. See possible values here below

In addition to the above in partial data requests (see Get partial data for more info):

PropertyTypeDescription
queueingboolTrue if torrent queueing is enabled
use_alt_speed_limitsboolTrue if alternative speed limits are enabled
refresh_intervalintegerTransfer list refresh interval (milliseconds)

Possible values of connection_status:

Value
connected
firewalled
disconnected

Example:

{ "connection_status":"connected", "dht_nodes":386, "dl_info_data":681521119, "dl_info_speed":0, "dl_rate_limit":0, "up_info_data":10747904, "up_info_speed":0, "up_rate_limit":1048576 }

Get alternative speed limits state

Name: speedLimitsMode

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios

The response is 1 if alternative speed limits are enabled, 0 otherwise.

Toggle alternative speed limits

Name: toggleSpeedLimitsMode

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios

Get global download limit

Name: downloadLimit

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios

The response is the value of current global download speed limit in bytes/second; this value will be zero if no limit is applied.

Set global download limit

Name: setDownloadLimit

Parameters:

ParameterTypeDescription
limitintegerThe global download speed limit to set in bytes/second

Returns:

HTTP Status CodeScenario
200All scenarios

Get global upload limit

Name: uploadLimit

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios

The response is the value of current global upload speed limit in bytes/second; this value will be zero if no limit is applied.

Set global upload limit

Name: setUploadLimit

Parameters:

ParameterTypeDescription
limitintegerThe global upload speed limit to set in bytes/second

Returns:

HTTP Status CodeScenario
200All scenarios

Ban peers

Name: banPeers

Parameters:

ParameterTypeDescription
peersstringThe peer to ban, or multiple peers separated by a pipe |. Each peer is a colon-separated host:port

Returns:

HTTP Status CodeScenario
200All scenarios

Torrent management

All Torrent management API methods are under "torrents", e.g.: /api/v2/torrents/methodName.

Get torrent list

Name: info

Parameters:

ParameterTypeDescription
filteroptionalstringFilter torrent list by state. Allowed state filters: all, downloading, seeding, completed, paused, active, inactive, resumed, stalled, stalled_uploading, stalled_downloading, errored
categoryoptionalstringGet torrents with the given category (empty string means "without category"; no "category" parameter means "any category"). Remember to URL-encode the category name. For example, My category becomes My%20category
tagoptionalsince 2.8.3stringGet torrents with the given tag (empty string means "without tag"; no "tag" parameter means "any tag". Remember to URL-encode the category name. For example, My tag becomes My%20tag
sortoptionalstringSort torrents by given key. They can be sorted using any field of the response's JSON array (which are documented below) as the sort key.
reverseoptionalboolEnable reverse sorting. Defaults to false
limitoptionalintegerLimit the number of torrents returned
offsetoptionalintegerSet offset (if less than 0, offset from end)
hashesoptionalstringFilter by hashes. Can contain multiple hashes separated by |

Example:

/api/v2/torrents/info?filter=downloading&category=sample%20category&sort=ratio

Returns:

HTTP Status CodeScenario
200All scenarios- see JSON below

The response is a JSON array with the following fields

PropertyTypeDescription
added_onintegerTime (Unix Epoch) when the torrent was added to the client
amount_leftintegerAmount of data left to download (bytes)
auto_tmmboolWhether this torrent is managed by Automatic Torrent Management
availabilityfloatPercentage of file pieces currently available
categorystringCategory of the torrent
completedintegerAmount of transfer data completed (bytes)
completion_onintegerTime (Unix Epoch) when the torrent completed
content_pathstringAbsolute path of torrent content (root path for multifile torrents, absolute file path for singlefile torrents)
dl_limitintegerTorrent download speed limit (bytes/s). -1 if unlimited.
dlspeedintegerTorrent download speed (bytes/s)
downloadedintegerAmount of data downloaded
downloaded_sessionintegerAmount of data downloaded this session
etaintegerTorrent ETA (seconds)
f_l_piece_prioboolTrue if first last piece are prioritized
force_startboolTrue if force start is enabled for this torrent
hashstringTorrent hash
isPrivateboolTrue if torrent is from a private tracker (added in 5.0.0)
last_activityintegerLast time (Unix Epoch) when a chunk was downloaded/uploaded
magnet_uristringMagnet URI corresponding to this torrent
max_ratiofloatMaximum share ratio until torrent is stopped from seeding/uploading
max_seeding_timeintegerMaximum seeding time (seconds) until torrent is stopped from seeding
namestringTorrent name
num_completeintegerNumber of seeds in the swarm
num_incompleteintegerNumber of leechers in the swarm
num_leechsintegerNumber of leechers connected to
num_seedsintegerNumber of seeds connected to
priorityintegerTorrent priority. Returns -1 if queuing is disabled or torrent is in seed mode
progressfloatTorrent progress (percentage/100)
ratiofloatTorrent share ratio. Max ratio value: 9999.
ratio_limitfloatTODO (what is different from max_ratio?)
save_pathstringPath where this torrent's data is stored
seeding_timeintegerTorrent elapsed time while complete (seconds)
seeding_time_limitintegerTODO (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_completeintegerTime (Unix Epoch) when this torrent was last seen complete
seq_dlboolTrue if sequential download is enabled
sizeintegerTotal size (bytes) of files selected for download
statestringTorrent state. See table here below for the possible values
super_seedingboolTrue if super seeding is enabled
tagsstringComma-concatenated tag list of the torrent
time_activeintegerTotal active time (seconds)
total_sizeintegerTotal size (bytes) of all file in this torrent (including unselected ones)
trackerstringThe first tracker with working status. Returns empty string if no tracker is working.
up_limitintegerTorrent upload speed limit (bytes/s). -1 if unlimited.
uploadedintegerAmount of data uploaded
uploaded_sessionintegerAmount of data uploaded this session
upspeedintegerTorrent upload speed (bytes/s)

Possible values of state:

ValueDescription
errorSome error occurred, applies to paused torrents
missingFilesTorrent data files is missing
uploadingTorrent is being seeded and data is being transferred
pausedUPTorrent is paused and has finished downloading
queuedUPQueuing is enabled and torrent is queued for upload
stalledUPTorrent is being seeded, but no connection were made
checkingUPTorrent has finished downloading and is being checked
forcedUPTorrent is forced to uploading and ignore queue limit
allocatingTorrent is allocating disk space for download
downloadingTorrent is being downloaded and data is being transferred
metaDLTorrent has just started downloading and is fetching metadata
pausedDLTorrent is paused and has NOT finished downloading
queuedDLQueuing is enabled and torrent is queued for download
stalledDLTorrent is being downloaded, but no connection were made
checkingDLSame as checkingUP, but torrent has NOT finished downloading
forcedDLTorrent is forced to downloading to ignore queue limit
checkingResumeDataChecking resume data on qBt startup
movingTorrent is moving to another location
unknownUnknown status

Example:

[ { "dlspeed":9681262, "eta":87, "f_l_piece_prio":false, "force_start":false, "hash":"8c212779b4abde7c6bc608063a0d008b7e40ce32", "category":"", "tags": "", "name":"debian-8.1.0-amd64-CD-1.iso", "num_complete":-1, "num_incomplete":-1, "num_leechs":2, "num_seeds":54, "priority":1, "progress":0.16108787059783936, "ratio":0, "seq_dl":false, "size":657457152, "state":"downloading", "super_seeding":false, "upspeed":0, "isPrivate":true }, { another_torrent_info } ]

Get torrent generic properties

Requires knowing the torrent hash. You can get it from torrent list.

Name: properties

Parameters:

ParameterTypeDescription
hashstringThe hash of the torrent you want to get the generic properties of

Returns:

HTTP Status CodeScenario
404Torrent hash was not found
200All other scenarios- see JSON below

The response is:

  • empty, if the torrent hash is invalid
  • otherwise, a JSON object with the following fields
PropertyTypeDescription
save_pathstringTorrent save path
creation_dateintegerTorrent creation date (Unix timestamp)
piece_sizeintegerTorrent piece size (bytes)
commentstringTorrent comment
total_wastedintegerTotal data wasted for torrent (bytes)
total_uploadedintegerTotal data uploaded for torrent (bytes)
total_uploaded_sessionintegerTotal data uploaded this session (bytes)
total_downloadedintegerTotal data downloaded for torrent (bytes)
total_downloaded_sessionintegerTotal data downloaded this session (bytes)
up_limitintegerTorrent upload limit (bytes/s)
dl_limitintegerTorrent download limit (bytes/s)
time_elapsedintegerTorrent elapsed time (seconds)
seeding_timeintegerTorrent elapsed time while complete (seconds)
nb_connectionsintegerTorrent connection count
nb_connections_limitintegerTorrent connection count limit
share_ratiofloatTorrent share ratio
addition_dateintegerWhen this torrent was added (unix timestamp)
completion_dateintegerTorrent completion date (unix timestamp)
created_bystringTorrent creator
dl_speed_avgintegerTorrent average download speed (bytes/second)
dl_speedintegerTorrent download speed (bytes/second)
etaintegerTorrent ETA (seconds)
last_seenintegerLast seen complete date (unix timestamp)
peersintegerNumber of peers connected to
peers_totalintegerNumber of peers in the swarm
pieces_haveintegerNumber of pieces owned
pieces_numintegerNumber of pieces of the torrent
reannounceintegerNumber of seconds until the next announce
seedsintegerNumber of seeds connected to
seeds_totalintegerNumber of seeds in the swarm
total_sizeintegerTorrent total size (bytes)
up_speed_avgintegerTorrent average upload speed (bytes/second)
up_speedintegerTorrent upload speed (bytes/second)
isPrivateboolTrue if torrent is from a private tracker

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, "isPrivate":true, "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":410 }

Get torrent trackers

Requires knowing the torrent hash. You can get it from torrent list.

Name: trackers

Parameters:

ParameterTypeDescription
hashstringThe hash of the torrent you want to get the trackers of

Returns:

HTTP Status CodeScenario
404Torrent hash was not found
200All other scenarios- see JSON below

The response is a JSON array, where each element contains info about one tracker, with the following fields

PropertyTypeDescription
urlstringTracker url
statusintegerTracker status. See the table below for possible values
tierintegerTracker 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_peersintegerNumber of peers for current torrent, as reported by the tracker
num_seedsintegerNumber of seeds for current torrent, asreported by the tracker
num_leechesintegerNumber of leeches for current torrent, as reported by the tracker
num_downloadedintegerNumber of completed downloads for current torrent, as reported by the tracker
msgstringTracker message (there is no way of knowing what this message is - it's up to tracker admins)

Possible values of status:

ValueDescription
0Tracker is disabled (used for DHT, PeX, and LSD)
1Tracker has not been contacted yet
2Tracker has been contacted and is working
3Tracker is updating
4Tracker has been contacted, but it is not working (or doesn't send proper replies)

Example:

[ { "msg":"", "num_peers":100, "status":2, "url":"http://bttracker.debian.org:6969/announce" }, { another_tracker_info } ]

Get torrent web seeds

Requires knowing the torrent hash. You can get it from torrent list.

Name: webseeds

Parameters:

ParameterTypeDescription
hashstringThe hash of the torrent you want to get the webseeds of

Returns:

HTTP Status CodeScenario
404Torrent hash was not found
200All other scenarios- see JSON below

The response is a JSON array, where each element is information about one webseed, with the following fields

PropertyTypeDescription
urlstringURL of the web seed

Example:

[ { "url":"http://some_url/" }, { "url":"http://some_other_url/" } ]

Get torrent contents

Requires knowing the torrent hash. You can get it from torrent list.

Name: files

Parameters:

ParameterTypeDescription
hashstringThe hash of the torrent you want to get the contents of
indexesoptionalsince 2.8.2stringThe indexes of the files you want to retrieve. indexes can contain multiple values separated by |.

Returns:

HTTP Status CodeScenario
404Torrent hash was not found
200All other scenarios- see JSON below

The response is:

  • empty, if the torrent hash is invalid
  • otherwise, a JSON array, where each element contains info about one file, with the following fields
PropertyTypeDescription
indexsince 2.8.2integerFile index
namestringFile name (including relative path)
sizeintegerFile size (bytes)
progressfloatFile progress (percentage/100)
priorityintegerFile priority. See possible values here below
is_seedboolTrue if file is seeding/complete
piece_rangeinteger arrayThe first number is the starting piece index and the second number is the ending piece index (inclusive)
availabilityfloatPercentage of file pieces currently available (percentage/100)

Possible values of priority:

ValueDescription
0Do not download
1Normal priority
6High priority
7Maximal priority

Example:

[ { "index":0, "is_seed":false, "name":"debian-8.1.0-amd64-CD-1.iso", "piece_range":[0,1253], "priority":1, "progress":0, "size":657457152, "availability":0.5, } ]

Get torrent pieces' states

Requires knowing the torrent hash. You can get it from torrent list.

Name: pieceStates

Parameters:

ParameterTypeDescription
hashstringThe hash of the torrent you want to get the pieces' states of

Returns:

HTTP Status CodeScenario
404Torrent hash was not found
200All other scenarios- see JSON below

The response is:

  • empty, if the torrent hash is invalid
  • otherwise, an array of states (integers) of all pieces (in order) of a specific torrent.

Value meanings are defined as below:

ValueDescription
0Not downloaded yet
1Now downloading
2Already downloaded

Example:

[0,0,2,1,0,0,2,1]

Get torrent pieces' hashes

Requires knowing the torrent hash. You can get it from torrent list.

Name: pieceHashes

Parameters:

ParameterTypeDescription
hashstringThe hash of the torrent you want to get the pieces' hashes of

Returns:

HTTP Status CodeScenario
404Torrent hash was not found
200All other scenarios- see JSON below

The response is:

  • empty, if the torrent hash is invalid
  • otherwise, an array of hashes (strings) of all pieces (in order) of a specific torrent.

Example:

["54eddd830a5b58480a6143d616a97e3a6c23c439","f8a99d225aa4241db100f88407fc3bdaead583ab","928fb615b9bd4dd8f9e9022552c8f8f37ef76f58"]

Pause torrents

Requires knowing the torrent hashes. You can get it from torrent list.

Name: pause

Parameters:

ParameterTypeDescription
hashesstringThe hashes of the torrents you want to pause. hashes can contain multiple hashes separated by |, to pause multiple torrents, or set to all, to pause all torrents.

Example:

/api/v2/torrents/pause?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439

Returns:

HTTP Status CodeScenario
200All scenarios

Resume torrents

Requires knowing the torrent hashes. You can get it from torrent list.

Name: resume

Parameters:

ParameterTypeDescription
hashesstringThe hashes of the torrents you want to resume. hashes can contain multiple hashes separated by |, to resume multiple torrents, or set to all, to resume all torrents.

Example:

/api/v2/torrents/resume?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439

Returns:

HTTP Status CodeScenario
200All scenarios

Delete torrents

Requires knowing the torrent hashes. You can get it from torrent list.

Name: delete

Parameters:

ParameterTypeDescription
hashesstringThe 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.
deleteFilesIf 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 CodeScenario
200All scenarios

Recheck torrents

Requires knowing the torrent hashes. You can get it from torrent list.

Name: recheck

Parameters:

ParameterTypeDescription
hashesstringThe hashes of the torrents you want to recheck. hashes can contain multiple hashes separated by |, to recheck multiple torrents, or set to all, to recheck all torrents.

Example:

/api/v2/torrents/recheck?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439

Returns:

HTTP Status CodeScenario
200All scenarios

Reannounce torrents

Requires knowing the torrent hashes. You can get it from torrent list.

Name: reannounce

Parameters:

ParameterTypeDescription
hashesstringThe hashes of the torrents you want to reannounce. hashes can contain multiple hashes separated by |, to reannounce multiple torrents, or set to all, to reannounce all torrents.

Example:

/api/v2/torrents/reannounce?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439

Returns:

HTTP Status CodeScenario
200All scenarios

Add new torrent

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.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: multipart/form-data; boundary=---------------------------6688794727912Content-Length: length-----------------------------6688794727912Content-Disposition: form-data; name="urls"https://torcache.net/torrent/3B1A1469C180F447B77021074DBBCCAEF62611E7.torrenthttps://torcache.net/torrent/3B1A1469C180F447B77021074DBBCCAEF62611E8.torrent-----------------------------6688794727912Content-Disposition: form-data; name="savepath"C:/Users/qBit/Downloads-----------------------------6688794727912Content-Disposition: form-data; name="cookie"ui=28979218048197-----------------------------6688794727912Content-Disposition: form-data; name="category"movies-----------------------------6688794727912Content-Disposition: form-data; name="skip_checking"true-----------------------------6688794727912Content-Disposition: form-data; name="paused"true-----------------------------6688794727912Content-Disposition: form-data; name="root_folder"true-----------------------------6688794727912--

Add torrents from files example:

POST /api/v2/torrents/add HTTP/1.1Content-Type: multipart/form-data; boundary=-------------------------acebdf13572468User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Length: length---------------------------acebdf13572468Content-Disposition: form-data; name="torrents"; filename="8f18036b7a205c9347cb84a253975e12f7adddf2.torrent"Content-Type: application/x-bittorrentfile_binary_data_goes_here---------------------------acebdf13572468Content-Disposition: form-data; name="torrents"; filename="UFS.torrent"Content-Type: application/x-bittorrentfile_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).

PropertyTypeDescription
urlsstringURLs separated with newlines
torrentsrawRaw data of torrent file. torrents can be presented multiple times.
savepathoptionalstringDownload folder
cookieoptionalstringCookie sent to download the .torrent file
categoryoptionalstringCategory for the torrent
tagsoptionalstringTags for the torrent, split by ','
skip_checkingoptionalstringSkip hash checking. Possible values are true, false (default)
pausedoptionalstringAdd torrents in the paused state. Possible values are true, false (default)
root_folderoptionalstringCreate the root folder. Possible values are true, false, unset (default)
renameoptionalstringRename torrent
upLimitoptionalintegerSet torrent upload speed limit. Unit in bytes/second
dlLimitoptionalintegerSet torrent download speed limit. Unit in bytes/second
ratioLimitoptionalsince 2.8.1floatSet torrent share ratio limit
seedingTimeLimitoptionalsince 2.8.1integerSet torrent seeding time limit. Unit in minutes
autoTMMoptionalboolWhether Automatic Torrent Management should be used
sequentialDownloadoptionalstringEnable sequential download. Possible values are true, false (default)
firstLastPiecePriooptionalstringPrioritize download first last piece. Possible values are true, false (default)

Returns:

HTTP Status CodeScenario
415Torrent file is not valid
200All other scenarios

Add trackers to torrent

Requires knowing the torrent hash. You can get it from torrent list.

POST /api/v2/torrents/addTrackers HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhash=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 CodeScenario
404Torrent hash was not found
200All other scenarios

Edit trackers

Name: editTracker

Parameters:

ParameterTypeDescription
hashstringThe hash of the torrent
origUrlstringThe tracker URL you want to edit
newUrlstringThe new URL to replace the origUrl

Returns:

HTTP Status CodeScenario
400newUrl is not a valid URL
404Torrent hash was not found
409newUrl already exists for the torrent
409origUrl was not found
200All other scenarios

Remove trackers

Name: removeTrackers

Parameters:

ParameterTypeDescription
hashstringThe hash of the torrent
urlsstringURLs to remove, separated by |

Returns:

HTTP Status CodeScenario
404Torrent hash was not found
409All urls were not found
200All other scenarios

Add peers

Name: addPeers

Parameters:

ParameterTypeDescription
hashesstringThe hash of the torrent, or multiple hashes separated by a pipe |
peersstringThe peer to add, or multiple peers separated by a pipe |. Each peer is a colon-separated host:port

Returns:

HTTP Status CodeScenario
400None of the supplied peers are valid
200All other scenarios

Increase torrent priority

Requires knowing the torrent hash. You can get it from torrent list.

Name: increasePrio

Parameters:

ParameterTypeDescription
hashesstringThe hashes of the torrents you want to increase the priority of. hashes can contain multiple hashes separated by |, to increase the priority of multiple torrents, or set to all, to increase the priority of all torrents.

Example:

/api/v2/torrents/increasePrio?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439

Returns:

HTTP Status CodeScenario
409Torrent queueing is not enabled
200All other scenarios

Decrease torrent priority

Requires knowing the torrent hash. You can get it from torrent list.

Name: decreasePrio

Parameters:

ParameterTypeDescription
hashesstringThe hashes of the torrents you want to decrease the priority of. hashes can contain multiple hashes separated by |, to decrease the priority of multiple torrents, or set to all, to decrease the priority of all torrents.

Example:

/api/v2/torrents/decreasePrio?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439

Returns:

HTTP Status CodeScenario
409Torrent queueing is not enabled
200All other scenarios

Maximal torrent priority

Requires knowing the torrent hash. You can get it from torrent list.

Name: topPrio

Parameters:

ParameterTypeDescription
hashesstringThe hashes of the torrents you want to set to the maximum priority. hashes can contain multiple hashes separated by |, to set multiple torrents to the maximum priority, or set to all, to set all torrents to the maximum priority.

Example:

/api/v2/torrents/topPrio?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439

Returns:

HTTP Status CodeScenario
409Torrent queueing is not enabled
200All other scenarios

Minimal torrent priority

Requires knowing the torrent hash. You can get it from torrent list.

Name: bottomPrio

Parameters:

ParameterTypeDescription
hashesstringThe hashes of the torrents you want to set to the minimum priority. hashes can contain multiple hashes separated by |, to set multiple torrents to the minimum priority, or set to all, to set all torrents to the minimum priority.

Example:

/api/v2/torrents/bottomPrio?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439

Returns:

HTTP Status CodeScenario
409Torrent queueing is not enabled
200All other scenarios

Set file priority

Name: filePrio

Parameters:

ParameterTypeDescription
hashstringThe hash of the torrent
idstringFile ids, separated by |
prioritynumberFile priority to set (consult torrent contents API for possible values)

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 recommended 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 CodeScenario
400Priority is invalid
400At least one file id is not a valid integer
404Torrent hash was not found
409Torrent metadata hasn't downloaded yet
409At least one file id was not found
200All other scenarios

Get torrent download limit

Requires knowing the torrent hash. You can get it from torrent list.

POST /api/v2/torrents/downloadLimit HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0

hashes can contain multiple hashes separated by | or set to all

Server reply (example):

HTTP/1.1 200 OKcontent-type: application/jsoncontent-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.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&limit=131072

hashes can contain multiple hashes separated by | or set to alllimit is the download speed limit in bytes per second you want to set.

Returns:

HTTP Status CodeScenario
200All scenarios

Set torrent share limit

Requires knowing the torrent hash. You can get it from torrent list.

POST /api/v2/torrents/setShareLimits HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&ratioLimit=1.0&seedingTimeLimit=60&inactiveSeedingTimeLimit=-2

Parameters:

PropertyTypeDescription
hashesintegerThe hashes of the torrents for which you want to set the share limits. Multiple hashes need to be separated by | or set to all.
ratioLimitfloatThe maximum seeding ratio for the torrent. -2 means the global limit should be used, -1 means no limit.
seedingTimeLimitintegerThe maximum seeding time (minutes) for the torrent. -2 means the global limit should be used, -1 means no limit.
inactiveSeedingTimeLimitintegerThe maximum amount of time (minutes) the torrent is allowed to seed while being inactive. -2 means the global limit should be used, -1 means no limit.

Returns:

HTTP Status CodeScenario
200All other scenarios
400Bad Request, e.g. missing parameter

Get torrent upload limit

Requires knowing the torrent hash. You can get it from torrent list.

POST /api/v2/torrents/uploadLimit HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0

hashes can contain multiple hashes separated by | or set to all

Server reply (example):

HTTP/1.1 200 OKcontent-type: application/jsoncontent-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.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&limit=131072

hashes can contain multiple hashes separated by | or set to alllimit is the upload speed limit in bytes per second you want to set.

Returns:

HTTP Status CodeScenario
200All scenarios

Set torrent location

Requires knowing the torrent hash. You can get it from torrent list.

POST /api/v2/torrents/setLocation HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&location=/mnt/nfs/media

hashes can contain multiple hashes separated by | or set to alllocation is the location to download the torrent to. If the location doesn't exist, the torrent's location is unchanged.

Returns:

HTTP Status CodeScenario
400Save path is empty
403User does not have write access to directory
409Unable to create save path directory
200All other scenarios

Set torrent name

Requires knowing the torrent hash. You can get it from torrent list.

POST /api/v2/torrents/rename HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhash=8c212779b4abde7c6bc608063a0d008b7e40ce32&name=This%20is%20a%20test

Returns:

HTTP Status CodeScenario
404Torrent hash is invalid
409Torrent name is empty
200All other scenarios

Set torrent category

Requires knowing the torrent hash. You can get it from torrent list.

POST /api/v2/torrents/setCategory HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhashes=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 CodeScenario
409Category name does not exist
200All other scenarios

Get all categories

Name: categories

Parameters:

None

Returns all categories in JSON format, e.g.:

{ "Video": { "name": "Video", "savePath": "/home/user/torrents/video/" }, "eBooks": { "name": "eBooks", "savePath": "/home/user/torrents/eBooks/" } }

Returns:

HTTP Status CodeScenario
200All scenarios

Add new category

POST /api/v2/torrents/createCategory HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthcategory=CategoryName&savePath=/path/to/dir

category is the category you want to create.

Returns:

HTTP Status CodeScenario
400Category name is empty
409Category name is invalid
200All other scenarios

Edit category

POST /api/v2/torrents/editCategory HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthcategory=CategoryName&savePath=/path/to/save/torrents/to

Returns:

HTTP Status CodeScenario
400Category name is empty
409Category editing failed
200All other scenarios

Remove categories

POST /api/v2/torrents/removeCategories HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthcategories=Category1%0ACategory2

categories can contain multiple cateogies separated by \n (%0A urlencoded)

Returns:

HTTP Status CodeScenario
200All scenarios

Add torrent tags

Requires knowing the torrent hash. You can get it from torrent list.

POST /api/v2/torrents/addTags HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhashes=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 CodeScenario
200All scenarios

Remove torrent tags

Requires knowing the torrent hash. You can get it from torrent list.

POST /api/v2/torrents/removeTags HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhashes=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 CodeScenario
200All scenarios

Get all tags

Name: tags

Parameters:

None

Returns all tags in JSON format, e.g.:

[ "Tag 1", "Tag 2" ]

Returns:

HTTP Status CodeScenario
200All scenarios

Create tags

POST /api/v2/torrents/createTags HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthtags=TagName1,TagName2

tags is a list of tags you want to create. Can contain multiple tags separated by ,.

Returns:

HTTP Status CodeScenario
200All scenarios

Delete tags

POST /api/v2/torrents/deleteTags HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthtags=TagName1,TagName2

tags is a list of tags you want to delete. Can contain multiple tags separated by ,.

Returns:

HTTP Status CodeScenario
200All scenarios

Set automatic torrent management

Requires knowing the torrent hash. You can get it from torrent list.

POST /api/v2/torrents/setAutoManagement HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|284b83c9c7935002391129fd97f43db5d7cc2ba0&enable=true

hashes can contain multiple hashes separated by | or set to allenable is a boolean, affects the torrents listed in hashes, default is false

Returns:

HTTP Status CodeScenario
200All scenarios

Toggle sequential download

Requires knowing the torrent hash. You can get it from torrent list.

Name: toggleSequentialDownload

Parameters:

ParameterTypeDescription
hashesstringThe hashes of the torrents you want to toggle sequential download for. hashes can contain multiple hashes separated by |, to toggle sequential download for multiple torrents, or set to all, to toggle sequential download for all torrents.

Example:

/api/v2/torrents/toggleSequentialDownload?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439

Returns:

HTTP Status CodeScenario
200All scenarios

Set first/last piece priority

Requires knowing the torrent hash. You can get it from torrent list.

Name: toggleFirstLastPiecePrio

Parameters:

ParameterTypeDescription
hashesstringThe hashes of the torrents you want to toggle the first/last piece priority for. hashes can contain multiple hashes separated by |, to toggle the first/last piece priority for multiple torrents, or set to all, to toggle the first/last piece priority for all torrents.

Example:

/api/v2/torrents/toggleFirstLastPiecePrio?hashes=8c212779b4abde7c6bc608063a0d008b7e40ce32|54eddd830a5b58480a6143d616a97e3a6c23c439

Returns:

HTTP Status CodeScenario
200All scenarios

Set force start

Requires knowing the torrent hash. You can get it from torrent list.

POST /api/v2/torrents/setForceStart HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhashes=8c212779b4abde7c6bc608063a0d008b7e40ce32?value=true

hashes can contain multiple hashes separated by | or set to allvalue is a boolean, affects the torrents listed in hashes, default is false

Returns:

HTTP Status CodeScenario
200All scenarios

Set super seeding

Requires knowing the torrent hash. You can get it from torrent list.

POST /api/v2/torrents/setSuperSeeding HTTP/1.1User-Agent: FiddlerHost: 127.0.0.1Cookie: SID=your_sidContent-Type: application/x-www-form-urlencodedContent-Length: lengthhashes=8c212779b4abde7c6bc608063a0d008b7e40ce32?value=true

hashes can contain multiple hashes separated by | or set to allvalue is a boolean, affects the torrents listed in hashes, default is false

Returns:

HTTP Status CodeScenario
200All scenarios

Rename file

Name: renameFile

Parameters:

ParameterTypeDescription
hashstringThe hash of the torrent
oldPathstringThe old path of the torrent
newPathstringThe new path to use for the file

Returns:

HTTP Status CodeScenario
400Missing newPath parameter
409Invalid newPath or oldPath, or newPath already in use
200All other scenarios

Rename folder

Name: renameFolder

Parameters:

ParameterTypeDescription
hashstringThe hash of the torrent
oldPathstringThe old path of the torrent
newPathstringThe new path to use for the file

Returns:

HTTP Status CodeScenario
400Missing newPath parameter
409Invalid newPath or oldPath, or newPath already in use
200All other scenarios

RSS (experimental)

All RSS API methods are under "rss", e.g.: /api/v2/rss/methodName.

Add folder

Name: addFolder

Parameters:

ParameterTypeDescription
pathstringFull path of added folder (e.g. "The Pirate Bay\Top100")

Returns:

HTTP Status CodeScenario
409Failure to add folder
200All other scenarios

Add feed

Name: addFeed

Parameters:

ParameterTypeDescription
urlstringURL of RSS feed (e.g. "http://thepiratebay.org/rss//top100/200")
pathoptionalstringFull path of added folder (e.g. "The Pirate Bay\Top100\Video")

Returns:

HTTP Status CodeScenario
409Failure to add feed
200All other scenarios

Remove item

Removes folder or feed.

Name: removeItem

Parameters:

ParameterTypeDescription
pathstringFull path of removed item (e.g. "The Pirate Bay\Top100")

Returns:

HTTP Status CodeScenario
409Failure to remove item
200All other scenarios

Move item

Moves/renames folder or feed.

Name: moveItem

Parameters:

ParameterTypeDescription
itemPathstringCurrent full path of item (e.g. "The Pirate Bay\Top100")
destPathstringNew full path of item (e.g. "The Pirate Bay")

Returns:

HTTP Status CodeScenario
409Failure to move item
200All other scenarios

Get all items

Name: items

Parameters:

ParameterTypeDescription
withDataoptionalboolTrue if you need current feed articles

Returns 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" } }

Mark as read

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:

ParameterTypeDescription
itemPathstringCurrent full path of item (e.g. "The Pirate Bay\Top100")
articleIdoptionalstringID of article

Returns:

HTTP Status CodeScenario
200All scenarios

Refresh item

Refreshes folder or feed.

Name: refreshItem

Parameters:

ParameterTypeDescription
itemPathstringCurrent full path of item (e.g. "The Pirate Bay\Top100")

Returns:

HTTP Status CodeScenario
200All scenarios

Set auto-downloading rule

Name: setRule

Parameters:

ParameterTypeDescription
ruleNamestringRule name (e.g. "Punisher")
ruleDefstringJSON encoded rule definition

Rule definition is JSON encoded dictionary with the following fields:

FieldTypeDescription
enabledboolWhether the rule is enabled
mustContainstringThe substring that the torrent name must contain
mustNotContainstringThe substring that the torrent name must not contain
useRegexboolEnable regex mode in "mustContain" and "mustNotContain"
episodeFilterstringEpisode filter definition
smartFilterboolEnable smart episode filter
previouslyMatchedEpisodeslistThe list of episode IDs already matched by smart filter
affectedFeedslistThe feed URLs the rule applied to
ignoreDaysnumberIgnore sunsequent rule matches
lastMatchstringThe rule last match time
addPausedboolAdd matched torrent in paused mode
assignedCategorystringAssign category to the torrent
savePathstringSave torrent to the given directory

E.g.:

{ "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" }

Rename auto-downloading rule

Name: renameRule

Parameters:

ParameterTypeDescription
ruleNamestringRule name (e.g. "Punisher")
newRuleNamestringNew rule name (e.g. "The Punisher")

Returns:

HTTP Status CodeScenario
200All scenarios

Remove auto-downloading rule

Name: removeRule

Parameters:

ParameterTypeDescription
ruleNamestringRule name (e.g. "Punisher")

Returns:

HTTP Status CodeScenario
200All scenarios

Get all auto-downloading rules

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 CodeScenario
200All scenarios

Get all articles matching a rule

Name: matchingArticles

ParameterTypeDescription
ruleNamestringRule name (e.g. "Linux")

Returns 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 CodeScenario
200All scenarios

Search

All Search API methods are under "search", e.g.: /api/v2/search/methodName.

Start search

Name: start

Parameters:

ParameterTypeDescription
patternstringPattern to search for (e.g. "Ubuntu 18.04")
pluginsstringPlugins to use for searching (e.g. "legittorrents"). Supports multiple plugins separated by |. Also supports all and enabled
categorystringCategories to limit your search to (e.g. "legittorrents"). Available categories depend on the specified plugins. Also supports all

Returns:

HTTP Status CodeScenario
409User has reached the limit of max Running searches (currently set to 5)
200All other scenarios- see JSON below

The response is a JSON object with the following fields

FieldTypeDescription
idnumberID of the search job

Example:

{ "id": 12345 }

Stop search

Name: stop

Parameters:

ParameterTypeDescription
idnumberID of the search job

Returns:

HTTP Status CodeScenario
404Search job was not found
200All other scenarios

Get search status

Name: status

Parameters:

ParameterTypeDescription
idoptionalnumberID of the search job. If not specified, all search jobs are returned

Returns:

HTTP Status CodeScenario
404Search job was not found
200All other scenarios- see JSON below

The response is a JSON array of objects containing the following fields

FieldTypeDescription
idnumberID of the search job
statusstringCurrent status of the search job (either Running or Stopped)
totalnumberTotal number of results. If the status is Running this number may contineu to increase

Example:

[ { "id": 12345, "status": "Running", "total": 170 } ]

Get search results

Name: results

Parameters:

ParameterTypeDescription
idnumberID of the search job
limitoptionalnumbermax number of results to return. 0 or negative means no limit
offsetoptionalnumberresult to start at. A negative number means count backwards (e.g. -2 returns the 2 most recent results)

Returns:

HTTP Status CodeScenario
404Search job was not found
409Offset is too large, or too small (e.g. absolute value of negative number is greater than # results)
200All other scenarios- see JSON below

The response is a JSON object with the following fields

FieldTypeDescription
resultsarrayArray of result objects- see table below
statusstringCurrent status of the search job (either Running or Stopped)
totalnumberTotal number of results. If the status is Running this number may continue to increase

Result object:

FieldTypeDescription
descrLinkstringURL of the torrent's description page
fileNamestringName of the file
fileSizenumberSize of the file in Bytes
fileUrlstringTorrent download link (usually either .torrent file or magnet link)
nbLeechersnumberNumber of leechers
nbSeedersnumberNumber of seeders
siteUrlstringURL of the torrent site

Example:

{ "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 }

Delete search

Name: delete

Parameters:

ParameterTypeDescription
idnumberID of the search job

Returns:

HTTP Status CodeScenario
404Search job was not found
200All other scenarios

Get search plugins

Name: plugins

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios- see JSON below

The response is a JSON array of objects containing the following fields

FieldTypeDescription
enabledboolWhether the plugin is enabled
fullNamestringFull name of the plugin
namestringShort name of the plugin
supportedCategoriesarrayList of category objects
urlstringURL of the torrent site
versionstringInstalled version of the plugin
[ { "enabled": true, "fullName": "Legit Torrents", "name": "legittorrents", "supportedCategories": [{ "id": "all", "name": "All categories" }, { "id": "anime", "name": "Anime" }, { "id": "books", "name": "Books" }, { "id": "games", "name": "Games" }, { "id": "movies", "name": "Movies" }, { "id": "music", "name": "Music" }, { "id": "tv", "name": "TV shows" }], "url": "http://www.legittorrents.info", "version": "2.3" } ]

Install search plugin

Name: installPlugin

Parameters:

ParameterTypeDescription
sourcesstringUrl or file path of the plugin to install (e.g. "https://raw.githubusercontent.com/qbittorrent/search-plugins/master/nova3/engines/legittorrents.py"). Supports multiple sources separated by |

Returns:

HTTP Status CodeScenario
200All scenarios

Uninstall search plugin

Name: uninstallPlugin

Parameters:

ParameterTypeDescription
namesstringName of the plugin to uninstall (e.g. "legittorrents"). Supports multiple names separated by |

Returns:

HTTP Status CodeScenario
200All scenarios

Enable search plugin

Name: enablePlugin

Parameters:

ParameterTypeDescription
namesstringName of the plugin to enable/disable (e.g. "legittorrents"). Supports multiple names separated by |
enableboolWhether the plugins should be enabled

Returns:

HTTP Status CodeScenario
200All scenarios

Update search plugins

Name: updatePlugins

Parameters:

None

Returns:

HTTP Status CodeScenario
200All scenarios

WebAPI versioning

WebAPI uses the following versioning: 1.2.3:

  1. Main version. Should be changed only on some global changes (e.g. total redesign/relayout)
  2. Changed on incompatible API changes (i.e. if it breaks outdated clients). E.g. if you change/remove something
  3. Changed on compatible API changes (i.e. if it doesn't break outdated clients). E.g. if you add something new outdated clients still can access old subset of API.

General

Troubleshooting

External programs

Search plugins

Themes

Translation


WebUI

WebUI API

StateVersion
CurrentqBittorrent >= 5.0
PreviousqBittorrent v4.1.0 - v4.6.x
PreviousqBittorrent v3.2.0 - v4.0.x
ObsoleteqBittorrent < v3.2.0

WebAPI clients

Alternate WebUI

Reverse proxy setup for WebUI access

WebUI HTTPS configuration


Linux


Development

Compilation

Common information for CMake

*BSD, Linux

macOS

Windows

Obsolete compilation guides

Clone this wiki locally
close