/install bilibili-search
Bilibili(B站)数据查询
查询B站视频、UP主、热榜数据。无需 API Key,即装即用,大陆直连可用。
用法
python3 skills/bilibili/scripts/bilibili.py '\x3CJSON>'
功能一览
1. 搜索视频 search
python3 scripts/bilibili.py '{"action":"search","query":"AI大模型","count":10,"order":"totalrank"}'
参数:
| 参数 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
| action | str | 是 | - | "search" |
| query | str | 是 | - | 搜索关键词 |
| page | int | 否 | 1 | 页码 |
| count | int | 否 | 10 | 每页数量(最多20) |
| order | str | 否 | totalrank |
排序:totalrank综合 / click播放量 / pubdate最新 / dm弹幕 / stow收藏 |
返回格式:
{
"total": 1000,
"page": 1,
"results": [
{
"bvid": "BV1xx411c7mD",
"url": "https://www.bilibili.com/video/BV1xx411c7mD",
"title": "视频标题",
"author": "UP主名称",
"mid": 123456,
"play": 100000,
"danmaku": 500,
"favorites": 2000,
"like": 3000,
"pubdate": 1700000000,
"duration": "10:30",
"desc": "视频简介前100字..."
}
]
}
展示时必须包含: bvid、url、title、author、play(播放量)
2. 视频详情 video
python3 scripts/bilibili.py '{"action":"video","bvid":"BV1GJ411x7h7"}'
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| action | str | 是 | "video" |
| bvid | str | 是 | 视频BV号,如 BV1GJ411x7h7 |
返回格式:
{
"bvid": "BV1GJ411x7h7",
"url": "https://www.bilibili.com/video/BV1GJ411x7h7",
"title": "视频标题",
"desc": "视频简介",
"owner": {
"name": "UP主名称",
"mid": 123456
},
"pubdate": 1700000000,
"duration": 213,
"tags": ["标签1", "标签2"],
"stat": {
"view": 97000000,
"danmaku": 135000,
"reply": 184000,
"favorite": 1393000,
"coin": 1152000,
"share": 434000,
"like": 2653000
}
}
展示时必须包含: bvid、url、title、owner.name、全部 stat 数据
3. UP主信息 user
python3 scripts/bilibili.py '{"action":"user","mid":123456}'
参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| action | str | 是 | "user" |
| mid | int | 是 | UP主UID |
返回格式:
{
"mid": 123456,
"name": "UP主昵称",
"followers": 1382687,
"following": 414,
"videos": 42,
"url": "https://space.bilibili.com/123456"
}
展示时必须包含: mid、url、name、followers(粉丝数)、videos(投稿数)
4. 热门视频 popular
python3 scripts/bilibili.py '{"action":"popular","count":10}'
参数:
| 参数 | 类型 | 必填 | 默认 | 说明 |
|---|---|---|---|---|
| action | str | 是 | - | "popular" |
| count | int | 否 | 10 | 获取数量(最多100) |
返回格式:
{
"results": [
{
"bvid": "BV1xx411c7mD",
"url": "https://www.bilibili.com/video/BV1xx411c7mD",
"title": "视频标题",
"owner": "UP主名称",
"view": 5000000,
"like": 500000,
"danmaku": 10000
}
]
}
展示时必须包含: bvid、url、title、owner、view(播放量)、like(点赞数)
5. 热搜榜 hot_search
python3 scripts/bilibili.py '{"action":"hot_search"}'
无需参数,返回实时热搜 Top20。
返回格式:
{
"hot_search": [
{
"rank": 1,
"keyword": "热搜关键词",
"search_url": "https://search.bilibili.com/all?keyword=...",
"hot_id": 241546
}
]
}
展示时必须包含: rank、keyword、search_url,格式如下:
#1 热搜关键词
搜索链接: https://search.bilibili.com/all?keyword=...
完整示例
# 搜索最新AI视频(按发布时间)
python3 scripts/bilibili.py '{"action":"search","query":"Claude AI","order":"pubdate","count":5}'
# 查询视频详情
python3 scripts/bilibili.py '{"action":"video","bvid":"BV1GJ411x7h7"}'
# 查看UP主信息
python3 scripts/bilibili.py '{"action":"user","mid":2}'
# 今日热门视频 Top10
python3 scripts/bilibili.py '{"action":"popular","count":10}'
# 实时热搜榜
python3 scripts/bilibili.py '{"action":"hot_search"}'
说明
- 无需 API Key,基于B站公开接口
- 大陆直连可用,无需代理,无需登录
- 接口为公开接口,稳定性较好,但可能随B站更新变化
- 请合理控制调用频率,避免触发风控
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install bilibili-search - After installation, invoke the skill by name or use
/bilibili-search - Provide required inputs per the skill's parameter spec and get structured output
What is Bilibili Search?
B站(哔哩哔哩)数据查询工具。搜索视频、获取视频详情和数据、查看UP主信息、热门排行榜、热搜榜。无需 API Key,即装即用。Use when you need to search Bilibili videos, get video stats, check UP主 info, browse popular... It is an AI Agent Skill for Claude Code / OpenClaw, with 1004 downloads so far.
How do I install Bilibili Search?
Run "/install bilibili-search" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Bilibili Search free?
Yes, Bilibili Search is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Bilibili Search support?
Bilibili Search is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Bilibili Search?
It is built and maintained by Songrat (@songrat); the current version is v0.1.0.