聚合接口,会员歌曲取决于我有没有续费
本接口未启用接口限速
点击文字展开说明
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| apikey | string | yes | API密钥,注册账号免费获取 |
| type | string | yes | 类型,可选search:搜索、choose:选歌、lyric:歌词、rmpl:歌曲热门评论、playlist:获取热门歌单、musicphb:获取标签热歌排行榜 |
| word | string | either | 关键词或区分歌曲歌名,仅限type为search或choose |
| id | string | either | 歌曲的id,仅限type为lyric或rmpl时 |
| order | string | either | 歌单类型,仅限type为playlist,可选hot(最热门)、new(最新) |
| choose | string | either | 选择编号,仅限type为choose时 |
| tag | string | either | 标签名称,可选:华语、欧美、韩语、日语、粤语、另类/独立、R&B/Soul、怀旧、小语种、学习、夜晚、运动、ACG、影视原声、流行、性感、摇滚、英伦、后摇、古风、民谣、蓝调、乡村、浪漫、快乐、经典、世界音乐、轻音乐、电子、器乐、说唱、古典、爵士 |
| num | string | either | 返回歌曲数量,考虑带宽等因素,最高同时返回500首 |
点击文字展开说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | string | 状态码 |
| msg | string | 状态信息 |
| data | string | 返回数据 |
结果将显示在这里
<?php
$url = 'https://api.xiaoyu17.cn/API/wyydg_new.php';
$params = [
'apikey' => 'API密钥,注册账号免费获取',
'type' => '类型,可选search:搜索、choose:选歌、lyric:歌词、rmpl:歌曲热门评论、playlist:获取热门歌单、musicphb:获取标签热歌排行榜',
'word' => '关键词或区分歌曲歌名,仅限type为search或choose',
'id' => '歌曲的id,仅限type为lyric或rmpl时',
'order' => '歌单类型,仅限type为playlist,可选hot(最热门)、new(最新)',
'choose' => '选择编号,仅限type为choose时',
'tag' => '标签名称,可选:华语、欧美、韩语、日语、粤语、另类/独立、R&B/Soul、怀旧、小语种、学习、夜晚、运动、ACG、影视原声、流行、性感、摇滚、英伦、后摇、古风、民谣、蓝调、乡村、浪漫、快乐、经典、世界音乐、轻音乐、电子、器乐、说唱、古典、爵士',
'num' => '返回歌曲数量,考虑带宽等因素,最高同时返回500首',
];
$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.xiaoyu17.cn/API/wyydg_new.php"
params = {
"apikey": "API密钥,注册账号免费获取",
"type": "类型,可选search:搜索、choose:选歌、lyric:歌词、rmpl:歌曲热门评论、playlist:获取热门歌单、musicphb:获取标签热歌排行榜",
"word": "关键词或区分歌曲歌名,仅限type为search或choose",
"id": "歌曲的id,仅限type为lyric或rmpl时",
"order": "歌单类型,仅限type为playlist,可选hot(最热门)、new(最新)",
"choose": "选择编号,仅限type为choose时",
"tag": "标签名称,可选:华语、欧美、韩语、日语、粤语、另类/独立、R&B/Soul、怀旧、小语种、学习、夜晚、运动、ACG、影视原声、流行、性感、摇滚、英伦、后摇、古风、民谣、蓝调、乡村、浪漫、快乐、经典、世界音乐、轻音乐、电子、器乐、说唱、古典、爵士",
"num": "返回歌曲数量,考虑带宽等因素,最高同时返回500首",
}
response = requests.get(url, params=params)
print(response.text)
const url = new URL('https://api.xiaoyu17.cn/API/wyydg_new.php');
const params = {
'apikey': 'API密钥,注册账号免费获取',
'type': '类型,可选search:搜索、choose:选歌、lyric:歌词、rmpl:歌曲热门评论、playlist:获取热门歌单、musicphb:获取标签热歌排行榜',
'word': '关键词或区分歌曲歌名,仅限type为search或choose',
'id': '歌曲的id,仅限type为lyric或rmpl时',
'order': '歌单类型,仅限type为playlist,可选hot(最热门)、new(最新)',
'choose': '选择编号,仅限type为choose时',
'tag': '标签名称,可选:华语、欧美、韩语、日语、粤语、另类/独立、R&B/Soul、怀旧、小语种、学习、夜晚、运动、ACG、影视原声、流行、性感、摇滚、英伦、后摇、古风、民谣、蓝调、乡村、浪漫、快乐、经典、世界音乐、轻音乐、电子、器乐、说唱、古典、爵士',
'num': '返回歌曲数量,考虑带宽等因素,最高同时返回500首',
};
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));