文档 · 检索
检索
一个问句,同时回词卡、专题卷、原典、规则与实案(v2.2 支持 10 子类源头精确开关;免费密钥全开放且走纯本地零成本检索)。
GET
api.asklingshu.com/api/open/v1/classics/search/参数QUERY
| 名称 | 类型 | 说明 |
|---|---|---|
q | string ≤160 | 问句、术语、书名,或学者语法(+ - 书: 派: 只看盲例 只看公版 反例) |
method | enum | bazi | ziwei | qimen | liuyao | jyotish | daliuren | qizheng | tarot | meihua |
layer | enum | all | card | unit | dossier | rule | case默认 all |
recall_profile | enum | all | user_search | pure_doctrine | agent_reasoning | agent_with_blind_cases | agent_blind_cases | open_standard默认 all(可按需切换 pure_doctrine / agent_reasoning 等) |
include_types | csv | 精确纳入子类型:card_l1、card_l2、dossier、unit_public、unit_snippet、unit_biblio、unit_case、rule、case_blind、case_retro 或组别名 card/unit/case |
exclude_types | csv | 精确排除上述任意子类型或组别名 |
include_cases | bool | 快捷开关全部案例(含书内完整实案 unit_case) |
include_unit_cases | bool | 单独开关书内完整案例(unit_case) |
blind_cases_only | bool | 只保留先断后验盲例(case_blind) |
rights_tier | enum | public_fulltext | citation_snippet | biblio_only |
authority | enum | tier_1 | tier_1_classic |
school | string | 学派标识 |
book_id | string | 只在某部书里找 |
mode | enum | auto | hybrid | lexical | rag默认 auto |
rerank | bool | 是否交叉重排(仅开通外部精排的密钥生效) |
page | int ≤25 | 开放翻页上限第 25 页(防顺序拖库)默认 1 |
page_size | int ≤40 | —默认 20 |
返回200 · application/json
| 字段 | 类型 | 说明 |
|---|---|---|
schema · release_version | string | 结构版本与语料发布版,所有接口都有 |
total · elapsed_ms | int · float | 命中总数与耗时 |
match_mode | string | exact · strict_and · core_relaxed · broad_or · semantic_rag · browse |
retrieval_channels | string[] | 实际用到的召回通道 |
recall_scope | object | 本次生效的召回子类型与案例开关 |
coverage_notice | object | null | 当问句涉及未收录术法(如西洋占星/择日/风水/相术)时的诚实边界提示 |
matched_intents | object[] | 识别出的生活意图与锚定术语 |
scholar_filters · detected_chart | object | 解析出的学者语法、问句里识别到的盘面 |
items[] | object[] | hit_type、title、book_title、page_label、snippet、rights_tier、score |
错误
| 状态 | 代码 |
|---|---|
| 400 | INVALID_METHOD |
| 400 | INVALID_LAYER |
| 400 | INVALID_RECALL_PROFILE |
| 400 | INVALID_RECALL_TYPE |
| 400 | PAGE_DEPTH_EXCEEDED |
| 400 | INVALID_RIGHTS_TIER |
| 400 | INVALID_AUTHORITY |
| 400 | INVALID_MODE |
| 400 | INVALID_PAGINATION |
| 401 · 403 · 429 · 503 | 密钥、术法授权、限流与配额等通用错误,见 约定 · 错误码 |