| 参数名 | 类型 | 必填 | 说明 | 示例值 |
|---|---|---|---|---|
| action | string | 必填 | 操作类型:search/parse/download/lyrics/search_playlist/playlist_songs/parse_playlist/playlist_categories/category_playlists/recommended/search_album/album_songs/parse_album | |
| keyword | string | 条件必填 当 action = search 或 action = search_album 或 action = search_playlist |
搜索关键词(action为search/search_album/search_playlist时必填) | |
| url | string | 条件必填 当 action = parse 或 action = parse_playlist 或 action = parse_album |
歌曲链接(parse) / 歌单链接(parse_playlist) / 专辑链接(parse_album) | |
| songmid | string | 条件必填 当 action = download |
歌曲MID(download/lyrics)必填 | |
| id | string | 条件必填 当 action = playlist_songs 或 action = album_songs |
歌单ID/专辑ID(playlist_songs/album_songs)必填 | |
| category_id | string | 否 | 分类ID(category_playlists) | |
| page | string | 否 | 页码,默认1 | |
| limit | string | 否 | 每页数量,默认20/30 | |
| level | string | 否 | download 和 parse 的 level 参数 | |
| apikey | string | 必填 | 你的密钥 | |
| 状态码 | 说明 |
|---|---|
| 200 | 请求成功,服务器已成功处理了请求。 |
| 403 | 服务器拒绝请求。这可能是由于缺少必要的认证凭据(如API密钥)或权限不足。 |
| 404 | 请求的资源未找到。请检查您的请求地址是否正确。 |
| 429 | 请求过于频繁。您已超出速率限制,请稍后再试。 |
| 500 | 服务器内部错误。服务器在执行请求时遇到了问题。 |
HTTP Status: 200{
"code": 0,
"data": {
"source": "qq",
"id": "002JWstj26lDGo",
"name": "告白日",
"artist": "SteveZ",
"album": "告白日",
"duration": 204,
"cover": "https://y.gtimg.cn/music/photo_new/T002R300x300M000000kz4rg1iotk2.jpg",
"link": "https://y.qq.com/n/ryqq/songDetail/002JWstj26lDGo",
"extra": {
"songmid": "002JWstj26lDGo",
"song_id": "663976155"
},
"url": "https://ws.stream.qqmusic.qq.com/Q001000LZGYJ2vUgtu.flac?guid=8098309214&vkey=B106211C9911090BE97848A18B2B81F277F9C52CD7107CA82294C7C8365B44CE7F667B79397C75E5D6FECB8AEE4665E2D52DA48CCB3557CE__v2b94c2a0&uin=1397403557&fromtag=120764"
}
}
<?php
$url = 'https://api.xkzil.com/API/music/QQmusic/index.php';
$params = ['action' => 'YOUR_VALUE', 'keyword' => 'YOUR_VALUE', 'url' => 'YOUR_VALUE', 'songmid' => 'YOUR_VALUE', 'id' => 'YOUR_VALUE', 'category_id' => 'YOUR_VALUE', 'page' => 'YOUR_VALUE', 'limit' => 'YOUR_VALUE', 'level' => 'YOUR_VALUE', 'apikey' => '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.xkzil.com/API/music/QQmusic/index.php"
params = {
'action': 'YOUR_VALUE',
'keyword': 'YOUR_VALUE',
'url': 'YOUR_VALUE',
'songmid': 'YOUR_VALUE',
'id': 'YOUR_VALUE',
'category_id': 'YOUR_VALUE',
'page': 'YOUR_VALUE',
'limit': 'YOUR_VALUE',
'level': 'YOUR_VALUE',
'apikey': 'YOUR_VALUE',
}
response = requests.get(url, params=params)
print(response.text)
const url = new URL('https://api.xkzil.com/API/music/QQmusic/index.php');
const params = {
'action': 'YOUR_VALUE',
'keyword': 'YOUR_VALUE',
'url': 'YOUR_VALUE',
'songmid': 'YOUR_VALUE',
'id': 'YOUR_VALUE',
'category_id': 'YOUR_VALUE',
'page': 'YOUR_VALUE',
'limit': 'YOUR_VALUE',
'level': 'YOUR_VALUE',
'apikey': '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));
const axios = require('axios');
const url = 'https://api.xkzil.com/API/music/QQmusic/index.php';
const params = {
'action': 'YOUR_VALUE',
'keyword': 'YOUR_VALUE',
'url': 'YOUR_VALUE',
'songmid': 'YOUR_VALUE',
'id': 'YOUR_VALUE',
'category_id': 'YOUR_VALUE',
'page': 'YOUR_VALUE',
'limit': 'YOUR_VALUE',
'level': 'YOUR_VALUE',
'apikey': 'YOUR_VALUE',};
axios.get(url, { params })
.then(res => console.log(res.data))
.catch(err => console.error(err));
package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL := "https://api.xkzil.com/API/music/QQmusic/index.php"
params := url.Values{}
params.Add("action", "YOUR_VALUE")
params.Add("keyword", "YOUR_VALUE")
params.Add("url", "YOUR_VALUE")
params.Add("songmid", "YOUR_VALUE")
params.Add("id", "YOUR_VALUE")
params.Add("category_id", "YOUR_VALUE")
params.Add("page", "YOUR_VALUE")
params.Add("limit", "YOUR_VALUE")
params.Add("level", "YOUR_VALUE")
params.Add("apikey", "YOUR_VALUE")
reqURL := baseURL + "?" + params.Encode()
resp, err := http.Get(reqURL)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String url = "https://api.xkzil.com/API/music/QQmusic/index.php" + "?" +
"action=YOUR_VALUE" + "&" +\n "keyword=YOUR_VALUE" + "&" +\n "url=YOUR_VALUE" + "&" +\n "songmid=YOUR_VALUE" + "&" +\n "id=YOUR_VALUE" + "&" +\n "category_id=YOUR_VALUE" + "&" +\n "page=YOUR_VALUE" + "&" +\n "limit=YOUR_VALUE" + "&" +\n "level=YOUR_VALUE" + "&" +\n "apikey=YOUR_VALUE";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
using System.Net;
var client = new HttpClient();
var url = "https://api.xkzil.com/API/music/QQmusic/index.php" + "?" +
string.Join("&",
new (string, string)[] {
("action", "YOUR_VALUE"),
("keyword", "YOUR_VALUE"),
("url", "YOUR_VALUE"),
("songmid", "YOUR_VALUE"),
("id", "YOUR_VALUE"),
("category_id", "YOUR_VALUE"),
("page", "YOUR_VALUE"),
("limit", "YOUR_VALUE"),
("level", "YOUR_VALUE"),
("apikey", "YOUR_VALUE"),
}.Select(p => $"{WebUtility.UrlEncode(p.Item1)}={WebUtility.UrlEncode(p.Item2)}")
);
var response = await client.GetStringAsync(url);
Console.WriteLine(response);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <curl/curl.h>
int main(void) {
CURL *curl = curl_easy_init();
char *url = "https://api.xkzil.com/API/music/QQmusic/index.php" + '?' +
"action=YOUR_VALUE&keyword=YOUR_VALUE&url=YOUR_VALUE&songmid=YOUR_VALUE&id=YOUR_VALUE&category_id=YOUR_VALUE&page=YOUR_VALUE&limit=YOUR_VALUE&level=YOUR_VALUE&apikey=YOUR_VALUE";
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
int res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
return 0;
}
#include <iostream>
#include <httplib.h>
int main() {
httplib::Client cli("https://api.xkzil.com");
httplib::Params params{
{"action", "YOUR_VALUE"},
{"keyword", "YOUR_VALUE"},
{"url", "YOUR_VALUE"},
{"songmid", "YOUR_VALUE"},
{"id", "YOUR_VALUE"},
{"category_id", "YOUR_VALUE"},
{"page", "YOUR_VALUE"},
{"limit", "YOUR_VALUE"},
{"level", "YOUR_VALUE"},
{"apikey", "YOUR_VALUE"},
};
auto res = cli.Get("/API/music/QQmusic/index.php", params);
if(res) std::cout << res->body << std::endl;
return 0;
}
.版本 2
.子程序 _按钮_调用_被单击
.局部变量 网络操作对象, 网络操作类
.局部变量 返回文本, 文本型
.局部变量 完整网址, 文本型
完整网址 = "https://api.xkzil.com/API/music/QQmusic/index.php" + "?"
完整网址 = 完整网址 + " + "&" + "action" + "=" + "YOUR_VALUE"
完整网址 = 完整网址 + "keyword" + "=" + "YOUR_VALUE"
完整网址 = 完整网址 + "url" + "=" + "YOUR_VALUE"
完整网址 = 完整网址 + "songmid" + "=" + "YOUR_VALUE"
完整网址 = 完整网址 + "id" + "=" + "YOUR_VALUE"
完整网址 = 完整网址 + "category_id" + "=" + "YOUR_VALUE"
完整网址 = 完整网址 + "page" + "=" + "YOUR_VALUE"
完整网址 = 完整网址 + "limit" + "=" + "YOUR_VALUE"
完整网址 = 完整网址 + "level" + "=" + "YOUR_VALUE"
完整网址 = 完整网址 + "apikey" + "=" + "YOUR_VALUE"
返回文本 = 网络操作对象.网页_获取(完整网址)
调试输出(返回文本)