查询 API 目录
GET/api/v1.0/quote/apis按路径升序列出已上线的公开接口定义,包括请求方法、路径、参数约束和响应字段说明(可能包含本文档未单独成页的线上接口,如资讯类接口);本目录查询、权限查询、额度查询及订阅接口不在此列表中。
请求参数
| 参数 | 类型 | 位置 | 必填 | 说明 |
|---|---|---|---|---|
page | integer | 查询 | 否 | 页码,从 1 开始,默认 1 |
page_size | integer | 查询 | 否 | 每页接口数,默认 10,范围 1~20 |
keyword | string | 查询 | 否 | 关键词筛选(忽略大小写与首尾空格),匹配 api_id、path、description 或 description_en 子串;省略时列出全部条目 |
请求示例
bash
curl -s "https://webapi.futunn.com/api/v1.0/quote/apis?keyword=/api/v1.0/quote/search-hot-topics&page_size=1" \
-H "Authorization: Bearer <AccessToken>"响应字段
本接口无 data 包裹,成功响应顶层直接返回 apis 和 pagination。
| 字段 | 类型 | 说明 |
|---|---|---|
apis | object[] | 匹配的接口定义列表,按 path 升序排列;无匹配项时为空数组 |
apis[].api_id | string | 接口唯一标识 |
apis[].path | string | 接口请求路径 |
apis[].method | string | HTTP 请求方法(如 GET、POST) |
apis[].description | string | 接口中文说明;未配置时省略 |
apis[].description_en | string | 接口英文说明;未配置时省略 |
apis[].request | object | 请求参数与请求体定义 |
apis[].request.params | object[] | 路径与查询参数列表;无参数时为空数组 |
apis[].request.params[].name | string | 参数名称 |
apis[].request.params[].type | string | 参数类型(如 string、int、number、bool、array<string>、object_array) |
apis[].request.params[].required | boolean | 是否必填;非必填时省略 |
apis[].request.params[].default | string / number / boolean | 默认值;未设置时省略 |
apis[].request.params[].min | number | 数值下限;未设置时省略 |
apis[].request.params[].max | number | 数值上限;未设置时省略 |
apis[].request.params[].minimum | number | 数值下限;未设置时省略 |
apis[].request.params[].maximum | number | 数值上限;未设置时省略 |
apis[].request.params[].minLength | integer | 字符串最小字节长度或数组最小元素数;未设置时省略 |
apis[].request.params[].maxLength | integer | 字符串最大字节长度或数组最大元素数;未设置时省略 |
apis[].request.params[].pattern | string | 正则表达式校验规则;未设置时省略 |
apis[].request.params[].min_items | integer | 数组最小元素数;未设置时省略 |
apis[].request.params[].max_items | integer | 数组最大元素数;未设置时省略 |
apis[].request.params[].enum | string[] / integer[] | 允许的枚举取值列表;未设置时省略 |
apis[].request.params[].desc | string | 参数中文说明;未配置时省略 |
apis[].request.params[].desc_en | string | 参数英文说明;未配置时省略 |
apis[].request.params[].fields | object[] | 嵌套子字段列表(元素结构同 params[]);无子字段时省略 |
apis[].request.body | object[] | 请求体字段列表(元素结构同 request.params[]);无请求体时为空数组 |
apis[].response | object | 响应结构定义 |
apis[].response.wrap | string | 数据外层包装字段名(如 items);无包装时省略 |
apis[].response.fields | object | 响应字段字典(键为字段名);无声明字段时为空对象 |
apis[].response.fields.<field>.desc | string | 字段中文说明;未配置时省略 |
apis[].response.fields.<field>.desc_en | string | 字段英文说明;未配置时省略 |
apis[].response.fields.<field>.wrap | string | 子树列表包装字段名;无包装时省略 |
apis[].response.fields.<field>.fields | object | 嵌套子字段字典(结构同 response.fields);无子字段时省略 |
pagination | object | 顶层分页信息 |
pagination.page | integer | 当前页码(从 1 开始) |
pagination.page_size | integer | 每页条目数 |
pagination.total | integer | 匹配的接口总数 |
pagination.total_pages | integer | 总页数;无匹配项时为 0 |
pagination.has_next | boolean | 是否有下一页 |
pagination.has_prev | boolean | 是否有上一页;无匹配项时为 false |
响应示例
json
{
"apis": [
{
"api_id": "quote.search_hot_topics",
"description": "获取全市场实时热门搜索词条与话题列表。\n返回包含:词条 ID(item_id)、词条文本(text)、热度值(hot_value)与落地页跳转链接(url_scheme)。\n",
"description_en": "Get real-time trending search topics and keywords.\nReturns: item_id, text, hot_value, and url_scheme.\n",
"path": "/api/v1.0/quote/search-hot-topics",
"method": "GET",
"request": {
"params": [],
"body": []
},
"response": {
"wrap": "items",
"fields": {
"hot_value": {
"desc": "热度值",
"desc_en": "Heat value"
},
"item_id": {
"desc": "热点词条唯一 ID",
"desc_en": "Topic item unique ID"
},
"text": {
"desc": "热点词条文本",
"desc_en": "Trending topic text"
},
"url_scheme": {
"desc": "跳转链接",
"desc_en": "Landing URL"
}
}
}
}
],
"pagination": {
"page": 1,
"page_size": 1,
"total": 1,
"total_pages": 1,
"has_next": false,
"has_prev": false
}
}错误码
分页参数错误使用 HTTP 400 返回 {"error", "message"},不使用统一信封:
| HTTP 状态 | error | 说明 |
|---|---|---|
| 400 | invalid_page | page 不是正整数 |
| 400 | invalid_page_size | page_size 不是正整数 |
| 400 | page_size_too_large | page_size 超过上限 20 |
| 400 | page_out_of_range | 存在匹配项且请求的 page 大于 total_pages |
json
{
"error": "page_size_too_large",
"message": "page_size must be <= 20 (got 21)"
}json
{
"error": "page_out_of_range",
"message": "page 2 exceeds total_pages 1"
}限频或访问策略错误使用 HTTP 200 返回 ret_code、ret_msg 与 error:
| ret_code | error.code | 说明 |
|---|---|---|
| -9 | permission_denied | 当前访问策略拒绝 |
| -11 | rate_limited | 请求频率超出限制;若返回 Retry-After,按其秒数退避 |
| -13 | quota_unavailable | 限频依赖暂时不可用 |
说明
- 当
keyword无匹配项(total=0)时,即使page大于 1 也返回 HTTP 200,其中apis为空数组、total_pages为0、has_next和has_prev均为false。