API Icon

网易云音乐SVIP解析 正常

网易云音乐解析,20251225日已由梦安大佬赞助恢复SVIP会员。若获取不到url则是账号被风控了

GET/POST JSON 调用: 2,174,029 测速中...

基本信息

接口地址
请求方式 GET/POST
返回格式 JSON
调用权限 公开/免费

请求参数说明

参数名 必填 类型 说明 示例值
url 可选 string 需要填的链接
ids 可选 string 音乐id 865632948
level 可选 string standard(标准音质), exhigh(极高音质), lossless(无损音质), hires(Hi-Res音质), jyeffect(高清环绕声), sky(沉浸环绕声), jymaster(超清母带) standard
type 必填 string json/text/down/search/song/url/lyric/playlist/album json
s 可选 string 搜索关键词,搜索时必填的参数 青花瓷
limit 可选 string 返回数量,默认 20
offset 可选 string 偏移量,默认 0
id 可选 string 获取音乐直链或音乐详情时需要输入

调用示例

PHP cURL

$url = 'https://api.bugpk.com/api/163_music';
$params = [
    'key' => 'value' // 请替换实际参数
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);

echo $response;
                                    

返回结果示例

JSON Response
# 网易云音乐 API 接口文档

## 基础信息

- **接口地址**: `api.php`
- **请求方式**: `GET` / `POST`
- **返回格式**: `JSON`
- **编码格式**: `UTF-8`

## 通用返回格式

```json
{
    "code": 200,
    "msg": "成功信息",
    "data": { ... }
}
```

### 状态码说明

| 状态码 | 说明 |
|--------|------|
| 200 | 成功 |
| 400 | 参数错误 |
| 404 | 资源未找到 |
| 500 | 服务器错误 |

---

## 接口列表

### 1. 搜索音乐

**参数**

| 参数名 | 必填 | 类型 | 说明 |
|--------|------|------|------|
| type | 是 | string | `search` |
| id / s / keywords | 是 | string | 搜索关键词(三选一) |
| limit | 否 | int | 返回数量,默认 20 |
| offset | 否 | int | 偏移量,默认 0 |

**示例**

```
GET api.php?type=search&keywords=若把你&limit=10
```

**返回**

```json
{
    "code": 200,
    "msg": "搜索成功",
    "data": {
        "songs": [
            {
                "id": 865632948,
                "name": "若把你",
                "artists": "Kirsty刘瑾睿",
                "album": "若把你",
                "picUrl": "https://p1.music.126.net/xxx.jpg",
                "duration": 245000
            }
        ],
        "total": 100
    }
}
```

---

### 2. 获取歌曲详情

**参数**

| 参数名 | 必填 | 类型 | 说明 |
|--------|------|------|------|
| type | 是 | string | `song` |
| id | 是 | string | 歌曲ID |

**示例**

```
GET api.php?type=song&id=865632948
```

**返回**

```json
{
    "code": 200,
    "msg": "获取歌曲成功",
    "data": {
        "id": 865632948,
        "name": "若把你",
        "album": "若把你",
        "singer": "Kirsty刘瑾睿",
        "picimg": "https://p1.music.126.net/xxx.jpg"
    }
}
```

---

### 3. 获取播放链接

**参数**

| 参数名 | 必填 | 类型 | 说明 |
|--------|------|------|------|
| type | 是 | string | `url` |
| id | 是 | string | 歌曲ID,多个用逗号分隔 |
| level | 否 | string | 音质等级,默认 `standard` |

**音质等级**

| 值 | 说明 |
|----|------|
| standard | 标准音质 |
| exhigh | 极高音质 |
| lossless | 无损音质 |
| hires | Hi-Res音质 |
| jyeffect | 高清环绕声 |
| sky | 沉浸环绕声 |
| jymaster | 超清母带 |

**示例**

```
GET api.php?type=url&id=865632948&level=hires
```

**返回**

```json
{
    "code": 200,
    "msg": "获取播放链接成功",
    "data": [
        {
            "id": 865632948,
            "url": "https://xxx.music.126.net/xxx.m4a",
            "br": 320000,
            "level": "hires",
            "size": 102654321,
            "md5": "abc123..."
        }
    ]
}
```

---

### 4. 获取歌词

**参数**

| 参数名 | 必填 | 类型 | 说明 |
|--------|------|------|------|
| type | 是 | string | `lyric` |
| id | 是 | string | 歌曲ID |

**示例**

```
GET api.php?type=lyric&id=865632948
```

**返回**

```json
{
    "code": 200,
    "msg": "获取歌词成功",
    "data": {
        "lrc": "[00:00.000] 作词 : Kirsty刘瑾睿
[00:01.000] 作曲 : Kirsty刘瑾睿
...",
        "tlyric": "[00:00.000] 作词 : Kirsty刘瑾睿
...",
        "romalrc": "",
        "klyric": ""
    }
}
```

---

### 5. 获取歌单详情

**参数**

| 参数名 | 必填 | 类型 | 说明 |
|--------|------|------|------|
| type | 是 | string | `playlist` |
| id | 是 | string | 歌单ID |

**示例**

```
GET api.php?type=playlist&id=12345678
```

**返回**

```json
{
    "code": 200,
    "msg": "获取歌单成功",
    "data": {
        "id": 12345678,
        "name": "歌单名称",
        "coverImgUrl": "https://p1.music.126.net/xxx.jpg",
        "creator": "创建者昵称",
        "trackCount": 100,
        "description": "歌单描述",
        "tracks": [
            {
                "id": 865632948,
                "name": "若把你",
                "artists": "Kirsty刘瑾睿",
                "album": "若把你",
                "picUrl": "https://p1.music.126.net/xxx.jpg"
            }
        ]
    }
}
```

---

### 6. 获取专辑详情

**参数**

| 参数名 | 必填 | 类型 | 说明 |
|--------|------|------|------|
| type | 是 | string | `album` |
| id | 是 | string | 专辑ID |

**示例**

```
GET api.php?type=album&id=12345678
```

**返回**

```json
{
    "code": 200,
    "msg": "获取专辑成功",
    "data": {
        "id": 12345678,
        "name": "专辑名称",
        "coverImgUrl": "https://p1.music.126.net/xxx.jpg",
        "artist": "歌手名",
        "publishTime": 1609459200000,
        "description": "专辑描述",
        "songs": [
            {
                "id": 865632948,
                "name": "若把你",
                "artists": "Kirsty刘瑾睿",
                "album": "若把你",
                "picUrl": "https://p1.music.126.net/xxx.jpg"
            }
        ]
    }
}
```

---

### 7. 获取音乐信息(综合接口)

此接口整合了歌曲详情、播放链接、歌词等信息,支持多种输出格式。

**参数**

| 参数名 | 必填 | 类型 | 说明 |
|--------|------|------|------|
| type | 是 | string | `music` / `json` / `text` / `down` |
| url | 二选一 | string | 网易云音乐链接 |
| ids | 二选一 | string | 歌曲ID |
| level | 否 | string | 音质等级,默认 `standard` |

**type 参数说明**

| 值 | 说明 |
|----|------|
| music | 返回 JSON 格式 |
| json | 返回 JSON 格式 |
| text | 返回纯文本格式 |
| down | 直接下载音乐文件 |

**支持的链接格式**

- `https://music.163.com/song?id=865632948`
- `https://music.163.com/#/song?id=865632948`
- `https://y.music.163.com/m/song?id=865632948`
- 或直接包含数字ID的任意链接

**示例**

```
GET api.php?type=json&ids=865632948&level=hires
GET api.php?type=json&url=https://music.163.com/song?id=865632948&level=lossless
GET api.php?type=text&ids=865632948
GET api.php?type=down&ids=865632948&level=standard
```

**JSON 返回**

```json
{
    "code": 200,
    "msg": "获取音乐信息成功",
    "data": {
        "name": "若把你",
        "ar_name": "Kirsty刘瑾睿",
        "al_name": "若把你",
        "pic": "https://p1.music.126.net/xxx.jpg",
        "url": "https://xxx.music.126.net/xxx.m4a",
        "size": "102.65MB",
        "level": "Hires音质",
        "lyric": "[00:00.000] 作词 : Kirsty刘瑾睿
...",
        "tlyric": "[00:00.000] 作词 : Kirsty刘瑾睿
..."
    }
}
```

**Text 返回**

```
歌名: 若把你
歌手: Kirsty刘瑾睿
专辑: 若把你
音质: Hires音质
大小: 102.65MB
封面: https://p1.music.126.net/xxx.jpg
链接: https://xxx.music.126.net/xxx.m4a

===== 歌词 =====
[00:00.000] 作词 : Kirsty刘瑾睿
...

===== 翻译 =====
暂无翻译
```

**Down 模式**

直接重定向到音乐文件下载链接,浏览器会自动下载。

---

## 错误返回示例

```json
{
    "code": 400,
    "msg": "缺少id参数",
    "data": null
}
```

```json
{
    "code": 404,
    "msg": "未找到歌曲",
    "data": null
}
```

返回参数说明

参数名 类型 说明 示例
al_name string 歌名
ar_name string 歌手
level string 音质
lyric string 歌词
pic string 封面
url string 音乐链接

调试参数

响应结果

--
点击左侧"发送请求"查看结果...