可乐Music
接口信息
GET / POST
api.vsaa.cn/api/music/soda/index.php
Method
GET / POST
分类
迅捷如风
Calls
59,315
KEY
KEY 必填
计费
1 积分 / 次
QPM
150/MIN
鉴权方式
Query 参数、Header(X-API-Key)、Bearer Token
作者
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| action | string | 是 | 操作类型(search / musicInfo / musicSource / lyric / albumInfo / artistWorks / importSheet / importItem / sheetInfo / topLists / topListDetail / comments / play / down) | search |
| keyword | string | 否 | 搜索关键词(action=search 时必填) | 周杰伦 |
| id | string | 否 | 歌曲ID/歌单ID/专辑ID/歌手ID(action=musicInfo/musicSource/lyric/albumInfo/artistWorks/sheetInfo/comments 时必填) | 7554787717328011283 |
| page | integer | 否 | 页码,从1开始(action=search/artistWorks/comments 时使用) | 1 |
| type | string | 否 | 搜索类型或作品类型(music/album/artist/sheet) | music |
| quality | string | 否 | 音质等级(action=musicSource 时使用) | flac |
| url | string | 否 | 音乐URL或歌单URL(action=importSheet/importItem/play/down 时必填) | https://music.douyin.com/qishui/share/track?track_id=7554787717328011283 |
| cek | string | 否 | 解密密钥(action=play/down 时必填,由 musicSource 返回) | ee16fc1be408425ba95d73f9524766f3 |
| filename | string | 否 | 下载文件名(action=down 时可选) | 歌曲名.flac |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "action",
"type": "string",
"required": true,
"description": "操作类型(search / musicInfo / musicSource / lyric / albumInfo / artistWorks / importSheet / importItem / sheetInfo / topLists / topListDetail / comments / play / down)",
"example": "search"
},
{
"name": "keyword",
"type": "string",
"required": false,
"description": "搜索关键词(action=search 时必填)",
"example": "周杰伦"
},
{
"name": "id",
"type": "string",
"required": false,
"description": "歌曲ID/歌单ID/专辑ID/歌手ID(action=musicInfo/musicSource/lyric/albumInfo/artistWorks/sheetInfo/comments 时必填)",
"example": "7554787717328011283"
},
{
"name": "page",
"type": "integer",
"required": false,
"description": "页码,从1开始(action=search/artistWorks/comments 时使用)",
"example": "1"
},
{
"name": "type",
"type": "string",
"required": false,
"description": "搜索类型或作品类型(music/album/artist/sheet)",
"example": "music"
},
{
"name": "quality",
"type": "string",
"required": false,
"description": "音质等级(action=musicSource 时使用)",
"example": "flac"
},
{
"name": "url",
"type": "string",
"required": false,
"description": "音乐URL或歌单URL(action=importSheet/importItem/play/down 时必填)",
"example": "https://music.douyin.com/qishui/share/track?track_id=7554787717328011283"
},
{
"name": "cek",
"type": "string",
"required": false,
"description": "解密密钥(action=play/down 时必填,由 musicSource 返回)",
"example": "ee16fc1be408425ba95d73f9524766f3"
},
{
"name": "filename",
"type": "string",
"required": false,
"description": "下载文件名(action=down 时可选)",
"example": "歌曲名.flac"
}
]
详细文档
汽水音乐
接口说明
汽水音乐接口提供音乐搜索、歌曲信息获取、歌词查询、歌单管理、音乐下载等一站式音乐数据服务。适用于需要集成音乐内容的移动端应用、网页项目及智能音箱等场景。调用需通过 Query 参数传入密钥进行鉴权,按实际使用量计费。
调用地址
https://api2.vsaa.cn/api/music/soda/index.php
请求方式
GET 或 POST
鉴权说明
本接口采用 Query 鉴权方式。调用时需在请求 URL 中携带密钥参数 key,格式如下:
https://api2.vsaa.cn/api/music/soda/index.php?key=你的密钥&action=search&keyword=周杰伦
密钥需向服务提供方申请获取,未携带或密钥无效时将返回鉴权错误。
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| apikey | string | 是 | 接口调用密钥,通过 Query 参数传递 |
| action | string | 是 | 操作类型,取值如下 |
| keyword | string | 否 | 搜索关键词,action=search 时必填 |
| id | string | 否 | 歌曲 ID / 歌单 ID / 专辑 ID / 歌手 ID,action 为 musicInfo、musicSource、lyric、albumInfo、artistWorks、sheetInfo、comments 时必填 |
| page | integer | 否 | 页码,从 1 开始,action 为 search、artistWorks、comments 时使用 |
| type | string | 否 | 搜索类型或作品类型,如 music |
| quality | string | 否 | 音质等级,action=musicSource 时使用 |
| url | string | 否 | 音乐 URL 或歌单 URL,action 为 importSheet、importItem、play、down 时必填 |
| cek | string | 否 | 解密密钥,action 为 play、down 时必填,由 musicSource 接口返回 |
| filename | string | 否 | 下载文件名,action=down 时可选 |
action 取值说明
| 取值 | 说明 |
|---|---|
| search | 搜索歌曲 |
| musicInfo | 获取歌曲基本信息 |
| musicSource | 获取歌曲源地址 |
| lyric | 获取歌词 |
| albumInfo | 获取专辑信息 |
| artistWorks | 获取歌手作品 |
| importSheet | 导入歌单 |
| importItem | 导入单曲 |
| play | 获取播放地址 |
| down | 下载歌曲 |
成功响应示例
搜索音乐(action=search)
{
"code": 200,
"msg": "success",
"data": {
"list": [
{
"id": "7554787717328011283",
"title": "晴天",
"artist": "周杰伦",
"album": "叶惠美",
"cover": "https://p2.music.126.net/example.jpg",
"duration": 269000,
"play_count": 12500000,
"create_time": "2003-11-01"
}
],
"total": 1000,
"page": 1,
"per_page": 20
}
}
获取音乐源(action=musicSource)
{
"code": 200,
"msg": "success",
"data": {
"id": "7554787717328011283",
"title": "晴天",
"artist": "周杰伦",
"quality_list": [
{
"quality": "standard",
"bitrate": 128,
"size": 4325678,
"format": "mp3",
"url": "https://example.music/stream/standard?cek=abc123",
"cek": "ee16fc1be408425ba95d73f9524766f3"
},
{
"quality": "flac",
"bitrate": 999,
"size": 32145890,
"format": "flac",
"url": "https://example.music/stream/flac?cek=def456",
"cek": "ff27gd2cf519536cb06e84g0635877g4"
}
]
}
}
获取歌词(action=lyric)
{
"code": 200,
"msg": "success",
"data": {
"id": "7554787717328011283",
"title": "晴天",
"lyric": "[00:00.00]晴天 - 周杰伦\n[00:05.00]词:周杰伦 曲:周杰伦\n[00:10.50]故事的小黄花\n[00:15.20]从出生那年就飘着\n[00:20.80]童年的荡秋千\n[00:25.50]随记忆一直晃到现在",
"romance_lyric": "",
"trans lyrics": ""
}
}
获取音乐信息(action=musicInfo)
{
"code": 200,
"msg": "success",
"data": {
"id": "7554787717328011283",
"title": "晴天",
"artist": "周杰伦",
"artists": [
{
"id": "123456",
"name": "周杰伦",
"avatar": "https://example.music/artist/123456.jpg"
}
],
"album": {
"id": "789012",
"name": "叶惠美",
"cover": "https://example.music/album/789012.jpg",
"release_date": "2003-07-31"
},
"duration": 269000,
"cover": "https://example.music/cover/7554787717328011283.jpg",
"play_count": 12500000,
"like_count": 320000,
"share_count": 45000,
"comment_count": 28000,
"description": "周杰伦经典代表作之一",
"create_time": "2003-11-01",
"tags": ["华语", "流行", "经典"]
}
}
获取歌单信息(action=sheetInfo)
{
"code": 200,
"msg": "success",
"data": {
"id": "sheet_12345
## 错误响应示例
```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 | 请求方式不允许 |
调用示例
终端 curl(bash)
curl "https://api2.vsaa.cn/api/music/soda/index.php?key=sk-xxxxxxxxxxxxxxxx&action=search&keyword=周杰伦&page=1&type=music"
PHP
## 注意事项
- 接口采用 Query 参数传递密钥(`?key=...`),请妥善保管密钥,避免在日志、前端代码或公共仓库中暴露。
- 密钥仅用于本站鉴权,禁止转借他人使用,违规可能导致账号封禁。
- 本站强制使用 HTTPS 协议,请确保调用地址完整、正确。
- 频率限制为每分钟约 120 次,超限将触发限流,建议在业务侧做适当的请求节流处理。
- `action` 参数决定接口行为,不同操作对其它参数有不同要求,请根据实际调用场景核对必填字段。
- `quality` 参数用于指定音质等级,取值需与接口支持档位匹配,填写错误将返回无效结果。
- `cek` 解密密钥由 `musicSource` 操作返回,仅对该次请求有效,不可复用或传递给第三方。
- 下载文件名(`filename`)为可选项,建议设置合理的文件扩展名,避免因格式歧义导致解析异常。
- `url` 参数接收的是外部音乐链接或歌单链接,格式需符合平台规范,乱码或畸形 URL 将导致导入失败。
- 分页参数 `page` 从 1 开始,请勿传入 0 或负数,否则可能返回异常结果。快速上手
curl -s "https://api2.vsaa.cn/api/music/soda/index.php?action=info&id=7554787717328011283" -H "***: Mozilla/5.0" | tee /dev/stderr
# 或用 url 参数
curl -s "https://api2.vsaa.cn/api/music/soda/index.php?action=info&url=https://qishui.douyin.com/s/iQgfX1wC/"
在线测试
请求地址
api.vsaa.cn/api/music/soda/index.php
Method
参数
Response
等待中
// 结果将在此处显示