搜索哔哩哔哩视频
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| msg | string | 是 | 进行搜索的内容,需要三个字 | 台风竹节草 |
| y | string | 否 | 页码 | 1 |
| s | string | 否 | 每页列表的输出视频个数 | 10 |
| n | string | 否 | 通过序号输出视频详细 | 1 |
| type | string | 否 | 输出格式默认json,可选json/text | json |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "msg",
"type": "string",
"required": true,
"description": "进行搜索的内容,需要三个字",
"example": "台风竹节草"
},
{
"name": "y",
"type": "string",
"required": false,
"description": "页码",
"example": "1"
},
{
"name": "s",
"type": "string",
"required": false,
"description": "每页列表的输出视频个数",
"example": "10"
},
{
"name": "n",
"type": "string",
"required": false,
"description": "通过序号输出视频详细",
"example": "1"
},
{
"name": "type",
"type": "string",
"required": false,
"description": "输出格式默认json,可选json/text",
"example": "json"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "哔哩哔哩视频搜索",
"description": "搜索哔哩哔哩视频",
"version": "1.0.0"
},
"paths": {
"/api/yljk/blss/api.php": {
"get": {
"summary": "哔哩哔哩视频搜索",
"description": "搜索哔哩哔哩视频",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "msg",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "台风竹节草"
},
"description": "进行搜索的内容,需要三个字"
},
{
"name": "y",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "页码"
},
{
"name": "s",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "10"
},
"description": "每页列表的输出视频个数"
},
{
"name": "n",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "通过序号输出视频详细"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "输出格式默认json,可选json/text"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "哔哩哔哩视频搜索",
"description": "搜索哔哩哔哩视频",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "msg",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "台风竹节草"
},
"description": "进行搜索的内容,需要三个字"
},
{
"name": "y",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "页码"
},
{
"name": "s",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "10"
},
"description": "每页列表的输出视频个数"
},
{
"name": "n",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "通过序号输出视频详细"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "输出格式默认json,可选json/text"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api-v2.317ak.com",
"description": "当前访问入口(https)"
}
]
}
[
{
"index": 1,
"publishTime": "2分钟前",
"viewCount": "1",
"author": "经典4K放映厅",
"title": "4K【无职转生 第三季】全14集 4K超清未删减完整版"
},
{
"index": 2,
"publishTime": "7分钟前",
"viewCount": "16",
"author": "-Uncolor-",
"title": "“鲁迪...鲁迪!鲁迪~”"
},
{
"index": 3,
"publishTime": "15分钟前",
"viewCount": "1",
"author": "币之型一键三连",
"title": "太痛苦了!"
},
{
"index": 4,
"publishTime": "16分钟前",
"viewCount": "4",
"author": "赤尾凤",
"title": "初相见了你好菲兹学长?希露菲?"
},
{
"index": 5,
"publishTime": "25分钟前",
"viewCount": "3",
"author": "及时雨不准",
"title": "鲁迪乌斯来给你洗脑啦~☆!"
},
{
"index": 6,
"publishTime": "27分钟前",
"viewCount": "227",
"author": "释意_",
"title": "“为何结局如此悲凉”"
},
{
"index": 7,
"publishTime": "53分钟前",
"viewCount": "2",
"author": "走位漫剪",
"title": "“何为绝望”“冰与火”"
},
{
"index": 8,
"publishTime": "53分钟前",
"viewCount": "371",
"author": "不野不蛮人",
"title": "妄火"
},
{
"index": 9,
"publishTime": "54分钟前",
"viewCount": "8",
"author": "爱音漫剪",
"title": "原来菲兹才是传奇开锁王"
},
{
"index": 10,
"publishTime": "58分钟前",
"viewCount": "406",
"author": "山芋芋来",
"title": "俄小说解读:转生成斯大林就拿出真本事 第八期"
}
]
用于搜索哔哩哔哩视频内容。
适用于需要快速检索视频信息的应用场景。
https://api-v2.317ak.com/api/yljk/blss/api.php
GET、POST
接口调用需要使用密钥进行鉴权。
首选鉴权方式:Query 参数传递。
参数格式:
key=接口调用密钥
请求地址:https://api-v2.317ak.com/api/yljk/blss/api.php
请求方式:GET、POST
鉴权方式:Query(key=…)
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥 |
| msg | string | 是 | 进行搜索的内容,需要三个字 |
| y | string | 否 | 页码,示例值:1 |
| s | string | 否 | 每页列表的输出视频个数,示例值:10 |
| n | string | 否 | 通过序号输出视频详细,示例值:1 |
| type | string | 否 | 输出格式,默认 json,可选 json、text |
[
{
"index": 1,
"publishTime": "2分钟前",
"viewCount": "1",
"author": "经典4K放映厅",
"title": "4K【无职转生 第三季】全14集 4K超清未删减完整版"
},
{
"index": 2,
"publishTime": "7分钟前",
"viewCount": "16",
"author": "-Uncolor-",
"title": "“鲁迪...鲁迪!鲁迪~”"
},
{
"index": 3,
"publishTime": "15分钟前",
"viewCount": "1",
"author": "币之型一键三连",
"title": "太痛苦了!"
}
]
| 字段 | 类型 | 说明 |
|---|---|---|
| index | string | 视频序号 |
| publishTime | string | 视频发布时间信息 |
| viewCount | string | 视频观看数量 |
| author | string | 视频作者名称 |
| title | string | 视频标题内容 |
接口发生业务异常时,返回 JSON 格式错误信息,示例如下:
{
"code":0,
"msg":"未提供调用密钥",
"errcode":11001
}
| errcode | 含义 |
|---|---|
| 11001 | 未提供调用密钥 |
| 11002 | 密钥错误 |
| 11003 | 密钥已禁用 |
| 11004 | 积分余额不足 |
| 11005 | 请求过于频繁(QPM 限制) |
| 11006 | 接口维护中 |
| 11007 | 接口已禁用 |
| 11008 | 接口不可用 |
| 11009 | 密钥校验暂不可用 |
| 11010 | 积分系统暂不可用 |
| 11011 | 收费接口须提供有效密钥 |
| 11012 | 鉴权方式错误 |
| 11013 | 接口不存在 |
| 11014 | 请求目标地址无效 |
| 11015 | 请求目标地址不允许 |
| 11016 | 请求目标服务失败 |
| 11017 | 服务暂不可用 |
| 11018 | 请求方式不允许 |
| 11019 | 当前 IP 不在白名单内 |
| 11020 | 启用指定访问通道须提供有效密钥 |
| 11021 | 未配置可用访问通道 |
| 11022 | 访问通道不可用 |
| 11023 | 密钥已过期 |
| 11024 | 令牌分配积分不足 |
curl "https://api-v2.317ak.com/api/yljk/blss/api.php?key=your_key&msg=台风竹节草&y=1&s=10&type=json"
# PHP
$url = "https://api-v2.317ak.com/api/yljk/blss/api.php?key=your_key&msg=台风竹节草&y=1&s=10&type=json";
$response = file_get_contents($url);
echo $response;
key 为必填鉴权参数,首选通过 Query 参数 key=… 传递,请妥善保管密钥,避免将其直接暴露在网页前端、公开代码仓库或日志中。https://api-v2.317ak.com/api/yljk/blss/api.php,建议始终使用 HTTPS 进行请求,以保护请求参数中的密钥及搜索内容。msg 为必填搜索内容,要求输入三个字;过短或不符合要求的搜索内容可能无法获得预期结果。y 用于指定页码,s 用于指定每页返回的视频数量。分页或调整单页数量时,应结合实际返回数据合理设置,避免一次请求获取过多内容。n 用于按返回结果中的序号获取指定视频的详细信息。序号应以实际搜索结果中的 index 为准,不宜使用不存在的序号。type 默认返回 json 格式,也可指定为 text;如调用方需要按 JSON 数据结构处理返回结果,建议保持默认的 json。publishTime、viewCount 等数据属于搜索结果展示信息,内容可能随时间变化,不宜将其视为固定值。index 用于标识当前结果序号;当调整页码或每页数量后,序号对应的具体视频可能发生变化。curl "https://api-v2.317ak.com/api/yljk/blss/api.php?key=YOUR_API_KEY&msg=台风竹节草&y=1&s=10&type=json"