Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计提醒

qbittorrent-apiqbittorrent API 搜索

Agent Skill

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

总安装

4,681

周安装

197

GitHub Stars

公开资料未说明

下载量

1,639
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:qbittorrent-api(qbittorrent API 搜索)
来源仓库:https://github.com/hxbreak/qbittorrent-api
安装命令:
openclaw skills install qbittorrent-api
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install qbittorrent-api

简介

辅助使用 qBittorrent Web API 进行种子管理、下载控制与状态查询。

  • 适合需要自动化添加种子、暂停恢复任务或监控下载进度的场景。
  • 提供 curl 示例和接口结构说明,便于前后端联调与文档生成。
  • 需确认 API 地址、端口及认证方式(如用户名密码或 Token)。
  • 操作可能影响本地网络流量,建议在非高峰时段执行关键命令。

SKILL.md

name
qbittorrent-api
description
Use when working with qBittorrent Web API - adding torrents, managing downloads, checking status, or any qBittorrent automation task. Includes curl examples and common patterns.

qBittorrent Web API

配置信息

优先级顺序

  1. 项目目录的 .env 文件(默认)
  2. 项目 CLAUDE.md 文件
  3. 询问用户提供
# .env 文件格式
QB_URL="http://192.168.31.88:8080"
QB_USER="admin"
QB_PASS="123123"
注意: 执行任何 API 操作前,先检查 .env 文件是否存在并包含配置。如果缺少配置,询问用户。

认证

qBittorrent 使用 cookie-based 认证

# 配置(从 .env 读取)
source .env 2>/dev/null || true
COOKIE_FILE="/tmp/qb_cookies.txt"

# 登录并保存 cookie
curl -c "$COOKIE_FILE" -b "$COOKIE_FILE" \
  -H "Referer: $QB_URL" \
  -d "username=$QB_USER&password=$QB_PASS" \
  "$QB_URL/api/v2/auth/login"

# 登出
curl -c "$COOKIE_FILE" -b "$COOKIE_FILE" \
  "$QB_URL/api/v2/auth/logout"

重要: 登录请求需要 Referer header。


API 端点速查

认证 /api/v2/auth

操作端点方法参数
登录/loginPOSTusername, password
登出/logoutPOST-

种子管理 /api/v2/torrents

操作端点方法参数
种子列表/infoGETfilter, hashes, category, tag
种子数量/countGETfilter
种子详情/propertiesGEThash
添加种子/addPOSTurls, savepath, category, tags
删除种子/deletePOSThashes, deleteFiles
开始/startPOSThashes
停止/stopPOSThashes
重新检查/recheckPOSThashes
重新宣告/reannouncePOSThashes
重命名/renamePOSThash, name
设置注释/setCommentPOSThashes, comment

文件管理 /api/v2/torrents

操作端点方法参数
文件列表/filesGEThash
文件优先级/filePrioPOSThash, id, priority
重命名文件/renameFilePOSThash, oldPath, newPath
重命名文件夹/renameFolderPOSThash, oldPath, newPath

速度限制 /api/v2/torrents

操作端点方法参数
获取下载限速/downloadLimitGEThashes
获取上传限速/uploadLimitGEThashes
设置下载限速/setDownloadLimitPOSThashes, limit
设置上传限速/setUploadLimitPOSThashes, limit
设置分享限制/setShareLimitsPOSThashes, ratioLimit, seedingTimeLimit

优先级 /api/v2/torrents

操作端点方法参数
提高优先级/increasePrioPOSThashes
降低优先级/decreasePrioPOSThashes
最高优先级/topPrioPOSThashes
最低优先级/bottomPrioPOSThashes

路径管理 /api/v2/torrents

操作端点方法参数
设置保存路径/setLocationPOSThashes, location
设置保存目录/setSavePathPOSThashes, path
设置下载目录/setDownloadPathPOSThashes, path

分类管理 /api/v2/torrents

操作端点方法参数
获取分类/categoriesGET-
创建分类/createCategoryPOSTcategory, savePath
编辑分类/editCategoryPOSTcategory, savePath
删除分类/removeCategoriesPOSTcategories
设置分类/setCategoryPOSThashes, category

标签管理 /api/v2/torrents

操作端点方法参数
获取标签/tagsGET-
创建标签/createTagsPOSTtags
删除标签/deleteTagsPOSTtags
添加标签/addTagsPOSThashes, tags
设置标签/setTagsPOSThashes, tags
移除标签/removeTagsPOSThashes, tags

Tracker 管理 /api/v2/torrents

操作端点方法参数
获取 Trackers/trackersGEThash
添加 Trackers/addTrackersPOSThash, urls
编辑 Tracker/editTrackerPOSThash, origUrl, newUrl
删除 Trackers/removeTrackersPOSThash, urls

Web Seeds 管理 /api/v2/torrents

操作端点方法参数
获取 Web Seeds/webseedsGEThash
添加 Web Seeds/addWebSeedsPOSThash, urls
编辑 Web Seed/editWebSeedPOSThash, origUrl, newUrl
删除 Web Seeds/removeWebSeedsPOSThash, urls

Peers 管理 /api/v2/torrents

操作端点方法参数
添加 Peers/addPeersPOSThashes, peers

其他设置 /api/v2/torrents

操作端点方法参数
自动管理/setAutoManagementPOSThashes, enable
超级做种/setSuperSeedingPOSThashes, value
强制开始/setForceStartPOSThashes, value
顺序下载/toggleSequentialDownloadPOSThashes
首尾块优先/toggleFirstLastPiecePrioPOSThashes

传输信息 /api/v2/transfer

操作端点方法参数
传输信息/infoGET-
下载限速/downloadLimitGET-
上传限速/uploadLimitGET-
设置下载限速/setDownloadLimitPOSTlimit
设置上传限速/setUploadLimitPOSTlimit
切换备用限速/toggleSpeedLimitsModePOST-

应用程序 /api/v2/app

操作端点方法参数
版本/versionGET-
API 版本/webapiVersionGET-
构建信息/buildInfoGET-
关闭/shutdownPOST-
获取设置/preferencesGET-
设置偏好/setPreferencesPOSTjson
默认保存路径/defaultSavePathGET-

日志 /api/v2/log

操作端点方法参数
日志/mainGETnormal, info, warning, critical
Peer 日志/peersGETlast_known_id

同步 /api/v2/sync

操作端点方法参数
主数据/maindataGETrid
种子 Peers/torrentPeersGEThash, rid

RSS /api/v2/rss

操作端点方法参数
添加文件夹/addFolderPOSTpath
添加订阅/addFeedPOSTurl, path
移除/removeItemPOSTpath
移动/moveItemPOSTitemPath, destPath
获取文章/itemsGETwithData
标记已读/markAsReadPOSTitemPath, articleId
刷新/refreshItemPOSTitemPath
设置自动下载规则/setRulePOSTruleName, ruleDef
删除规则/removeRulePOSTruleName
获取规则/rulesGET-
匹配规则/matchingArticlesGETruleName

搜索 /api/v2/search

操作端点方法参数
启动搜索/startPOSTpattern, plugins, category
停止搜索/stopPOSTid
搜索状态/statusGETid
搜索结果/resultsGETid, limit, offset
删除搜索/deletePOSTid
获取插件/pluginsGET-
安装插件/installPluginPOSTsources
卸载插件/uninstallPluginPOSTnames
启用插件/enablePluginPOSTnames, enable
更新插件/updatePluginsPOST-

单位说明

参数单位换算
limit (限速)bytes/second1 MB/s = 1048576
sizebytes-
progress0-1 浮点数0.5 = 50%
priority整数0=不下载, 1=正常, 6=高, 7=最大

种子状态

状态含义
error错误
missingFiles文件丢失
uploading做种中
pausedUP暂停做种
queuedUP排队做种
stalledUP做种停滞
checkingUP检查中
forcedUP强制做种
allocating分配空间
downloading下载中
metaDL下载元数据
pausedDL暂停下载
queuedDL排队下载
stalledDL下载停滞
checkingDL检查中
forcedDL强制下载
checkingResumeData检查恢复数据
moving移动中
unknown未知

过滤器

torrents/info 支持的过滤器:

  • all - 全部
  • downloading - 下载中
  • seeding - 做种中
  • completed - 已完成
  • paused - 已暂停
  • active - 活跃
  • inactive - 不活跃
  • resumed - 已恢复
  • stalled - 停滞
  • stalled_uploading - 上传停滞
  • stalled_downloading - 下载停滞
  • errored - 错误

添加种子工作流

重要: 添加种子前必须先查询已有保存路径,然后询问用户保存位置。

步骤 1: 查询已有保存路径

# 获取已有保存路径(按使用频率排序,显示前 10 个)
curl -c cookies.txt -b cookies.txt \
  "$QB_URL/api/v2/torrents/info" | \
  jq -r '.[].save_path' | sort | uniq -c | sort -rn | head -10

# 获取默认保存路径
curl -c cookies.txt -b cookies.txt \
  "$QB_URL/api/v2/app/defaultSavePath"

步骤 2: 询问用户保存位置

使用 AskUserQuestion 工具,展示已有路径供用户选择:

问题: 下载文件保存到哪个目录?

选项:
- /m2/ani/番剧 (最常用)
- /m2/movies
- /downloads (默认)
- 其他路径 (用户自定义)

步骤 3: 添加种子

用户选择路径后,执行添加操作:

# Magnet link(用户选择或指定的路径)
curl -c cookies.txt -b cookies.txt \
  -d "urls=magnet:?xt=urn:btih:xxxx" \
  -d "savepath=$USER_SELECTED_PATH" \
  "$QB_URL/api/v2/torrents/add"

# 带分类和标签
curl -c cookies.txt -b cookies.txt \
  -d "urls=magnet:?xt=urn:btih:xxxx" \
  -d "savepath=$USER_SELECTED_PATH" \
  -d "category=movies" \
  -d "tags=hd,2024" \
  "$QB_URL/api/v2/torrents/add"

# Torrent 文件
curl -c cookies.txt -b cookies.txt \
  -F "torrents=@file.torrent" \
  -d "savepath=$USER_SELECTED_PATH" \
  "$QB_URL/api/v2/torrents/add"

其他操作示例

获取种子列表

# 全部
curl -c cookies.txt -b cookies.txt \
  "$QB_URL/api/v2/torrents/info"

# 按状态过滤
curl -c cookies.txt -b cookies.txt \
  "$QB_URL/api/v2/torrents/info?filter=downloading"

# 按分类过滤
curl -c cookies.txt -b cookies.txt \
  "$QB_URL/api/v2/torrents/info?category=movies"

# 按标签过滤
curl -c cookies.txt -b cookies.txt \
  "$QB_URL/api/v2/torrents/info?tag=hd"

# 指定种子
curl -c cookies.txt -b cookies.txt \
  "$QB_URL/api/v2/torrents/info?hashes=abc123,def456"

控制种子

# 开始
curl -c cookies.txt -b cookies.txt \
  -d "hashes=abc123" \
  "$QB_URL/api/v2/torrents/start"

# 停止
curl -c cookies.txt -b cookies.txt \
  -d "hashes=abc123" \
  "$QB_URL/api/v2/torrents/stop"

### 删除种子

> **重要**: 删除种子时的 `deleteFiles` 参数规则:
>
> | 场景 | deleteFiles | 说明 |
> |------|-------------|------|
> | **默认行为** | `false` | 只删除任务,保留已下载的文件 |
> | 用户明确要求删除文件 | `true` | 用户指定要删除文件时 |
> | 未下载完成的种子 | `true` | progress < 100% 时,删除不完整的文件 |
>
> **安全原则**: 除非用户明确指定或种子未完成,否则默认不删除文件。

删除种子(保留文件)- 默认行为

curl -c cookies.txt -b cookies.txt \ -d "hashes=abc123&deleteFiles=false" \ "$QB_URL/api/v2/torrents/delete"

删除种子(同时删除文件)- 用户明确要求时

curl -c cookies.txt -b cookies.txt \ -d "hashes=abc123&deleteFiles=true" \ "$QB_URL/api/v2/torrents/delete"

删除多个种子(用 | 分隔)

curl -c cookies.txt -b cookies.txt \ -d "hashes=abc123|def456|ghi789&deleteFiles=false" \ "$QB_URL/api/v2/torrents/delete"

删除全部种子

curl -c cookies.txt -b cookies.txt \ -d "hashes=all&deleteFiles=false" \ "$QB_URL/api/v2/torrents/delete"


**删除前建议检查**:

检查种子是否完成 (progress=1 表示 100%)

curl -c cookies.txt -b cookies.txt \ "$QB_URL/api/v2/torrents/info?hashes=abc123" | jq '.[0].progress'


#### 删除 API 参数

| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| `hashes` | string | ✅ | 种子 hash,多个用 `\|` 分隔,`all` 删除全部 |
| `deleteFiles` | bool | ❌ | 是否删除文件,默认 `false` |

### 设置限速

设置种子下载限速 1 MB/s

curl -c cookies.txt -b cookies.txt \ -d "hashes=abc123&limit=1048576" \ "$QB_URL/api/v2/torrents/setDownloadLimit"

设置种子上传限速 512 KB/s

curl -c cookies.txt -b cookies.txt \ -d "hashes=abc123&limit=524288" \ "$QB_URL/api/v2/torrents/setUploadLimit"

全局限速

curl -c cookies.txt -b cookies.txt \ -d "limit=1048576" \ "$QB_URL/api/v2/transfer/setDownloadLimit"


### 分类和标签

创建分类

curl -c cookies.txt -b cookies.txt \ -d "category=movies&savePath=/downloads/movies" \ "$QB_URL/api/v2/torrents/createCategory"

设置分类

curl -c cookies.txt -b cookies.txt \ -d "hashes=abc123&category=movies" \ "$QB_URL/api/v2/torrents/setCategory"

创建标签

curl -c cookies.txt -b cookies.txt \ -d "tags=hd,4k" \ "$QB_URL/api/v2/torrents/createTags"

添加标签

curl -c cookies.txt -b cookies.txt \ -d "hashes=abc123&tags=hd" \ "$QB_URL/api/v2/torrents/addTags"


### 文件优先级

设置文件优先级

priority: 0=不下载, 1=正常, 6=高, 7=最大

curl -c cookies.txt -b cookies.txt \ -d "hash=abc123&id=0&priority=0" \ "$QB_URL/api/v2/torrents/filePrio"


### Tracker 管理

获取 trackers

curl -c cookies.txt -b cookies.txt \ "$QB_URL/api/v2/torrents/trackers?hash=abc123"

添加 tracker

curl -c cookies.txt -b cookies.txt \ -d "hash=abc123&urls=udp://tracker.example.com:1337/announce" \ "$QB_URL/api/v2/torrents/addTrackers"


### 获取传输信息

curl -c cookies.txt -b cookies.txt \ "$QB_URL/api/v2/transfer/info"


返回示例:

{ "dl_info_speed": 1048576, "dl_info_data": 10737418240, "up_info_speed": 524288, "up_info_data": 5368709120, "dl_rate_limit": 0, "up_rate_limit": 0, "dht_nodes": 1234, "connection_status": "connected" }


---

## 完整脚本模板

#!/bin/bash

配置 - 从 CLAUDE.md 获取或使用环境变量

QB_URL="${QB_URL:-http://192.168.31.88:8080}" QB_USER="${QB_USER:-admin}" QB_PASS="${QB_PASS:-123123}" COOKIE_FILE="/tmp/qb_cookies.txt"

登录

qb_login() { curl -s -c "$COOKIE_FILE" -b "$COOKIE_FILE" \ -H "Referer: $QB_URL" \ -d "username=$QB_USER&password=$QB_PASS" \ "$QB_URL/api/v2/auth/login" }

登出

qb_logout() { curl -s -c "$COOKIE_FILE" -b "$COOKIE_FILE" \ "$QB_URL/api/v2/auth/logout" rm -f "$COOKIE_FILE" }

GET 请求

qb_get() { local endpoint="$1" curl -s -c "$COOKIE_FILE" -b "$COOKIE_FILE" \ "$QB_URL/api/v2/$endpoint" }

POST 请求

qb_post() { local endpoint="$1" local data="$2" curl -s -c "$COOKIE_FILE" -b "$COOKIE_FILE" \ -d "$data" \ "$QB_URL/api/v2/$endpoint" }

使用示例

qb_login

获取下载中的种子

qb_get "torrents/info?filter=downloading" | jq '.'

添加种子

qb_post "torrents/add" "urls=magnet:?xt=urn:btih:xxxx&savepath=/downloads"

qb_logout


---

## 常见问题

| 问题 | 解决方案 |
|------|----------|
| 登录失败 | 检查 Referer header |
| Cookie 不生效 | 确保同时使用 `-c` 和 `-b` |
| 限速不生效 | 单位是 bytes/s,不是 KB/s |
| 找不到种子 | 用 `torrents/info` 查询 hash |
| 中文乱码 | 确保 URL 编码 |
| 403 Forbidden | 检查白名单设置或 CSRF 保护 |

---

## 官方文档

- OpenAPI: https://www.qbittorrent.org/openapi-demo/
- Wiki: https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)
- API Changelog: https://github.com/qbittorrent/qBittorrent/blob/master/WebAPI_Changelog.md

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

95.92%
按下载量换算1,572

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills