Qbittorrent API
Apps & Automationqbittorrent-apiQbittorrent API is an Agent Skill for apps & automation published in the tympanix/Electorrent repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
qBittorrent WebUI API reference covering authentication, sync, transfer, torrent, RSS, and search endpoints for qBittorrent 5.0+.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/tympanix/Electorrent/blob/HEAD/.github/skills/qbittorrent-api/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/qbittorrent-api, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Skill: qBittorrent API
Purpose
Use this skill when you need to integrate with qBittorrent's WebUI API.
Protocol
- Base path:
/api/v2 - Reads usually use
GET; mutations usePOST - Wrong method returns
405 Method Not Allowedon modern servers - All routes require authentication except
/api/v2/auth/login
Authentication
qBittorrent uses cookie-based auth.
POST /api/v2/auth/login- form params:
username,password - success returns
200and setsSIDcookie - failed-rate-limit ban returns
403
- form params:
POST /api/v2/auth/logout
Send Referer or Origin matching the request host/port.
Common route groups
| Group | Base | Notes |
|---|---|---|
| Auth | /api/v2/auth/* | Login/logout |
| Application | /api/v2/app/* | Version, preferences, cookies, save path |
| Log | /api/v2/log/* | Main log and peer log |
| Sync | /api/v2/sync/* | Incremental state updates |
| Transfer | /api/v2/transfer/* | Global rates and limits |
| Torrents | /api/v2/torrents/* | List, inspect, mutate, files, categories, tags |
| RSS | /api/v2/rss/* | Feed and rule management |
| Search | /api/v2/search/* | Search jobs and plugins |
Most important endpoints
Application
GET /app/versionGET /app/webapiVersionGET /app/buildInfoGET /app/preferencesPOST /app/setPreferences- form/json param:
json={...}
- form/json param:
GET /app/defaultSavePathGET /app/cookiesPOST /app/setCookies
Sync
GET /sync/maindata?rid=<rid>- returns
rid,full_update,torrents,torrents_removed,categories,categories_removed,tags,tags_removed,server_state
- returns
GET /sync/torrentPeers?hash=<hash>&rid=<rid>
Use sync/maindata for efficient polling instead of repeatedly calling full torrent list endpoints.
Transfer
GET /transfer/infoGET /transfer/speedLimitsModePOST /transfer/toggleSpeedLimitsModeGET /transfer/downloadLimitPOST /transfer/setDownloadLimit- param:
limitbytes/sec
- param:
GET /transfer/uploadLimitPOST /transfer/setUploadLimit- param:
limitbytes/sec
- param:
POST /transfer/banPeers- param:
peers=host:port|host:port
- param:
Torrent listing and inspection
GET /torrents/info- filters:
filter,category,tag,sort,reverse,limit,offset,hashes
- filters:
GET /torrents/properties?hash=<hash>GET /torrents/trackers?hash=<hash>GET /torrents/webseeds?hash=<hash>GET /torrents/files?hash=<hash>GET /torrents/pieceStates?hash=<hash>GET /torrents/pieceHashes?hash=<hash>
Important torrents/info response fields include state, progress, rates, ETA, save path, category, tags, tracker, queue position, availability, and content sizes.
Torrent lifecycle and mutation
POST /torrents/pausePOST /torrents/resumePOST /torrents/delete- params:
hashes,deleteFiles
- params:
POST /torrents/recheckPOST /torrents/reannouncePOST /torrents/add- multipart fields:
urlstorrents(repeatable file part)- optional
savepath,category,tags,skip_checking,paused,root_folder,rename,upLimit,dlLimit,ratioLimit,seedingTimeLimit,autoTMM,sequentialDownload,firstLastPiecePrio
- multipart fields:
POST /torrents/addTrackersPOST /torrents/editTrackerPOST /torrents/removeTrackersPOST /torrents/addPeers
Priority and per-file control
POST /torrents/increasePrioPOST /torrents/decreasePrioPOST /torrents/topPrioPOST /torrents/bottomPrioPOST /torrents/filePrio- params:
hash,id,priority - use
indexfrom/torrents/fileswhen available
- params:
Limits, location, and naming
POST /torrents/downloadLimitPOST /torrents/setDownloadLimitPOST /torrents/setShareLimitsPOST /torrents/uploadLimitPOST /torrents/setUploadLimitPOST /torrents/setLocationPOST /torrents/renamePOST /torrents/setCategoryGET /torrents/categoriesPOST /torrents/createCategoryPOST /torrents/editCategoryPOST /torrents/removeCategoriesPOST /torrents/addTagsPOST /torrents/removeTagsGET /torrents/tagsPOST /torrents/createTagsPOST /torrents/deleteTagsPOST /torrents/setAutoManagementPOST /torrents/toggleSequentialDownloadPOST /torrents/toggleFirstLastPiecePrioPOST /torrents/setForceStartPOST /torrents/setSuperSeedingPOST /torrents/renameFilePOST /torrents/renameFolder
RSS and search
RSS is under /api/v2/rss/* and search is under /api/v2/search/*.
Important endpoints:
- RSS:
addFolder,addFeed,removeItem,moveItem,items,markAsRead,refreshItem, rule CRUD,articles - Search:
start,stop,status,results,delete, plugin list/install/uninstall/enable/update`
Electorrent usage
Electorrent primarily depends on:
- auth login/logout
sync/maindatatorrents/addtorrents/files+torrents/filePrio- pause/resume/recheck/delete
- priority operations
- category management
- sequential download and first/last piece priority toggles