网易云音乐歌单音乐随机输出-API接口
正常 需密钥调用免费
接口信息
总调用次数: 6
所属分类: 音乐
请求方式: GET
响应格式: JSON
添加时间: 2026-05-24
更新时间: 2026-06-05
接口描述: 网易云音乐指定歌单中的歌曲随机输出
请求信息
请求地址
https://api.key5.site/API/music/netease_163/index.php
示例地址
https://api.key5.site/API/music/netease_163/index.php?mid=19723756&format=json
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
mid |
string | 是 | 歌单ID,你可以填写你喜欢的歌单ID示例:https://music.163.com/#/playlist?id=7761129140 |
format |
string | 是 | 显示类型JSON格式 |
format |
string | 否 | TEXT文本格式 |
返回示例
{
"code": 1,
"playlist_name": "飙升榜",
"playlist_id": 19723756,
"coverImgUrl": "https://p1.music.126.net/rIi7Qzy2i2Y_1QD7cd0MYA==/109951170048506929.jpg",
"tags": "当前歌单无标签!",
"data": {
"name": "break",
"alname": "突发奇想",
"id": 1398726570,
"url": "https://m7.music.126.net/20260524002846/49c131b0e2189fbc19453438f52d334c/ymusic/530f/0e0e/525e/de074835599d03601591e48b4595ae7a.mp3?vuutv=Sukk80biZ/X7CYxtaDRxwgaUpEW7ckwNa0OKy4/QSL3uOYQe0gMlUZ6DNlRbfWUj09x4BQCBsa554Q42mxsX85iKdf7dYur1s9A37nMAJJ4=",
"url2": "http://music.163.com/api/v6/playlist/detail",
"picurl": "https://p2.music.126.net/JfpGYN2PjClatCHBa7vX7g==/109951164354131599.jpg",
"artistsname": "郑润泽"
},
"api_source": "墨白API:newapi.key5.site",
"client_ip": "36.159.245.235"
}
状态码说明
| 状态码 | 说明 |
|---|---|
| 200 | 请求成功,服务器已成功处理了请求。 |
| 403 | 服务器拒绝请求。这可能是由于缺少必要的认证凭据(如API密钥)或权限不足。 |
| 404 | 请求的资源未找到。请检查您的请求地址是否正确。 |
| 429 | 请求过于频繁。您已超出速率限制,请稍后再试。 |
| 500 | 服务器内部错误。服务器在执行请求时遇到了问题。 |
调用示例
<?php
$url = 'https://api.key5.site/API/music/netease_163/index.php';
$params = [
'mid' => 'YOUR_VALUE',
'format' => 'YOUR_VALUE',
'format' => 'YOUR_VALUE',
];
$url .= '?' . http_build_query($params);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
url = "https://api.key5.site/API/music/netease_163/index.php"
params = {
"mid": "YOUR_VALUE",
"format": "YOUR_VALUE",
"format": "YOUR_VALUE",
}
response = requests.get(url, params=params)
print(response.text)
const url = new URL('https://api.key5.site/API/music/netease_163/index.php');
const params = {
'mid': 'YOUR_VALUE',
'format': 'YOUR_VALUE',
'format': 'YOUR_VALUE',
};
Object.keys(params).forEach(key => {
url.searchParams.append(key, params[key]);
});
fetch(url)
.then(response => response.text())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
curl "https://api.key5.site/API/music/netease_163/index.php?mid=YOUR_VALUE&format=YOUR_VALUE&format=YOUR_VALUE"