基础信息

查看接口基本信息和返回格式
接口描述

(2026.11.13修复bug)通过搜索歌曲获取播放链接、歌词和专辑图

七日请求统计
本周总请求: - 日均: -
请求方式
GET POST 推荐
请求地址
https://api.cxzja.cn/api/qsmusic2
返回方式
JSON 默认返回格式,包含完整数据结构
返回预览
JSON
{
  "code": 200,
  "msg": "解析成功",
  "data": {
    "type": "music",
    "platform": "qishui",
    "id": "7687837023273764905",
    "name": "one day when I was twenty(氛围版)",
    "singer": "Distress",
    "artists": [
      {
        "id": "7646994423280191515",
        "name": "Distress",
        "avatar": ""
      }
    ],
    "album": "Centuries (混音版)",
    "album_id": "7687837023273076777",
    "cover": "https://p3-luna.douyinpic.com/img/tos-cn-v-2774c002/ooeWBv9kWiMmEpvEPA1QiAMwEpsFBAbSCgJA1y~c5_375x375.jpg",
    "duration_ms": 185899,
    "duration_text": "03:06",
    "full_duration_ms": 185899,
    "full_duration_text": "03:06",
    "preview": false,
    "vid": "v02ad6g10000daob1enog65om5k6tjc0",
    "lyric": "[00:01.310]You said all love fades and turns astray\n[00:06.070]You said you've no cash to spend today\n[00:10.470]Thank you for staying with me all these days\n[00:15.230]Don't let false folks ** your heart always\n[00:39.750]One day at twenty years of age\n[00:44.190]Hand in hand we reached the bridge's edge\n[00:48.630]Five coins alone lay in your pouches cage\n[00:53.430]We shared one bowl of beef noodle sage\n[00:58.510]You said all love fades and turns astray\n[01:03.310]You said you've no cash to spend today\n[01:07.750]Thank you for staying with me all these days\n[01:12.510]Don't let false folks ** your heart always\n[01:37.070]One day at thirty years of age\n[01:41.830]With him I walked down this old street stage\n[01:46.110]I craved a bowl of beef noodle wage\n[01:50.790]He said small change was out of his engage\n[01:55.550]I can't recall your facial outline late\n[02:00.390]No photo of you left to survey\n[02:05.070]Time slays all sweet old yesterdays\n[02:09.910]No need to mourn our bygone array\n[02:14.990]You said all love fades and turns astray\n[02:19.750]You said you've no cash to spend today\n[02:24.230]Thank you for staying with me all these days\n[02:28.990]Don't let false folks ** your heart always\n[02:48.830]One day at eighty years of age\n[02:53.630]Could I retrieve your face once more to stay",
    "tlyric": "",
    "url": "https://v3-default.365yg.com/b16438257752e3b6fb903abadace4af4/6af5cbc5/video/tos/cn/tos-cn-v-2774c002/oUshiQsCiAAqggwAIWAB4WauCrEqv5YzuELwr/?a=3292&ch=0&cr=6&dr=0&er=2&lr=default&cd=0%7C0%7C0%7C6&br=1500&bt=1500&ds=5&ft=gK.4n88-oLsD12N3K~mn-UxFa9T3VF_O51Y&mime_type=audio_wav&qs=13&rc=M205OHI5cmhlZDMzNDlkM0BpM205OHI5cmhlZDMzNDlkM0BgcWhqMmRrLmxhLS1kYS9zYSNgcWhqMmRrLmxhLS1kYS9zcw%3D%3D&btag=c0000e00028000&dy_q=1794489596&l=202611122119564DD63F5B23725A3EEBA9",
    "level": "hi_res",
    "label": "录音室音质",
    "quality_type": 5,
    "br": 1536004,
    "size": 35692640,
    "size_label": "34.04MB",
    "format": "wav",
    "codec": "pcm_s16le",
    "md5": "fd38981dec6113c049bdaaff03ccc268",
    "qualities": [
      {
        "label": "录音室音质",
        "level": "hi_res",
        "quality_type": 5,
        "url": "https://v3-default.365yg.com/b16438257752e3b6fb903abadace4af4/6af5cbc5/video/tos/cn/tos-cn-v-2774c002/oUshiQsCiAAqggwAIWAB4WauCrEqv5YzuELwr/?a=3292&ch=0&cr=6&dr=0&er=2&lr=default&cd=0%7C0%7C0%7C6&br=1500&bt=1500&ds=5&ft=gK.4n88-oLsD12N3K~mn-UxFa9T3VF_O51Y&mime_type=audio_wav&qs=13&rc=M205OHI5cmhlZDMzNDlkM0BpM205OHI5cmhlZDMzNDlkM0BgcWhqMmRrLmxhLS1kYS9zYSNgcWhqMmRrLmxhLS1kYS9zcw%3D%3D&btag=c0000e00028000&dy_q=1794489596&l=202611122119564DD63F5B23725A3EEBA9",
        "br": 1536004,
        "size": 35692640,
        "size_label": "34.04MB",
        "format": "wav",
        "codec": "pcm_s16le",
        "md5": "fd38981dec6113c049bdaaff03ccc268",
        "width": 0,
        "height": 0,
        "duration_ms": 185899,
        "preview": false,
        "locked": false,
        "vip": true,
        "via": "primary",
        "expire_at": 0
      },
      {
        "label": "无损音质",
        "level": "lossless",
        "quality_type": 4,
        "url": "https://v26-default.365yg.com/366ff180117ff12d89555694d6bcb729/6af5cbc5/video/tos/cn/tos-cn-ve-2774/oQCsDfx6tEhCYXYmYgqgFBthQRZLCxdwlA7nDf/?a=3292&ch=0&cr=3&dr=0&er=2&lr=default&cd=0%7C0%7C0%7C3&br=1752&bt=876&ft=gK.4n88-oLsD12N3K~mn-UxFa9T3VF_O51Y&mime_type=video_mp4&rc=NTdpM2Q6ZjplNTY1aDMzOEBpM205OHI5cmhlZDMzNDlkM0BeMjUvMS8zNTMxMV5fM14yYSNgcWhqMmRrLmxhLS1kYS9zcw%3D%3D&btag=80000e00028000&dy_q=1794489596&l=2026111221195686A786D4259B0ED5063F",
        "br": 897411,
        "size": 20853458,
        "size_label": "19.89MB",
        "format": "flac",
        "codec": "flac",
        "md5": "94d8b92101efa1057a1cd738263261a6",
        "width": 0,
        "height": 0,
        "duration_ms": 185899,
        "preview": false,
        "locked": false,
        "vip": true,
        "via": "primary",
        "expire_at": 0
      },
      {
        "label": "极高音质",
        "level": "highest",
        "quality_type": 3,
        "url": "https://v11-default.365yg.com/cababa89c499c887093e86b7e32cccb9/6af5cbc4/video/tos/cn/tos-cn-ve-2774/oQMgrYCvwAQi4htWauCArBswsQiIuMFIzKoWj/?a=8478&ch=0&cr=11&dr=0&er=3&cd=0%7C0%7C0%7C11&br=251&bt=251&ft=F4rm74e0071E~vjVQFFYDh7usaIR6zUaglcjp&mime_type=audio_mp4&qs=7&rc=aGdlOzVlNzo0Zjs3ZDpoOkBpM205OHI5cmhlZDMzNDlkM0AxYl5fNjZjX18xLV8zNGE1YSNgcWhqMmRrLmxhLS1kYS9zcw%3D%3D&btag=80000e00028000&dy_q=1794489595&l=20261112211955DA9E9661C90FEC6933D4",
        "br": 257476,
        "size": 5983067,
        "size_label": "5.71MB",
        "format": "m4a",
        "codec": "aac",
        "md5": "6c5b37d8ac40e6b0b0151cb24d8fdbd6",
        "width": 0,
        "height": 0,
        "duration_ms": 185899,
        "preview": false,
        "locked": false,
        "vip": false,
        "via": "primary",
        "expire_at": 1794493380
      },
      {
        "label": "较高音质",
        "level": "higher",
        "quality_type": 2,
        "url": "https://v11-default.365yg.com/8f4ab734248aaa3ebe7652cf8a53cfc8/6af5cbc4/video/tos/cn/tos-cn-ve-2774/oMNACXDeFFm6sYhlvZtwCBdtYxDQYCgfgqLtpE/?a=8478&ch=0&cr=11&dr=0&er=3&cd=0%7C0%7C0%7C11&br=126&bt=126&ft=F4rm74e0071E~vjVQFFYDh7usaIR6zUaglcjp&mime_type=audio_mp4&qs=6&rc=aWU1NDc8OmU5ZDk5MzgzOkBpM205OHI5cmhlZDMzNDlkM0AtNC1gLmBiNjYxMF8tNGM2YSNgcWhqMmRrLmxhLS1kYS9zcw%3D%3D&btag=80000e00028000&dy_q=1794489595&l=20261112211955DA9E9661C90FEC6933D4",
        "br": 129443,
        "size": 3007929,
        "size_label": "2.87MB",
        "format": "m4a",
        "codec": "aac",
        "md5": "bb6d1edc0ec16921af45c2b87d324398",
        "width": 0,
        "height": 0,
        "duration_ms": 185899,
        "preview": false,
        "locked": false,
        "vip": false,
        "via": "primary",
        "expire_at": 1794493380
      },
      {
        "label": "标准音质",
        "level": "medium",
        "quality_type": 1,
        "url": "https://v11-default.365yg.com/eabdc7d03d1560941660a024d14b5597/6af5cbc4/video/tos/cn/tos-cn-ve-2774/ocuzCuYYrrAiv4sBwWcdhwyWBaMsIAIgMQGiQ/?a=8478&ch=0&cr=11&dr=0&er=3&cd=0%7C0%7C0%7C11&br=63&bt=63&ft=F4rm74e0071E~vjVQFFYDh7usaIR6zUaglcjp&mime_type=audio_mp4&qs=3&rc=NDNpMzkzaDk2PDVmNzc6ZUBpM205OHI5cmhlZDMzNDlkM0AtMTQuXzQuNTYxLjAwLl5jYSNgcWhqMmRrLmxhLS1kYS9zcw%3D%3D&btag=80000e00028000&dy_q=1794489595&l=20261112211955DA9E9661C90FEC6933D4",
        "br": 65427,
        "size": 1520362,
        "size_label": "1.45MB",
        "format": "m4a",
        "codec": "aac",
        "md5": "1973aa305304abb2f5acbc4b8cab73fc",
        "width": 0,
        "height": 0,
        "duration_ms": 185899,
        "preview": false,
        "locked": false,
        "vip": false,
        "via": "primary",
        "expire_at": 1794493380
      }
    ],
    "extra": {
      "log_id": "20261112211954260E28C32CD1274B8EE6",
      "media_id": "v02ad6g10000daob1enog65om5k6tjc0",
      "model_video_id": "v02ad6g10000daob1enog65om5k6tjc0",
      "token_expire_at": 1794575994,
      "preview_start_ms": 0,
      "preview_duration_ms": 0,
      "requested_level": "auto",
      "locked_qualities": [
        "spatial"
      ]
    }
  },
  "api_source": "API官网:api.cxzja.cn",
  "timestamp": "2026-11-12 21:19:57"
}

计费标准

了解接口的计费方式和价格
免费接口
免费
完全免费
所有用户均可免费调用,无需付费
QPS限制
普通用户
60
次/分钟
会员用户
120
次/分钟
每日请求次数
普通用户
不限
会员用户
不限

安全认证

了解接口的认证方式和访问凭证管理
Token 认证

登录后可查看您的Token

立即登录
实名认证
无需实名认证
本接口对所有用户开放,无需实名认证即可访问
认证方式
推荐 Header 认证

通过 HTTP Header 传递认证信息

Authorization
Bearer {access_token}

或通过curl请求参数传递:

curl
curl "https://api.cxzja.cn/api/qsmusic2?token=YOUR_TOKEN"

参数文档

查看接口请求参数和返回字段说明
请求参数
参数名 类型 必填 默认值 可选值 说明
token string 必填 无 登录后显示你的请求token 接口请求唯一认证标识!
mode string 可选 json json 返回格式
msg string 必填 关键词
n string 必填 通过序号下载
url string 必填 汽水音乐分享短链接
id string 必填 歌曲id
br string 必填 br=auto/medium/higher/highest/lossless/hi_res;mv=auto/original/1080p/720p
page string 可选 页数
cursor string 可选 起始偏移,默认 0
offset string 可选 起始偏移,默认 0
返回参数
字段名 类型 说明
code
int 返回状态码

状态码

了解接口返回的状态码含义及处理方式
接口状态码
状态码 说明
200 请求成功
201 请求失败
服务器状态码

在线测试

在线调试接口,实时查看响应结果
发起请求
GET/POST

示例代码

多种语言的接口调用示例
PHP
JavaScript
NodeJs
Python
Go
Java
C#
C
C++
易语言
PHP
<?php
$API_TOKEN = 'YOUR_TOKEN';
$API_URL = 'https://api.cxzja.cn/api/qsmusic2';

$params = array(
    'token' => 'YOUR_TOKEN',
    'mode' => 'json',
    'msg' => '参数值',
    'n' => '参数值',
    'url' => '参数值',
    'id' => '参数值',
    'br' => '参数值',
    'page' => '参数值',
    'cursor' => '参数值',
    'offset' => '参数值',
);

$res = api::send($API_URL, $params, 'GET/POST');
print($res);

class api {
    public static function send($url, $data, $type) {
        $data = http_build_query($data);
        $ch = curl_init();
        if ($type == 'POST') {
            curl_setopt($ch, CURLOPT_URL, $url);
            curl_setopt($ch, CURLOPT_POST, true);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
        } else {
            curl_setopt($ch, CURLOPT_URL, $url . '?' . $data);
        }
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_TIMEOUT, 10);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        $res = curl_exec($ch);
        curl_close($ch);
        return $res;
    }
}
JavaScript
$.ajax({
    url: 'https://api.cxzja.cn/api/qsmusic2',
    data: {
        token: 'YOUR_TOKEN',
        mode: 'json',
        msg: '参数值',
        n: '参数值',
        url: '参数值',
        id: '参数值',
        br: '参数值',
        page: '参数值',
        cursor: '参数值',
        offset: '参数值',
    },
    type: 'GET/POST',
    dataType: 'json',
    success: function(data) {
        console.log(data);
    },
    error: function(err) {
        console.log('请求失败', err);
    }
});
Python
import requests

url = "https://api.cxzja.cn/api/qsmusic2"
data = {
    "token": "YOUR_TOKEN",
    "mode": "json",
    "msg": "参数值",
    "n": "参数值",
    "url": "参数值",
    "id": "参数值",
    "br": "参数值",
    "page": "参数值",
    "cursor": "参数值",
    "offset": "参数值",
}

response = requests.post(url, data=data)
print(response.json())
Java
import java.net.HttpURLConnection;
import java.net.URL;
import java.io.*;

public class ApiRequest {
    public static void main(String[] args) throws Exception {
        URL url = new URL("https://api.cxzja.cn/api/qsmusic2");
        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
        conn.setRequestMethod("GET/POST");
        conn.setConnectTimeout(10000);

        BufferedReader reader = new BufferedReader(
            new InputStreamReader(conn.getInputStream()));
        String line;
        StringBuilder result = new StringBuilder();
        while ((line = reader.readLine()) != null) {
            result.append(line);
        }
        reader.close();
        System.out.println(result.toString());
    }
}
Go
package main

import (
    "fmt"
    "io/ioutil"
    "net/http"
"strings"
)

func main() {
    data := "token=YOUR_TOKEN&mode=json&msg=%E5%8F%82%E6%95%B0%E5%80%BC&n=%E5%8F%82%E6%95%B0%E5%80%BC&url=%E5%8F%82%E6%95%B0%E5%80%BC&id=%E5%8F%82%E6%95%B0%E5%80%BC&br=%E5%8F%82%E6%95%B0%E5%80%BC&page=%E5%8F%82%E6%95%B0%E5%80%BC&cursor=%E5%8F%82%E6%95%B0%E5%80%BC&offset=%E5%8F%82%E6%95%B0%E5%80%BC"
    resp, _ := http.Post("https://api.cxzja.cn/api/qsmusic2",
        "application/x-www-form-urlencoded", strings.NewReader(data))
    defer resp.Body.Close()
    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(body))
}
C#
using System;
using System.Net.Http;
using System.Threading.Tasks;

class Program {
    static async Task Main() {
        using var client = new HttpClient();
        var data = new FormUrlEncodedContent(new Dictionary<string, string> {
            {"token", "YOUR_TOKEN"},
            {"mode", "json"},
            {"msg", "参数值"},
            {"n", "参数值"},
            {"url", "参数值"},
            {"id", "参数值"},
            {"br", "参数值"},
            {"page", "参数值"},
            {"cursor", "参数值"},
            {"offset", "参数值"},
        });
        var response = await client.PostAsync("https://api.cxzja.cn/api/qsmusic2", data);
        var result = await response.Content.ReadAsStringAsync();
        Console.WriteLine(response);
    }
}
NodeJs
const https = require('https');
const querystring = require('querystring');

const postData = querystring.stringify({
    'token': 'YOUR_TOKEN',
    'mode': 'json',
    'msg': '参数值',
    'n': '参数值',
    'url': '参数值',
    'id': '参数值',
    'br': '参数值',
    'page': '参数值',
    'cursor': '参数值',
    'offset': '参数值',
});
const options = {
    hostname: 'api.cxzja.cn',
    path: '/api/qsmusic2',
    method: 'POST',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
};
const req = https.request(options, res => {
    let data = '';
    res.on('data', d => data += d);
    res.on('end', () => console.log(data));
});
req.write(postData);
req.end();
C
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <curl/curl.h>

static size_t WriteCallback(void *contents, size_t size, size_t nmemb, void *userp) {
    ((char*)userp)[0] = '\0';
    strcat(userp, contents);
    return size * nmemb;
}

int main() {
    CURL *curl;
    CURLcode res;
    char response[4096] = {0};

    curl_global_init(CURL_GLOBAL_DEFAULT);
    curl = curl_easy_init();

    if(curl) {
        curl_easy_setopt(curl, CURLOPT_URL, "https://api.cxzja.cn/api/qsmusic2");
        curl_easy_setopt(curl, CURLOPT_POST, 1L);
        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "token=YOUR_TOKEN&mode=json&msg=%E5%8F%82%E6%95%B0%E5%80%BC&n=%E5%8F%82%E6%95%B0%E5%80%BC&url=%E5%8F%82%E6%95%B0%E5%80%BC&id=%E5%8F%82%E6%95%B0%E5%80%BC&br=%E5%8F%82%E6%95%B0%E5%80%BC&page=%E5%8F%82%E6%95%B0%E5%80%BC&cursor=%E5%8F%82%E6%95%B0%E5%80%BC&offset=%E5%8F%82%E6%95%B0%E5%80%BC");
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, response);
        curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10L);

        res = curl_easy_perform(curl);
        if(res == CURLE_OK) printf("%s\n", response);
        curl_easy_cleanup(curl);
    }
    curl_global_cleanup();
    return 0;
}
C++
#include <iostream>
#include <string>
#include <curl/curl.h>

size_t WriteCallback(void* contents, size_t size, size_t nmemb, std::string* userp) {
    userp->append((char*)contents, size * nmemb);
    return size * nmemb;
}

int main() {
    CURL* curl = curl_easy_init();
    std::string response;

    if (curl) {
        curl_easy_setopt(curl, CURLOPT_URL, "https://api.cxzja.cn/api/qsmusic2");
        curl_easy_setopt(curl, CURLOPT_POST, 1L);
        curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "token=YOUR_TOKEN&mode=json&msg=%E5%8F%82%E6%95%B0%E5%80%BC&n=%E5%8F%82%E6%95%B0%E5%80%BC&url=%E5%8F%82%E6%95%B0%E5%80%BC&id=%E5%8F%82%E6%95%B0%E5%80%BC&br=%E5%8F%82%E6%95%B0%E5%80%BC&page=%E5%8F%82%E6%95%B0%E5%80%BC&cursor=%E5%8F%82%E6%95%B0%E5%80%BC&offset=%E5%8F%82%E6%95%B0%E5%80%BC");
        curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback);
        curl_easy_setopt(curl, CURLOPT_WRITEDATA, &response);
        curl_easy_setopt(curl, CURLOPT_TIMEOUT, 10L);

        CURLcode res = curl_easy_perform(curl);
        if (res == CURLE_OK) std::cout << response << std::endl;
        curl_easy_cleanup(curl);
    }
    curl_global_cleanup();
    return 0;
}
易语言
.版本 2
.支持库 spec

.局部变量 url, 文本型
.局部变量 params, 文本型
.局部变量 result, 文本型

url = "https://api.cxzja.cn/api/qsmusic2"
params = "token=YOUR_TOKEN&mode=json&msg=%E5%8F%82%E6%95%B0%E5%80%BC&n=%E5%8F%82%E6%95%B0%E5%80%BC&url=%E5%8F%82%E6%95%B0%E5%80%BC&id=%E5%8F%82%E6%95%B0%E5%80%BC&br=%E5%8F%82%E6%95%B0%E5%80%BC&page=%E5%8F%82%E6%95%B0%E5%80%BC&cursor=%E5%8F%82%E6%95%B0%E5%80%BC&offset=%E5%8F%82%E6%95%B0%E5%80%BC"

result = 编码_URL解码 (网页_访问 (url, , params))
调试输出 (result)

AI开发文档

导出接口文档供AI助手快速理解接口结构
复制下方内容粘贴给AI助手,即可快速生成对接代码。
JSON 格式 0 KB

                    

接口评论0

登录后即可发表评论与回复
暂无评论,快来抢沙发~