通过接口进行搜索蓝狗mv视频。
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| msg | string | 是 | 需要搜索的歌曲名 | 江南 |
| n | string | 否 | 选择(序号) | 1 |
| page | string | 否 | 页数(默认第一页) | |
| limit | string | 否 | 列表数量(默认10个) | |
| type | string | 否 | 返回格式,默认json可选text | |
| qhd | string | 否 | 清晰度,1为流畅,2.高品,3.超清,4.1080P,如果没有最高的1080P,则自动降级。 |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "msg",
"type": "string",
"required": true,
"description": "需要搜索的歌曲名",
"example": "江南"
},
{
"name": "n",
"type": "string",
"required": false,
"description": "选择(序号)",
"example": "1"
},
{
"name": "page",
"type": "string",
"required": false,
"description": "页数(默认第一页)",
"example": ""
},
{
"name": "limit",
"type": "string",
"required": false,
"description": "列表数量(默认10个)",
"example": ""
},
{
"name": "type",
"type": "string",
"required": false,
"description": "返回格式,默认json可选text",
"example": ""
},
{
"name": "qhd",
"type": "string",
"required": false,
"description": "清晰度,1为流畅,2.高品,3.超清,4.1080P,如果没有最高的1080P,则自动降级。",
"example": ""
}
]
{
"openapi": "3.1.1",
"info": {
"title": "蓝狗MV",
"description": "通过接口进行搜索蓝狗mv视频。",
"version": "1.0.0"
},
"paths": {
"/api/yinyue/kgmv/api.php": {
"get": {
"summary": "蓝狗MV",
"description": "通过接口进行搜索蓝狗mv视频。",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "msg",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "江南"
},
"description": "需要搜索的歌曲名"
},
{
"name": "n",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "选择(序号)"
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "页数(默认第一页)"
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "列表数量(默认10个)"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "返回格式,默认json可选text"
},
{
"name": "qhd",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "清晰度,1为流畅,2.高品,3.超清,4.1080P,如果没有最高的1080P,则自动降级。"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "蓝狗MV",
"description": "通过接口进行搜索蓝狗mv视频。",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "msg",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "江南"
},
"description": "需要搜索的歌曲名"
},
{
"name": "n",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "选择(序号)"
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "页数(默认第一页)"
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "列表数量(默认10个)"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "返回格式,默认json可选text"
},
{
"name": "qhd",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "清晰度,1为流畅,2.高品,3.超清,4.1080P,如果没有最高的1080P,则自动降级。"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api.317ak.com",
"description": "当前访问入口(https)"
}
]
}
{
"code": 1,
"text": "获取成功",
"data": {
"name": "江南",
"singer": "林俊杰",
"cover": "http://imge.kugou.com/mvhdpic//20201124/20201124113212190972.jpg",
"quality": "超清 1080p",
"size": "68.67 MB",
"url": "http://fsmvpc.tx.kugou.com/202605232029/ddb5428a1e0042a192056879eb7d97b0/v2/9e285a51e355fc47bb0bf850d7bb3705/KGTX/CLTX002/9e285a51e355fc47bb0bf850d7bb3705.mp4",
"fallback": false,
"qualities": [
{
"code": "sq",
"name": "超清 1080p",
"url": "http://fsmvpc.tx.kugou.com/202605232029/ddb5428a1e0042a192056879eb7d97b0/v2/9e285a51e355fc47bb0bf850d7bb3705/KGTX/CLTX002/9e285a51e355fc47bb0bf850d7bb3705.mp4",
"size": "68.67 MB"
},
{
"code": "rq",
"name": "高品 540p",
"url": "http://fsmvpc.tx.kugou.com/202605232029/853b6b12e96b630771dc60f9cb9a4202/v2/55b7d3fc3c833c3596371881221629d1/KGTX/CLTX002/55b7d3fc3c833c3596371881221629d1.mp4",
"size": "133.08 MB"
},
{
"code": "le",
"name": "流畅 360p",
"url": "http://fsmvpc.tx.kugou.com/202605232029/5d73a633e257cc7d49d51ef77e47ecae/v2/1df817fb1e2129c0b61aabeb0c480436/KGTX/CLTX002/1df817fb1e2129c0b61aabeb0c480436.mp4",
"size": "17.39 MB"
}
]
}
}
用于通过歌曲名称搜索蓝狗MV视频。面向需要检索音乐MV资源的开发者和应用使用,接口免费调用并要求提供有效密钥。
https://api.317ak.com/api/yinyue/kgmv/api.php
支持 GET、POST 请求方式。
接口调用需要进行密钥鉴权。
首选鉴权方式:Query 参数。
请求时需携带 key 参数作为接口调用密钥。
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥 |
| msg | string | 是 | 需要搜索的歌曲名,例如:江南 |
| n | string | 否 | 选择序号 |
| page | string | 否 | 页数,默认第一页 |
| limit | string | 否 | 列表数量,默认10个 |
| type | string | 否 | 返回格式,默认 json,可选 text |
| qhd | string | 否 | 清晰度选择:1 为流畅,2 为高品,3 为超清,4 为 1080P;如果没有最高的 1080P,则自动降级 |
{
"code": 1,
"text": "获取成功",
"data": {
"name": "江南",
"singer": "林俊杰",
"cover": "http://imge.kugou.com/mvhdpic//20201124/20201124113212190972.jpg",
"quality": "超清 1080p",
"size": "68.67 MB",
"url": "http://example.com/video.mp4",
"fallback": false,
"qualities": [
{
"code": "sq",
"name": "超清 1080p",
"url": "http://example.com/video_1080p.mp4",
"size": "68.67 MB"
}
]
}
}
| 字段 | 类型 | 说明 |
|---|---|---|
| code | number | 响应状态标识 |
| text | string | 响应提示信息 |
| data | object | 视频信息数据 |
| 字段 | 类型 | 说明 |
|---|---|---|
| name | string | 歌曲名称 |
| singer | string | 歌手名称 |
| cover | string | 视频封面地址 |
| quality | string | 当前视频清晰度信息 |
| size | string | 当前视频文件大小 |
| url | string | 当前视频播放地址 |
| fallback | boolean | 是否使用降级清晰度 |
| qualities | array | 可用清晰度列表 |
| 字段 | 类型 | 说明 |
|---|---|---|
| code | string | 清晰度标识 |
| name | string | 清晰度名称 |
| url | string | 对应清晰度的视频地址 |
| size | string | 对应视频文件大小 |
接口发生业务异常时,返回统一错误结构:
{
"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 -G "https://api.317ak.com/api/yinyue/kgmv/api.php" \
--data-urlencode "key=你的密钥" \
--data-urlencode "msg=江南" \
--data-urlencode "n=1"
// PHP
$url = "https://api.317ak.com/api/yinyue/kgmv/api.php?key=你的密钥&msg=江南&n=1";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
key 传递有效密钥,例如请求中包含对应的 key 参数。msg 为必填参数,请填写需要搜索的歌曲名称;建议使用准确的歌曲名以提高搜索结果匹配度。n 参数用于选择搜索结果序号,请确保填写的序号存在,否则可能无法获取对应视频信息。page 用于分页查询,未填写时默认返回第一页数据;limit 用于控制返回列表数量,未填写时默认返回 10 个结果。type 参数默认返回 JSON 格式,如需其他返回格式,请根据接口支持范围进行设置。qhd 用于选择视频清晰度,可根据实际播放需求选择对应清晰度;当指定清晰度不可用时,接口会自动选择可用的较高清晰度。curl "https://api.317ak.com/api/yinyue/kgmv/api.php?key=YOUR_API_KEY&msg=江南&n=1&page=1&limit=10&qhd=4"