| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| action | string | 是 | 操作类型,仅可为:search(关键词搜索)、song_detail(歌曲详情)、url(播放直链)、lyric(歌词)、mv_detail(MV详情)、mv_url(MV播放链接) | |
| keywords | string | 否 | 搜索关键词,仅当action为search(关键词搜索)时有效 | 起风了 |
| type | string | 否 | 搜索类型,仅当action为search(关键词搜索)时有效,仅可为:type=1 单曲 / 1004 MV / 10 专辑 / 100 歌手 / 1000 歌单 / 1006 歌词 | 1 |
| limit | string | 否 | 搜索类型返回页数量,仅当action为search(关键词搜索)时有效,默认30 | 30 |
| ids | string | 否 | 歌曲ids,仅当仅当action为song_detail(歌曲详情)时有效 | |
| id | string | 否 | 歌曲ids,仅当仅当action为url(播放直链)、lyric(歌词)、mv_detail(MV详情)、mv_url(MV播放链接)时有效 | |
| level | string | 否 | 歌曲音质,仅当仅当action为url(播放直链)时有效,仅可为:standard/exhigh/lossless/hires/jyeffect/sky/jymaster(无会员,高音质无法获取,自动降级到可用资源) |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "action",
"type": "string",
"required": true,
"description": "操作类型,仅可为:search(关键词搜索)、song_detail(歌曲详情)、url(播放直链)、lyric(歌词)、mv_detail(MV详情)、mv_url(MV播放链接)",
"example": ""
},
{
"name": "keywords",
"type": "string",
"required": false,
"description": "搜索关键词,仅当action为search(关键词搜索)时有效",
"example": "起风了"
},
{
"name": "type",
"type": "string",
"required": false,
"description": "搜索类型,仅当action为search(关键词搜索)时有效,仅可为:type=1 单曲 / 1004 MV / 10 专辑 / 100 歌手 / 1000 歌单 / 1006 歌词",
"example": "1"
},
{
"name": "limit",
"type": "string",
"required": false,
"description": "搜索类型返回页数量,仅当action为search(关键词搜索)时有效,默认30",
"example": "30"
},
{
"name": "ids",
"type": "string",
"required": false,
"description": "歌曲ids,仅当仅当action为song_detail(歌曲详情)时有效",
"example": ""
},
{
"name": "id",
"type": "string",
"required": false,
"description": "歌曲ids,仅当仅当action为url(播放直链)、lyric(歌词)、mv_detail(MV详情)、mv_url(MV播放链接)时有效",
"example": ""
},
{
"name": "level",
"type": "string",
"required": false,
"description": "歌曲音质,仅当仅当action为url(播放直链)时有效,仅可为:standard/exhigh/lossless/hires/jyeffect/sky/jymaster(无会员,高音质无法获取,自动降级到可用资源)",
"example": ""
}
]
{
"openapi": "3.1.1",
"info": {
"title": "网易音乐",
"description": "获取歌曲、MV、歌词等资源,数据来源于网络。",
"version": "1.0.0"
},
"paths": {
"/v1/netease_music.php": {
"get": {
"summary": "网易音乐",
"description": "获取歌曲、MV、歌词等资源,数据来源于网络。",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "action",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "操作类型,仅可为:search(关键词搜索)、song_detail(歌曲详情)、url(播放直链)、lyric(歌词)、mv_detail(MV详情)、mv_url(MV播放链接)"
},
{
"name": "keywords",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "起风了"
},
"description": "搜索关键词,仅当action为search(关键词搜索)时有效"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "搜索类型,仅当action为search(关键词搜索)时有效,仅可为:type=1 单曲 / 1004 MV / 10 专辑 / 100 歌手 / 1000 歌单 / 1006 歌词"
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "30"
},
"description": "搜索类型返回页数量,仅当action为search(关键词搜索)时有效,默认30"
},
{
"name": "ids",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "歌曲ids,仅当仅当action为song_detail(歌曲详情)时有效"
},
{
"name": "id",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "歌曲ids,仅当仅当action为url(播放直链)、lyric(歌词)、mv_detail(MV详情)、mv_url(MV播放链接)时有效"
},
{
"name": "level",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "歌曲音质,仅当仅当action为url(播放直链)时有效,仅可为:standard/exhigh/lossless/hires/jyeffect/sky/jymaster(无会员,高音质无法获取,自动降级到可用资源)"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "网易音乐",
"description": "获取歌曲、MV、歌词等资源,数据来源于网络。",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "action",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "操作类型,仅可为:search(关键词搜索)、song_detail(歌曲详情)、url(播放直链)、lyric(歌词)、mv_detail(MV详情)、mv_url(MV播放链接)"
},
{
"name": "keywords",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "起风了"
},
"description": "搜索关键词,仅当action为search(关键词搜索)时有效"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "搜索类型,仅当action为search(关键词搜索)时有效,仅可为:type=1 单曲 / 1004 MV / 10 专辑 / 100 歌手 / 1000 歌单 / 1006 歌词"
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "30"
},
"description": "搜索类型返回页数量,仅当action为search(关键词搜索)时有效,默认30"
},
{
"name": "ids",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "歌曲ids,仅当仅当action为song_detail(歌曲详情)时有效"
},
{
"name": "id",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "歌曲ids,仅当仅当action为url(播放直链)、lyric(歌词)、mv_detail(MV详情)、mv_url(MV播放链接)时有效"
},
{
"name": "level",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "歌曲音质,仅当仅当action为url(播放直链)时有效,仅可为:standard/exhigh/lossless/hires/jyeffect/sky/jymaster(无会员,高音质无法获取,自动降级到可用资源)"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://xiaoapi.cn",
"description": "当前访问入口(https)"
}
]
}
请求示例:https://xiaoapi.cn/v1/netease_music.php?action=song_detail&ids=1330348068
{
"code": 200,
"message": "ok",
"data": {
"songs": [
{
"id": 1330348068,
"name": "起风了",
"artist": "冯沁苑(买辣椒也用券)",
"album": "起风了",
"cover": "https://p1.music.126.net/diGAyEmpymX8G7JcnElncQ==/109951163699673355.jpg",
"duration": 325868,
"fee": 8,
"privilege": null
}
]
}
}
请求示例:https://xiaoapi.cn/v1/netease_music.php?action=url&id=1330348068&level=hires
{
"code": 200,
"message": "ok",
"data": {
"id": 1330348068,
"url": "http://m701.music.126.net/20261006230625/fc7ff31abdcc8ec3f23174e35619134e/jdymusic/obj/wo3DlMOGwrbDjj7DisKw/28481711284/6dc0/f58f/bc29/cd16662177fd431d137cb5837c1be8d1.mp3?vuutv=28YQkd1xuf9wJfSw4dbmj2hV583fUFsQRRojZpvIVkJC5++3C22+ef37ndyk2HpnfKHHoAKC1RUVmvC5MSUCSc8J56tctQX0LryUi0ewaHk=",
"br": 320000,
"type": "mp3",
"level": "hires",
"size": 13037236,
"md5": "cd16662177fd431d137cb5837c1be8d1",
"need_vip": false,
"login": false
}
}
暂无详细文档
暂无代码示例。管理员可在后台用 AI 生成或手动编写。
// 结果将在此处显示
生效日期:2026年7月22日
欢迎使用 xiaoapi.cn(以下简称"本平台")。在使用本平台提供的 API 服务(以下简称"本服务")前,请务必仔细阅读并充分理解本免责声明。您以任何方式调用、访问或使用本服务,即视为您已阅读、理解并同意接受本声明的全部内容。
本平台作为 API 技术服务的提供方,仅提供技术接口与数据分发服务。本声明的目的在于明确平台与用户之间的责任边界,督促用户合法、合规地使用本服务,防范违法违规行为的发生。
用户在使用本服务时,明确禁止从事以下行为:
在法律法规允许的最大范围内,本平台对以下情形不承担责任:
因用户违反本声明或相关法律法规,导致本平台及其关联方、合作方遭受任何损失(包括但不限于赔偿款、罚款、律师费、诉讼费等),用户同意向本平台及相关方承担全部赔偿责任。
本平台有权根据法律法规变化、业务调整或监管要求,随时修改本声明。修改后的声明将在本页面公布,自公布之日起生效。您继续使用本服务,即视为接受更新后的声明。
如您对本声明有任何疑问,或发现他人存在违规使用本服务的行为,欢迎通过本平台公示的联系方式与我们联系,我们将及时处理。