接口状态
正常
总调用次数
200
添加时间
2026-01-19
更新时间
2026-02-01

请求信息

https://api.staryun.shop/API/zhyydg.php
https://api.staryun.shop/API/zhyydg.php

请求参数

参数名 类型 必填 说明
types string 接口类型,固定值: search(音乐搜索)、music(歌曲信息获取)
source string 音乐源,支持值:netease(默认)、tencent、tidal、spotify、ytmusic、qobuz、joox、deezer、migu、kugou、kuwo、ximalaya、apple。部分可能失效,建议使用稳定音乐源
name string 搜索关键词(歌曲名、歌手名等)
count string 每页数量,范围:1-100
pages string 页码,至少为 1
id string 歌曲 ID(从搜索接口的list.id获取)
pic_id string 专辑封面 ID(从搜索接口的list.pic_id获取)
lyric_id string 歌词 ID(从搜索接口的list.lyric_id获取)
br string 音质,可选值:128/192/320/740/999(默认999)
size string 封面尺寸,可选值:300/500(默认300)
apikey string 你的key

状态码说明

状态码 说明
200 请求成功,服务器已成功处理了请求。
403 服务器拒绝请求。这可能是由于缺少必要的认证凭据(如API密钥)或权限不足。
404 请求的资源未找到。请检查您的请求地址是否正确。
429 请求过于频繁。您已超出速率限制,请稍后再试。
500 服务器内部错误。服务器在执行请求时遇到了问题。

在线测试

响应结果 实时响应
// 点击"立即测试"按钮查看接口响应
// 响应将显示在此处...

调用示例

<?php
$url = 'https://api.staryun.shop/API/zhyydg.php';
$params = [
    'types' => 'YOUR_VALUE',
    'source' => 'YOUR_VALUE',
    'name' => 'YOUR_VALUE',
    'count' => 'YOUR_VALUE',
    'pages' => 'YOUR_VALUE',
    'id' => 'YOUR_VALUE',
    'pic_id' => 'YOUR_VALUE',
    'lyric_id' => 'YOUR_VALUE',
    'br' => 'YOUR_VALUE',
    'size' => 'YOUR_VALUE',
    'apikey' => 'YOUR_VALUE',
];

// 构建查询字符串
$queryString = http_build_query($params);
$requestUrl = $url . ($queryString ? '?' . $queryString : '');

// 发起请求
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $requestUrl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);

$response = curl_exec($ch);
if ($response === false) {
    echo 'Error: ' . curl_error($ch);
} else {
    echo $response;
}

curl_close($ch);
?>
import requests

url = "https://api.staryun.shop/API/zhyydg.php"
params = {
    "types": "YOUR_VALUE",
    "source": "YOUR_VALUE",
    "name": "YOUR_VALUE",
    "count": "YOUR_VALUE",
    "pages": "YOUR_VALUE",
    "id": "YOUR_VALUE",
    "pic_id": "YOUR_VALUE",
    "lyric_id": "YOUR_VALUE",
    "br": "YOUR_VALUE",
    "size": "YOUR_VALUE",
    "apikey": "YOUR_VALUE",
}

try:
    response = requests.get(url, params=params, timeout=30)
    response.raise_for_status()
    print(response.text)
except requests.exceptions.RequestException as e:
    print(f"Error: {e}")
const url = 'https://api.staryun.shop/API/zhyydg.php';
const params = {
    'types': 'YOUR_VALUE',
    'source': 'YOUR_VALUE',
    'name': 'YOUR_VALUE',
    'count': 'YOUR_VALUE',
    'pages': 'YOUR_VALUE',
    'id': 'YOUR_VALUE',
    'pic_id': 'YOUR_VALUE',
    'lyric_id': 'YOUR_VALUE',
    'br': 'YOUR_VALUE',
    'size': 'YOUR_VALUE',
    'apikey': 'YOUR_VALUE',
};

// 构建查询字符串
const queryString = new URLSearchParams(params).toString();
const requestUrl = url + (queryString ? '?' + queryString : '');

// 发起请求
fetch(requestUrl)
    .then(response => {
        if (!response.ok) {
            throw new Error(`HTTP error! status: ${response.status}`);
        }
        return response.text();
    })
    .then(data => {
        console.log(data);
    })
    .catch(error => {
        console.error('Error:', error);
    });
curl "https://api.staryun.shop/API/zhyydg.php" \
  -G --data-urlencode "types=YOUR_VALUE" \
  -G --data-urlencode "source=YOUR_VALUE" \
  -G --data-urlencode "name=YOUR_VALUE" \
  -G --data-urlencode "count=YOUR_VALUE" \
  -G --data-urlencode "pages=YOUR_VALUE" \
  -G --data-urlencode "id=YOUR_VALUE" \
  -G --data-urlencode "pic_id=YOUR_VALUE" \
  -G --data-urlencode "lyric_id=YOUR_VALUE" \
  -G --data-urlencode "br=YOUR_VALUE" \
  -G --data-urlencode "size=YOUR_VALUE" \
  -G --data-urlencode "apikey=YOUR_VALUE" \
  -H "Accept: application/json"