搜索的资源来自于某人听书平台
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| msg | string | 是 | 搜索关键词 | 斗破苍穹 |
| type | string | 否 | 返回格式,可选值:json、text,默认 json,当j=1时支持xml输出,也就是QQ音乐卡片输出 | json |
| y | string | 否 | 页码,默认 1 | 1 |
| n | string | 否 | 选择搜索结果中的第 n 个小说,用于获取详情或播放链接 | 1 |
| j | string | 否 | 获取小说的第 几章播放链接 | 1 |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "msg",
"type": "string",
"required": true,
"description": "搜索关键词",
"example": "斗破苍穹"
},
{
"name": "type",
"type": "string",
"required": false,
"description": "返回格式,可选值:json、text,默认 json,当j=1时支持xml输出,也就是QQ音乐卡片输出",
"example": "json"
},
{
"name": "y",
"type": "string",
"required": false,
"description": "页码,默认 1",
"example": "1"
},
{
"name": "n",
"type": "string",
"required": false,
"description": "选择搜索结果中的第 n 个小说,用于获取详情或播放链接",
"example": "1"
},
{
"name": "j",
"type": "string",
"required": false,
"description": "获取小说的第 几章播放链接",
"example": "1"
}
]
{
"openapi": "3.1.1",
"info": {
"title": "搜索听书",
"description": "搜索的资源来自于某人听书平台",
"version": "1.0.0"
},
"paths": {
"/api/yljk/lrts/api.php": {
"get": {
"summary": "搜索听书",
"description": "搜索的资源来自于某人听书平台",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "msg",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "斗破苍穹"
},
"description": "搜索关键词"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "返回格式,可选值:json、text,默认 json,当j=1时支持xml输出,也就是QQ音乐卡片输出"
},
{
"name": "y",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "页码,默认 1"
},
{
"name": "n",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "选择搜索结果中的第 n 个小说,用于获取详情或播放链接"
},
{
"name": "j",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "获取小说的第 几章播放链接"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
},
"post": {
"summary": "搜索听书",
"description": "搜索的资源来自于某人听书平台",
"parameters": [
{
"name": "key",
"in": "query",
"required": true,
"schema": {
"type": "string"
},
"description": "接口调用密钥"
},
{
"name": "msg",
"in": "query",
"required": true,
"schema": {
"type": "string",
"example": "斗破苍穹"
},
"description": "搜索关键词"
},
{
"name": "type",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "json"
},
"description": "返回格式,可选值:json、text,默认 json,当j=1时支持xml输出,也就是QQ音乐卡片输出"
},
{
"name": "y",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "页码,默认 1"
},
{
"name": "n",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "选择搜索结果中的第 n 个小说,用于获取详情或播放链接"
},
{
"name": "j",
"in": "query",
"required": false,
"schema": {
"type": "string",
"example": "1"
},
"description": "获取小说的第 几章播放链接"
}
],
"responses": {
"200": {
"description": "成功",
"content": {
"application/json": {
"schema": {
"type": "object"
}
}
}
}
}
}
}
},
"servers": [
{
"url": "https://api.317ak.com",
"description": "当前访问入口(https)"
}
]
}
{
"status": "success",
"episode": 1,
"chapterName": "第1章",
"totalChapters": "总1645章",
"playUrl": "https://vb.stream.tencentmusic.com/long/C200000VIJLI1hSL4P.m4a?uid=4&lrid=bHJpZGFINXc4bUs4R3hMZz0=&res=562200000001&ct=1752940902658&ttl=86400000&fromTag=5&vkey=6EBA05550804B64CB3ED39E4CFC94FC284CE3FE5074C33FC9016F8923E27097823623FC8EC1AB22BBFBA41D921439053FC863C13B2897D68BFB9AEBE26C5E508&tmeType=1",
"bookId": "5622",
"bookTitle": "斗破苍穹|《缘起》篇动漫热播|大灰狼演播-天蚕土豆-大灰狼"
}
提供听书资源搜索能力,用于根据关键词查询某人听书平台中的相关内容。
适用于需要接入听书搜索功能的应用或服务。
https://api-v2.317ak.com/api/yljk/lrts/api.php
GET、POST
本接口调用需要密钥。
首选鉴权方式:Query 参数传递。
请求时添加参数:
key=接口调用密钥
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥 |
| msg | string | 是 | 搜索关键词,例如:斗破苍穹 |
| type | string | 否 | 返回格式,可选值:json、text,默认 json |
| y | string | 否 | 页码,默认值为 1 |
| n | string | 否 | 选择搜索结果中的第 n 个小说,用于获取详情或播放链接 |
| j | string | 否 | 获取小说的第几章播放链接 |
{
"status": "success",
"episode": 1,
"chapterName": "第1章",
"totalChapters": "总1645章",
"playUrl": "播放链接",
"bookId": "5622",
"bookTitle": "斗破苍穹|《缘起》篇动漫热播|大灰狼演播-天蚕土豆-大灰狼"
}
| 字段 | 类型 | 说明 |
|---|---|---|
| status | string | 请求处理状态 |
| episode | number | 当前章节序号 |
| chapterName | string | 当前章节名称 |
| totalChapters | string | 资源总章节数量描述 |
| playUrl | string | 当前章节播放链接 |
| bookId | string | 资源编号 |
| bookTitle | string | 资源标题信息 |
{
"code": 0,
"msg": "未提供调用密钥",
"errcode": 11001
}
| errcode | 含义 |
|---|---|
| 11001 | 未提供调用密钥 |
| 11002 | 密钥错误 |
| 11003 | 密钥已禁用 |
| 11004 | 积分余额不足 |
| 11005 | 请求过于频繁(QPM 限制) |
| 11006 | 接口维护中 |
| 11007 | 接口已禁用 |
| 11008 | 接口不可用 |
| 11009 | 密钥校验暂不可用 |
| 11010 | 积分系统暂不可用 |
| 11011 | 收费接口须提供有效密钥 |
| 11012 | 鉴权方式错误 |
| 11013 | 接口不存在 |
| 11014 | 地址无效 |
| 11015 | 地址不允许 |
| 11016 | 请求失败 |
| 11017 | 服务暂不可用 |
| 11018 | 请求方式不允许 |
| 11019 | 当前IP不在白名单内 |
| 11020 | 启用出口服务须提供有效密钥 |
| 11021 | 未配置可用出口服务 |
| 11022 | 出口服务不可用 |
| 11023 | 密钥已过期 |
| 11024 | 令牌分配积分不足 |
GET 请求示例:
curl "https://api-v2.317ak.com/api/yljk/lrts/api.php?key=你的密钥&msg=斗破苍穹&type=json&y=1"
// PHP
$url = "https://api-v2.317ak.com/api/yljk/lrts/api.php?key=你的密钥&msg=斗破苍穹&type=json&y=1";
$result = file_get_contents($url);
echo $result;
key 进行传递,例如 key=接口调用密钥。请妥善保管密钥,避免泄露。msg 为必填搜索关键词,建议使用明确的书名、作者名或相关关键词,以提高搜索结果匹配度。type 用于指定返回格式,未填写时默认返回 json。如需其他格式,请确保参数值符合接口支持范围。y 指定页码,页码建议使用有效正整数,避免请求无效页面。n 用于选择搜索结果中的指定小说,j 用于获取对应章节播放链接,使用时请确保对应资源和章节存在。curl "https://api-v2.317ak.com/api/yljk/lrts/api.php?key=YOUR_API_KEY&msg=斗破苍穹&type=json&y=1"
# 搜索听书
# GET请求示例
curl -G "https://api-v2.317ak.com/api/yljk/lrts/api.php" \
--data-urlencode "key=YOUR_API_KEY" \
--data-urlencode "msg=斗破苍穹" \
--data-urlencode "type=json" \
--data-urlencode "y=1"