视频搜索
按关键词搜索哔哩哔哩视频,支持基于页面的分页,并可按照综合排名、播放量、发布时间、弹幕数或收藏数排序。用于支持内容发现、话题研究或排名导向的搜索。
参数
| 参数 | 必填 | 类型 | 说明 | 示例 | 可选值 |
|---|---|---|---|---|---|
keyword |
必填 | string | 搜索关键词。 | 咖啡 |
— |
page |
可选 | string | 用于分页的页码。 | 1 |
— |
order |
可选 | string | 搜索结果排序标准。 可用值: - `general`: 综合 - `click`: 最多播放 - `pubdate`: 最新发布 - `dm`: 最多弹幕 - `stow`: 最多收藏 | general |
generalclickpubdatedmstow |
代码示例
curl -G "https://api.mofa-ai.com/v1/bilibili/search_video_v2" \
-H "Authorization: Bearer $MOFA_API_KEY" \
--data-urlencode 'keyword=咖啡' \
--data-urlencode 'page=1' \
--data-urlencode 'order=general'
import os
import requests
resp = requests.get(
"https://api.mofa-ai.com/v1/bilibili/search_video_v2",
headers={"Authorization": f"Bearer {os.environ['MOFA_API_KEY']}"},
params={
"keyword": "咖啡",
"page": "1",
"order": "general",
},
timeout=60,
)
body = resp.json()
if body["success"]:
print(body["cost_usd"], body["data"])
else:
print(body["error"], body["message"])
const url = new URL("https://api.mofa-ai.com/v1/bilibili/search_video_v2");
url.search = new URLSearchParams({
keyword: "咖啡",
page: "1",
order: "general",
});
const resp = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.MOFA_API_KEY}` },
});
const body = await resp.json();
if (body.success) console.log(body.cost_usd, body.data);
else console.error(body.error, body.message);
在线试用
登录后可以在这里直接调用此接口,按价格从余额扣费,失败不收费。新账户赠送 $0.50 试用额度。
响应示例
采集于 2026-11-07,耗时 1185 ms · 请求参数 {"page": "1", "order": "general", "keyword": "咖啡"}
JSON
{
"success": true,
"code": 0,
"message": "success",
"request_id": "req_5f1c2a9be04d7c3a81f6e2d0",
"endpoint": "bilibili.search_video_v2",
"cost_usd": 0.02,
"data": {
"code": 0,
"data": {
"ttl": 1,
"code": 0,
"data": {
"next": 2,
"page": 1,
"seid": "16495080494096664372",
"result": [
{
"id": 117506614237947,
"vt": 0,
"aid": 117506614237947,
"mid": 3546746294634777,
"pic": "//i2.hdslb.com/bfs/archive/c89d1d9352f28994bf176dbb02622bf892a8959e.jpg",
"tag": "射击游戏,FPS,三角洲行动,巴克什,吃鸡,三角洲",
"uid": 0,
"url": "",
"…": "+6",
"area": 0,
"bvid": "BV1FFnd6VEy4",
"desc": "",
"like": 478,
"play": 79175,
"tags": "",
"type": "video",
"upic": "https://i0.hdslb.com/bfs/face/dae915f521db7fe0dd54bbfda525cce41f049eb0.jpg",
"cover": "",
"style": 0,
"title": "军用炸药金<em class=\"keyword\">咖啡</em>价格疯涨做阵营任务的天塌了",
"uface": "",
"uname": "",
"arcurl": "http://www.bilibili.com/video/av117506614237947",
"author": "夏洛特游戏解说",
"corner": "",
"is_pay": 0,
"online": 0,
"review": 217,
"roomid": 0,
"typeid": "172",
"danmaku": 21,
"pubdate": 1793008921,
"badgepay": false,
"biz_data": null,
"duration": "0:55",
"rec_tags": null,
"senddate": 1793067202,
"short_id": 0,
"subtitle": "",
"typename": "手机游戏",
"cate_name": "",
"enable_vt": 0,
"favorites": 70,
"live_time": "",
"spread_id": 0,
"view_type": "",
"rank_index": 1,
"rec_reason": "",
"vt_display": "",
"description": "军用炸药金咖啡价格疯涨做阵营任务的天塌了",
"hit_columns": [
"title",
"description"
],
"live_status": 0,
"rank_offset": 1,
"is_intervene": 0,
"new_rec_tags": [],
"video_review": 21,
"is_union_video": 0,
"release_status": 0,
"is_charge_video": 0,
"episode_count_text": "",
"is_live_room_inline": 0
},
{
"id": 117575367265651,
"vt": 0,
"aid": 117575367265651,
"mid": 3744968759840347,
"pic": "//i0.hdslb.com/bfs/archive/861bdaa672cc4222ad4f1941088158f7956582e8.jpg",
"tag": "Vlog生活B面,生活记录,上班,咖啡,工作,上班族",
"uid": 0,
"url": "",
"…": "+6",
"area": 0,
"bvid": "BV1mM4n6rEiw",
"desc": "",
"like": 253,
"play": 2903,
"tags": "",
"type": "video",
"upic": "https://i1.hdslb.com/bfs/face/332230332925d8ae61d51f45e8720f2819557e7c.jpg",
"cover": "",
"style": 0,
"title": "不上班的<em class=\"keyword\">咖啡</em>☕️不好喝,<em class=\"keyword\">咖啡</em>就🉐配点糟心事",
"uface": "",
"uname": "",
"arcurl": "http://www.bilibili.com/video/av117575367265651",
"author": "广西凳子齐",
"corner": "",
"is_pay": 0,
"online": 0,
"review": 17,
"roomid": 0,
"typeid": "21",
"danmaku": 3,
"pubdate": 1794057872,
"badgepay": false,
"biz_data": null,
"duration": "0:32",
"rec_tags": null,
"senddate": 1794057873,
"short_id": 0,
"subtitle": "",
"typename": "日常",
"cate_name": "",
"enable_vt": 0,
"favorites": 13,
"live_time": "",
"spread_id": 0,
"view_type": "",
"rank_index": 2,
"rec_reason": "",
"vt_display": "",
"description": "-",
"hit_columns": [
"title",
"tag"
],
"live_status": 0,
"rank_offset": 2,
"is_intervene": 0,
"new_rec_tags": [],
"video_review": 3,
"is_union_video": 0,
"release_status": 0,
"is_charge_video": 0,
"episode_count_text": "",
"is_live_room_inline": 0
},
"… +18"
],
"egg_hit": 0,
"exp_list": {
"5504": true,
"6605": true,
"9902": true,
"9924": true,
"9931": true,
"9947": true,
"9961": true,
"9980": true,
"100010": true,
"105208": true,
"106002": true,
"55020102": true,
"65785100": true,
"70529100": true,
"74580100": true,
"78772101": true,
"79251101": true,
"80394101": true,
"81174101": true,
"81242106": true,
"81701100": true,
"81989101": true,
"83187101": true,
"83750103": true,
"84109107": true,
"84707105": true,
"85126103": true,
"85679100": true,
"86745102": true,
"87269101": true,
"87318102": true,
"87363107": true,
"87616105": true,
"87875101": true,
"88126106": true,
"88321102": true,
"88888103": true,
"89246106": true,
"89418104": true,
"89692102": true,
"89757102": true,
"89766102": true,
"89799103": true,
"90045103": true
},
"numPages": 50,
"pagesize": 20,
"rqt_type": "search",
"numResults": 1000,
"show_column": 0,
"in_black_key": 0,
"in_white_key": 0,
"is_hit_web_inf": false,
"suggest_keyword": ""
},
"message": "OK"
},
"message": null,
"requestId": "35564b990eb5418985d6964d8d521485",
"recordTime": "2026-11-08T07:58:03.44703494",
"requestParams": {
"body": null,
"query": {
"page": "1",
"order": "general",
"keyword": "咖啡"
}
}
}
}