{"openapi":"3.1.0","info":{"title":"CBETA API","version":"5.11.3","description":"CBETA 電子佛典的 API。\n\n概念性的說明（檢索語法、限制搜尋範圍等）見各說明頁，例如\n[All in One](https://cbdata.dila.edu.tw/dev/static_pages/search_all_in_one)、\n[Extended 語法](https://cbdata.dila.edu.tw/dev/static_pages/search_extended)、\n[限制搜尋範圍](https://cbdata.dila.edu.tw/dev/static_pages/search_filter)。\n"},"servers":[{"url":"https://cbdata.dila.edu.tw/dev"}],"tags":[{"name":"search","description":"全文檢索與相關查詢"},{"name":"text","description":"取得佛典內文 (卷、行、KWIC)"},{"name":"catalog","description":"目錄、典籍資訊、目次、修訂紀錄"},{"name":"tools","description":"繁簡轉換、斷詞、引用格式等工具"},{"name":"asia-network","description":"提供 Asia Network 使用的 API"},{"name":"meta","description":"API 本身的狀態與文件"}],"paths":{"/search/all_in_one":{"get":{"operationId":"searchAllInOne","summary":"全文檢索，一併回傳 KWIC","description":"分頁以卷為單位，每一卷附上該卷的 KWIC。可選擇是否連同 facet 一起回傳。\n\n注意：\n- 參數錯誤（例如 `q` 超過長度上限）時 HTTP status 仍是 200，\n  錯誤訊息放在 `error` 欄位（既有 client 依賴這個行為）。\n- 缺少 `q` 或 `q` 為空字串時回傳純文字訊息，不是 JSON。\n","tags":["search"],"parameters":[{"$ref":"#/components/parameters/searchQ"},{"$ref":"#/components/parameters/searchNote"},{"name":"fields","in":"query","description":"指定 `results` 各筆要回傳哪些欄位，以逗號分隔，例如 `work,juan,term_hits`。\n未列在允許值裡的欄位名稱會被忽略。要連同 KWIC 一起回傳，須列入 `kwics`。\n","schema":{"type":"string"},"example":"work,juan,term_hits"},{"name":"facet","in":"query","description":"是否回傳 facet。0：不回傳；1：回傳藏經、部類、作譯者、朝代、佛典五種 facet。","schema":{"type":"string","enum":["0","1"],"default":"0"}},{"$ref":"#/components/parameters/searchStart"},{"$ref":"#/components/parameters/searchRows"},{"name":"around","in":"query","description":"KWIC 前後字數。","schema":{"type":"integer","minimum":0,"default":10}},{"name":"order","in":"query","description":"排序欄位：`canon`（依藏經重要性）、`work`（依佛典編號）、\n`time_from`（依成立年代起）、`time_to`（依成立年代迄）。\n欄位後加 `+` 為升冪、`-` 為降冪，例如 `time_from-`。\n預設依「藏經重要性 + 經號 + 卷號」排序。不支援的欄位會回傳錯誤。\n\n藏經重要性的順序：T X A K S F C D U P J L G M N ZS I ZW B GA GB Y LC TX YP CC\n","schema":{"type":"string"},"example":"time_from+"},{"name":"cache","in":"query","description":"是否使用 cache。1：使用；0：不使用。","schema":{"type":"string","enum":["0","1"],"default":"1"}},{"$ref":"#/components/parameters/canon"},{"$ref":"#/components/parameters/category"},{"$ref":"#/components/parameters/work"},{"$ref":"#/components/parameters/works"},{"$ref":"#/components/parameters/creator"},{"$ref":"#/components/parameters/dynasty"},{"$ref":"#/components/parameters/time"},{"$ref":"#/components/parameters/work_type"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"檢索結果；參數錯誤時同樣是 200：`q` 過長等見 `LegacyError`，\n不支援的 `order` 欄位、括號分組等見 `LegacyCodedError`。\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/AllInOneResult"},{"$ref":"#/components/schemas/LegacyError"},{"$ref":"#/components/schemas/LegacyCodedError"}]},"examples":{"default":{"summary":"q=法鼓&rows=2","value":{"query_string":"法鼓","time":0.27,"num_found":1106,"total_term_hits":1582,"cache_key":null,"results":[{"id":5832,"term_hits":1,"canon":"T","category":"阿含部類","file":"T01n0026","work":"T0026","juan":47,"title":"中阿含經","byline":"東晉 瞿曇僧伽提婆譯","creators":"僧伽提婆","creators_with_id":"僧伽提婆(A001589)","time_dynasty":"東晉","time_from":397,"time_to":398,"juan_list":"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60","kwics":{"num_found":1,"results":[{"vol":"T01","offset_in_text_with_punc":10345,"lb":"0724c01","kwic":"法界、甘露界、多鼓、<mark>法鼓</mark>、甘露鼓、法鏡、四品","linehead":"T01n0026_p0724c01"}]}},{"id":5944,"term_hits":1,"canon":"T","category":"阿含部類","file":"T02n0099","work":"T0099","juan":25,"title":"雜阿含經","byline":"劉宋 求那跋陀羅譯","creators":"求那跋陀羅","creators_with_id":"求那跋陀羅(A000527)","time_dynasty":"劉宋","time_from":435,"time_to":443,"juan_list":"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50","kwics":{"num_found":1,"results":[{"vol":"T02","offset_in_text_with_punc":1725,"lb":"0178b16","kwic":"法炬，然煩惱火，壞正<mark>法鼓</mark>，毀正法輪，消正法海","linehead":"T02n0099_p0178b16"}]}}]}},"facet":{"summary":"q=法鼓&rows=1&facet=1 (facet 各取前兩筆)","value":{"query_string":"法鼓","time":0.31,"num_found":1106,"total_term_hits":1582,"cache_key":null,"results":[{"id":5832,"term_hits":1,"canon":"T","category":"阿含部類","file":"T01n0026","work":"T0026","juan":47,"title":"中阿含經","byline":"東晉 瞿曇僧伽提婆譯","creators":"僧伽提婆","creators_with_id":"僧伽提婆(A001589)","time_dynasty":"東晉","time_from":397,"time_to":398,"juan_list":"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60","kwics":{"num_found":1,"results":[{"vol":"T01","offset_in_text_with_punc":10345,"lb":"0724c01","kwic":"法界、甘露界、多鼓、<mark>法鼓</mark>、甘露鼓、法鏡、四品","linehead":"T01n0026_p0724c01"}]}}],"facet":{"category":[{"category_id":17,"docs":283,"hits":352,"category_name":"禪宗部類"},{"category_id":23,"docs":201,"hits":321,"category_name":"新編部類"}],"creator":[{"creator_id":"A023393","docs":19,"hits":54,"creator_name":"釋印順"},{"creator_id":"A000527","docs":3,"hits":47,"creator_name":"求那跋陀羅"}],"dynasty":[{"dynasty":"東漢","docs":4,"hits":5},{"dynasty":"曹魏","docs":2,"hits":2}],"work":[{"work":"T0270","docs":2,"hits":46,"title":"大法鼓經"},{"work":"B0088","docs":32,"hits":40,"title":"古今圖書集成選輯"}],"canon":[{"canon":"T","docs":382,"hits":569,"canon_name":"大正藏"},{"canon":"X","docs":272,"hits":384,"canon_name":"新纂卍續藏"}]}}}}},"text/plain":{"schema":{"type":"string"},"example":"q 參數不能是空的"}}},"502":{"description":"全文檢索後端（Elasticsearch）暫時無法使用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search":{"get":{"operationId":"search","summary":"一般全文檢索","description":"以卷為單位回傳符合的佛典。未指定 `order` 時依關鍵詞出現次數遞減排序。\n查詢語法（AND、OR、NOT、NEAR、Exclude）與 `/search/extended` 相同。\n\n注意：\n- 參數錯誤（例如 `q` 超過長度上限）時 HTTP status 仍是 200，\n  錯誤訊息放在 `error` 欄位（既有 client 依賴這個行為）。\n- 缺少 `q` 或 `q` 為空字串時回傳純文字訊息，不是 JSON。\n","tags":["search"],"parameters":[{"$ref":"#/components/parameters/searchQ"},{"$ref":"#/components/parameters/searchNote"},{"name":"fields","in":"query","description":"指定 `results` 各筆要回傳哪些欄位，以逗號分隔，例如 `work,juan,term_hits`。\n未列在允許值裡的欄位名稱會被忽略。\n","schema":{"type":"string"},"example":"work,juan,term_hits"},{"$ref":"#/components/parameters/searchStart"},{"$ref":"#/components/parameters/searchRows"},{"name":"order","in":"query","description":"排序欄位，可指定多個（以逗號分隔），例如 `time_from,time_to,work`。\n欄位後加 `+` 為升冪、`-` 為降冪。可用欄位：`canon`、`category`、`juan`、\n`vol`、`work`、`time_from`、`time_to`、`term_hits`。\n指定 `time_from` 或 `time_to` 時，年代未知 (0) 的排在有年代的後面。\n排序值相同時一律再以藏經、佛典編號、卷號決定先後。不支援的欄位會回傳錯誤。\n\n`canon` 依藏經重要性排序，藏經重要性的順序：T X A K S F C D U P J L G M N ZS I ZW B GA GB Y LC TX YP CC\n","schema":{"type":"string"},"example":"time_from-"},{"$ref":"#/components/parameters/canon"},{"$ref":"#/components/parameters/category"},{"$ref":"#/components/parameters/work"},{"$ref":"#/components/parameters/works"},{"$ref":"#/components/parameters/creator"},{"$ref":"#/components/parameters/dynasty"},{"$ref":"#/components/parameters/time"},{"$ref":"#/components/parameters/work_type"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"檢索結果；參數錯誤時同樣是 200，見 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SearchResult"},{"$ref":"#/components/schemas/LegacyError"}]},"examples":{"default":{"summary":"q=法鼓&rows=2","value":{"query_string":"法鼓","time":0.03,"num_found":1106,"total_term_hits":1582,"cache_key":null,"results":[{"id":7246,"term_hits":31,"canon":"T","category":"法華部類","file":"T09n0270","work":"T0270","juan":1,"title":"大法鼓經","byline":"劉宋 求那跋陀羅譯","creators":"求那跋陀羅","creators_with_id":"求那跋陀羅(A000527)","time_dynasty":"劉宋","time_from":435,"time_to":443,"juan_list":"1,2"},{"id":7247,"term_hits":15,"canon":"T","category":"法華部類","file":"T09n0270","work":"T0270","juan":2,"title":"大法鼓經","byline":"劉宋 求那跋陀羅譯","creators":"求那跋陀羅","creators_with_id":"求那跋陀羅(A000527)","time_dynasty":"劉宋","time_from":435,"time_to":443,"juan_list":"1,2"}]}}}},"text/plain":{"schema":{"type":"string"},"example":"q 參數不能是空的"}}},"502":{"description":"全文檢索後端（Elasticsearch）暫時無法使用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search/extended":{"get":{"operationId":"searchExtended","summary":"全文檢索（Extended 語法）","description":"行為與 `/search` 相同，查詢語法統一解析；兩者只差在說明文件。\n語法說明見 [Extended 語法](https://cbdata.dila.edu.tw/dev/static_pages/search_extended)。\n","tags":["search"],"parameters":[{"$ref":"#/components/parameters/searchQ"},{"$ref":"#/components/parameters/searchNote"},{"name":"fields","in":"query","description":"指定 `results` 各筆要回傳哪些欄位，以逗號分隔，例如 `work,juan,term_hits`。\n未列在允許值裡的欄位名稱會被忽略。\n","schema":{"type":"string"},"example":"work,juan,term_hits"},{"$ref":"#/components/parameters/searchStart"},{"$ref":"#/components/parameters/searchRows"},{"name":"order","in":"query","description":"排序欄位，可指定多個（以逗號分隔），例如 `time_from,time_to,work`。\n欄位後加 `+` 為升冪、`-` 為降冪。可用欄位：`canon`、`category`、`juan`、\n`vol`、`work`、`time_from`、`time_to`、`term_hits`。\n指定 `time_from` 或 `time_to` 時，年代未知 (0) 的排在有年代的後面。\n排序值相同時一律再以藏經、佛典編號、卷號決定先後。不支援的欄位會回傳錯誤。\n\n`canon` 依藏經重要性排序，藏經重要性的順序：T X A K S F C D U P J L G M N ZS I ZW B GA GB Y LC TX YP CC\n","schema":{"type":"string"},"example":"time_from-"},{"$ref":"#/components/parameters/canon"},{"$ref":"#/components/parameters/category"},{"$ref":"#/components/parameters/work"},{"$ref":"#/components/parameters/works"},{"$ref":"#/components/parameters/creator"},{"$ref":"#/components/parameters/dynasty"},{"$ref":"#/components/parameters/time"},{"$ref":"#/components/parameters/work_type"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"檢索結果；參數錯誤時同樣是 200，見 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SearchResult"},{"$ref":"#/components/schemas/LegacyError"}]}},"text/plain":{"schema":{"type":"string"},"example":"q 參數不能是空的"}}},"502":{"description":"全文檢索後端（Elasticsearch）暫時無法使用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search/facet":{"get":{"operationId":"searchFacetAll","summary":"檢索結果一次回傳五種 facet","description":"與 `/search/facet/{facet_by}` 相同，但一次回傳藏經、部類、作譯者、朝代、佛典五種 facet。\n\n注意：\n- 不支援 NEAR 與 Exclude 語法，會回傳 `LegacyError`。\n- 缺少 `q` 或 `q` 為空字串時回傳純文字訊息，不是 JSON。\n","tags":["search"],"parameters":[{"$ref":"#/components/parameters/searchQ"},{"$ref":"#/components/parameters/searchNote"},{"$ref":"#/components/parameters/canon"},{"$ref":"#/components/parameters/category"},{"$ref":"#/components/parameters/work"},{"$ref":"#/components/parameters/works"},{"$ref":"#/components/parameters/creator"},{"$ref":"#/components/parameters/dynasty"},{"$ref":"#/components/parameters/time"},{"$ref":"#/components/parameters/work_type"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"五種 facet；參數錯誤時同樣是 200，見 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Facets"},{"$ref":"#/components/schemas/LegacyError"}]},"examples":{"default":{"summary":"q=法鼓 (各 facet 取前兩筆)","value":{"canon":[{"canon":"T","docs":382,"hits":569,"canon_name":"大正藏"},{"canon":"X","docs":272,"hits":384,"canon_name":"新纂卍續藏"}],"category":[{"category_id":17,"docs":283,"hits":352,"category_name":"禪宗部類"},{"category_id":23,"docs":201,"hits":321,"category_name":"新編部類"}],"creator":[{"creator_id":"A023393","docs":19,"hits":54,"creator_name":"釋印順"},{"creator_id":"A000527","docs":3,"hits":47,"creator_name":"求那跋陀羅"}],"dynasty":[{"dynasty":"東漢","docs":4,"hits":5},{"dynasty":"曹魏","docs":2,"hits":2}],"work":[{"work":"T0270","docs":2,"hits":46,"title":"大法鼓經"},{"work":"B0088","docs":32,"hits":40,"title":"古今圖書集成選輯"}]}}}},"text/plain":{"schema":{"type":"string"},"example":"q 參數不能是空的"}}}}}},"/search/facet/{facet_by}":{"get":{"operationId":"searchFacet","summary":"全文檢索結果的 facet","description":"回傳檢索結果依藏經、部類、作譯者、朝代或佛典分組的卷數與出現次數，\n回應是一個陣列。\n\n注意：\n- 不支援 NEAR 與 Exclude 語法，會回傳 `LegacyError`。\n- 不支援的 `facet_by` 也回傳 `LegacyError`（HTTP 200）。\n- 缺少 `q` 或 `q` 為空字串時回傳純文字訊息，不是 JSON。\n","tags":["search"],"parameters":[{"name":"facet_by","in":"path","required":true,"description":"分組依據。","schema":{"type":"string","enum":["canon","category","creator","dynasty","work"]}},{"$ref":"#/components/parameters/searchQ"},{"$ref":"#/components/parameters/searchNote"},{"$ref":"#/components/parameters/canon"},{"$ref":"#/components/parameters/category"},{"$ref":"#/components/parameters/work"},{"$ref":"#/components/parameters/works"},{"$ref":"#/components/parameters/creator"},{"$ref":"#/components/parameters/dynasty"},{"$ref":"#/components/parameters/time"},{"$ref":"#/components/parameters/work_type"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"facet 陣列，元素格式依 `facet_by` 而定；參數錯誤時同樣是 200，見 `LegacyError`。\n","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/CanonFacet"}},{"type":"array","items":{"$ref":"#/components/schemas/CategoryFacet"}},{"type":"array","items":{"$ref":"#/components/schemas/CreatorFacet"}},{"type":"array","items":{"$ref":"#/components/schemas/DynastyFacet"}},{"type":"array","items":{"$ref":"#/components/schemas/WorkFacet"}},{"$ref":"#/components/schemas/LegacyError"}]}},"text/plain":{"schema":{"type":"string"},"example":"q 參數不能是空的"}}},"502":{"description":"全文檢索後端（Elasticsearch）暫時無法使用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search/notes":{"get":{"operationId":"searchNotes","summary":"搜尋校勘條目、註解","description":"搜尋校註（腳注）與夾注。預設依藏經、冊號、行號排序。\n查詢語法見 [註解檢索](https://cbdata.dila.edu.tw/dev/static_pages/search_notes)。\n\n注意：\n- 參數錯誤時 HTTP status 仍是 200，錯誤訊息放在 `error` 欄位。\n- `facet=1` 不支援 NEAR 與 Exclude 語法，會回傳 `LegacyError`。\n- 不支援括號分組 (…)、鄰近運算子 `~n` 與 `&` 運算子，會回傳 `LegacyError` 說明原因。\n- 缺少 `q` 或 `q` 為空字串時回傳純文字訊息，不是 JSON。\n","tags":["search"],"parameters":[{"$ref":"#/components/parameters/searchQ"},{"name":"around","in":"query","description":"夾注的 `highlight` 欄位，關鍵字前後保留的字數。","schema":{"type":"integer","minimum":0,"default":10}},{"$ref":"#/components/parameters/searchStart"},{"$ref":"#/components/parameters/searchRows"},{"name":"facet","in":"query","description":"是否回傳 facet。0：不回傳；1：回傳藏經、部類、作譯者、朝代、佛典五種 facet。","schema":{"type":"string","enum":["0","1"],"default":"0"}},{"$ref":"#/components/parameters/canon"},{"$ref":"#/components/parameters/category"},{"$ref":"#/components/parameters/work"},{"$ref":"#/components/parameters/works"},{"$ref":"#/components/parameters/creator"},{"$ref":"#/components/parameters/dynasty"},{"$ref":"#/components/parameters/time"},{"$ref":"#/components/parameters/work_type"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"檢索結果；參數錯誤時同樣是 200，見 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NotesSearchResult"},{"$ref":"#/components/schemas/LegacyError"}]}},"text/plain":{"schema":{"type":"string"},"example":"q 參數不能是空的"}}},"502":{"description":"全文檢索後端（Elasticsearch）暫時無法使用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search/title":{"get":{"operationId":"searchTitle","summary":"搜尋佛典標題（經名）","description":"模糊搜尋：至少符合 3 個字（查詢字串不足 3 個字時須全部符合），結果依相關度排序。\n\n注意：\n- 參數錯誤時 HTTP status 仍是 200，錯誤訊息放在 `error` 欄位。\n- 缺少 `q` 或 `q` 為空字串時回傳純文字訊息，不是 JSON。\n","tags":["search"],"parameters":[{"name":"q","in":"query","required":true,"description":"要搜尋的經名。長度上限 40 字。","schema":{"type":"string","minLength":1,"maxLength":40},"example":"觀無量壽經"},{"$ref":"#/components/parameters/searchStart"},{"$ref":"#/components/parameters/searchRows"},{"$ref":"#/components/parameters/canon"},{"$ref":"#/components/parameters/category"},{"$ref":"#/components/parameters/work"},{"$ref":"#/components/parameters/works"},{"$ref":"#/components/parameters/creator"},{"$ref":"#/components/parameters/dynasty"},{"$ref":"#/components/parameters/time"},{"$ref":"#/components/parameters/work_type"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"檢索結果；參數錯誤時同樣是 200，見 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TitleSearchResult"},{"$ref":"#/components/schemas/LegacyError"}]}},"text/plain":{"schema":{"type":"string"},"example":"q 參數不能是空的"}}},"502":{"description":"全文檢索後端（Elasticsearch）暫時無法使用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search/sc":{"get":{"operationId":"searchSimplifiedChinese","summary":"以簡體字查詢，回傳轉為繁體後的筆數","description":"使用 OpenCC 將簡體轉為繁體，再做全文檢索，回傳關鍵字出現次數。\n轉換前後相同（例如 `q=上烏`）時不做檢索，`hits` 為 0，且不回傳 `time`。\n\n注意：\n- 參數錯誤（例如 `q` 超過長度上限）時 HTTP status 仍是 200，\n  錯誤訊息放在 `error` 欄位（既有 client 依賴這個行為）。\n- 缺少 `q` 或 `q` 為空字串時回傳純文字訊息，不是 JSON。\n","tags":["search"],"parameters":[{"name":"q","in":"query","required":true,"description":"簡體字的查詢字串。長度上限 40 字。","schema":{"type":"string","minLength":1,"maxLength":40},"example":"四圣谛"},{"name":"note","in":"query","description":"是否含夾注。0：不含夾注；1：含夾注。","schema":{"type":"string","enum":["0","1"],"default":"1"}},{"$ref":"#/components/parameters/canon"},{"$ref":"#/components/parameters/category"},{"$ref":"#/components/parameters/work"},{"$ref":"#/components/parameters/works"},{"$ref":"#/components/parameters/creator"},{"$ref":"#/components/parameters/dynasty"},{"$ref":"#/components/parameters/time"},{"$ref":"#/components/parameters/work_type"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"轉換結果與筆數；參數錯誤時同樣是 200，見 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ScResult"},{"$ref":"#/components/schemas/LegacyError"}]},"examples":{"same":{"summary":"q=上烏 (繁簡相同，不做檢索)","value":{"q":"上烏","hits":0}},"converted":{"summary":"q=四圣谛","value":{"time":0.04,"q":"四聖諦","hits":3197}}}},"text/plain":{"schema":{"type":"string"},"example":"q 參數不能是空的"}}},"502":{"description":"全文檢索後端（Elasticsearch）暫時無法使用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search/similar":{"get":{"operationId":"searchSimilar","summary":"相似搜尋","description":"找出與 `q` 相似（但不完全相同）的段落。分兩階段：\n先以 Elasticsearch 模糊搜尋（至少一半的字命中即為候選），依相關度排序後取前 k 筆，\n再以 Smith-Waterman 演算法逐筆比對，分數達 `score_min` 才回傳，依分數排序。\n完全包含 `q` 的段落不回傳。不分頁，回傳全部結果。\n\n以預設的 `gain`（2）與 `score_min`（16）而言，至少要有 8 個字對得上才會有結果，\n因此 `q` 太短時一律找不到。\n\n注意：\n- 參數錯誤（例如 `k` 小於 1）時 HTTP status 仍是 200，\n  錯誤訊息放在 `error` 欄位（既有 client 依賴這個行為）。\n- 缺少 `q` 或 `q` 為空字串時回傳純文字訊息，不是 JSON。\n","tags":["search"],"parameters":[{"name":"q","in":"query","required":true,"description":"要搜尋的字串，標點符號會被去除。長度上限 40 字。","schema":{"type":"string","minLength":1,"maxLength":40},"example":"是日已過，命亦隨減，如少水魚，斯有何樂"},{"name":"k","in":"query","description":"第一階段取回的候選筆數。","schema":{"type":"integer","minimum":1,"default":1000}},{"name":"gain","in":"query","description":"Smith-Waterman 演算法 match 時的加分。","schema":{"type":"integer","minimum":0,"default":2}},{"name":"penalty","in":"query","description":"Smith-Waterman 演算法 miss、insertion、deletion 的減分。","schema":{"type":"integer","maximum":0,"default":-1}},{"name":"score_min","in":"query","description":"Smith-Waterman 分數的最小值，低於此分數的不回傳。","schema":{"type":"integer","default":16}},{"name":"facet","in":"query","description":"是否回傳 facet。0：不回傳；1：回傳藏經、部類、作譯者、朝代、佛典五種 facet。","schema":{"type":"string","enum":["0","1"],"default":"0"}},{"name":"cache","in":"query","description":"是否使用 cache。1：使用；0：不使用。","schema":{"type":"string","enum":["0","1"],"default":"1"}},{"$ref":"#/components/parameters/canon"},{"$ref":"#/components/parameters/category"},{"$ref":"#/components/parameters/work"},{"$ref":"#/components/parameters/works"},{"$ref":"#/components/parameters/creator"},{"$ref":"#/components/parameters/dynasty"},{"$ref":"#/components/parameters/time"},{"$ref":"#/components/parameters/work_type"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"相似段落；參數錯誤時同樣是 200，見 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SimilarResult"},{"$ref":"#/components/schemas/LegacyError"}]},"examples":{"default":{"summary":"q=諸惡莫作，眾善奉行，自淨其意，是諸佛教","value":{"query_string":"諸惡莫作眾善奉行自淨其意是諸佛教","time":1.2,"num_found":268,"cache_key":"2026R3/5.9.5/search/similar/{\"q\" => \"諸惡莫作，眾善奉行，自淨其意，是諸佛教\", \"controller\" => \"search\", \"action\" => \"similar\"}-","results":[{"id":69715,"canon":"B","category":"新編部類","work":"B0006","title":"泰國大藏經小部經","juan":1,"creators_with_id":"黃謹良(A035002)","dynasty":"unknown","linehead":"B06n0006_p0290b14","content":"陀正念禪定是大賢者常樂出家寂靜自居是大智者為人天之所敬慕得人身難人間活命難聞妙法難值佛出世難諸惡莫作眾善奉行自淨其意是諸佛法忍受即忍辱是最上苦行諸有智者以涅槃為最勝法侵害眾生者不名為出家沙門不誹罵不殺","score":30,"highlight":"陀正念禪定<em>是</em>大賢者常樂出家寂靜<em>自</em>居<em>是</em>大智者為人天之所敬慕得人身難人間活命難聞妙法難值<em>佛</em>出世難<mark>諸惡莫作眾善奉行自淨其意是諸佛</mark>法忍受即忍辱<em>是</em>最上苦<em>行</em><em>諸</em>有智者以涅槃為最勝法侵害<em>眾</em>生者不名為出家沙門不誹罵不殺"}]}}}},"text/plain":{"schema":{"type":"string"},"example":"q 參數不能是空的"}}},"502":{"description":"全文檢索後端（Elasticsearch）暫時無法使用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search/synonym":{"get":{"operationId":"searchSynonym","summary":"近義詞查詢","description":"根據近義詞表，回傳 `q` 的近義詞。查無此詞時 `results` 為空陣列。\n\n注意：\n- 參數錯誤（例如 `q` 超過長度上限）時 HTTP status 仍是 200，\n  錯誤訊息放在 `error` 欄位（既有 client 依賴這個行為）。\n- 缺少 `q` 或 `q` 為空字串時回傳純文字訊息，不是 JSON。\n","tags":["search"],"parameters":[{"name":"q","in":"query","required":true,"description":"要查詢的詞。長度上限 40 字。","schema":{"type":"string","minLength":1,"maxLength":40},"example":"文殊師利"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"近義詞清單；參數錯誤時同樣是 200，見 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/SynonymResult"},{"$ref":"#/components/schemas/LegacyError"}]}},"text/plain":{"schema":{"type":"string"},"example":"q 參數不能是空的"}}}}}},"/search/variants":{"get":{"operationId":"searchVariants","summary":"異體字查詢","description":"根據異體字表列出 `q` 可能的異體字變化，並回傳各變化在 CBETA 中的出現次數。\n只列出確實出現過的變化，不含 `q` 本身。\n異體字表為開放資料：<https://github.com/DILA-edu/cbeta-metadata/tree/master/variants>\n\n注意：\n- 參數錯誤（例如 `q` 超過長度上限）時 HTTP status 仍是 200，\n  錯誤訊息放在 `error` 欄位（既有 client 依賴這個行為）。\n- 缺少 `q` 或 `q` 為空字串時回傳純文字訊息，不是 JSON。\n","tags":["search"],"parameters":[{"name":"q","in":"query","required":true,"description":"要查詢的字詞，標點符號會被去除。長度上限 40 字。","schema":{"type":"string","minLength":1,"maxLength":40},"example":"著衣持鉢"},{"name":"scope","in":"query","description":"設為 `title` 時，只列出存在於佛典題名中的異體字變化，\n`hits` 為題名中的出現次數。未指定時以全文計算。\n","schema":{"type":"string","enum":["title"]}},{"name":"cache","in":"query","description":"是否使用 cache。1：使用；0：不使用。","schema":{"type":"string","enum":["0","1"],"default":"1"}},{"$ref":"#/components/parameters/canon"},{"$ref":"#/components/parameters/category"},{"$ref":"#/components/parameters/work"},{"$ref":"#/components/parameters/works"},{"$ref":"#/components/parameters/creator"},{"$ref":"#/components/parameters/dynasty"},{"$ref":"#/components/parameters/time"},{"$ref":"#/components/parameters/work_type"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"異體字變化與出現次數；參數錯誤時同樣是 200，見 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/VariantsResult"},{"$ref":"#/components/schemas/LegacyError"}]},"examples":{"default":{"summary":"q=著衣持鉢","value":{"time":0.09,"num_found":3,"cache_key":null,"possibility":4,"results":[{"q":"著衣持缽","hits":51},{"q":"著衣持盋","hits":3},{"q":"着衣持鉢","hits":17}]}}}},"text/plain":{"schema":{"type":"string"},"example":"q 參數不能是空的"}}},"502":{"description":"全文檢索後端（Elasticsearch）暫時無法使用。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/search/kwic":{"get":{"operationId":"searchKwic","summary":"單卷 KWIC (Keyword in Context)","description":"在指定的一卷裡搜尋關鍵字，回傳前後文。夾注不列入搜尋範圍（可跨夾注檢索），\n但前後文會含夾注，15 字以上的夾注會節略。\n\n回傳該卷全部的符合結果，依出現位置排序。\n\n參數錯誤時 HTTP status 仍是 200，錯誤訊息放在 `error` 欄位；\n只有 `q` 為空字串時回 400。\n","tags":["search"],"parameters":[{"name":"work","in":"query","required":true,"description":"佛典編號。","schema":{"type":"string"},"example":"X0600"},{"name":"juan","in":"query","required":true,"description":"卷號。","schema":{"type":"integer","minimum":1},"example":11},{"name":"q","in":"query","required":true,"description":"要搜尋的關鍵字，多個關鍵字以半形逗點區隔，例如 `法鼓,聖嚴`。長度上限 40 字。\n也可使用 NEAR 語法，例如 `\"老子\" NEAR/7 \"道\"`。\n關鍵字含雙引號、單引號、半形減號時需以反斜線 escape。\n","schema":{"type":"string","minLength":1,"maxLength":40},"examples":{"phrase":{"value":"法鼓"},"multiple":{"value":"法鼓,聖嚴"},"near":{"value":"\"老子\" NEAR/7 \"道\""}}},{"name":"note","in":"query","description":"是否含夾注。0：不含夾注；1：含夾注。","schema":{"type":"string","enum":["0","1"],"default":"1"}},{"name":"mark","in":"query","description":"前後文中的關鍵字是否以 `<mark>` 標記。0：不標記；1：標記。","schema":{"type":"string","enum":["0","1"],"default":"0"}},{"name":"around","in":"query","description":"前後文的字數。","schema":{"type":"integer","minimum":0,"default":5}},{"name":"kwic_w_punc","in":"query","description":"是否回傳含標點的前後文 (`kwic` 欄位)。0：不回傳；1：回傳。","schema":{"type":"string","enum":["0","1"],"default":"1"}},{"name":"kwic_wo_punc","in":"query","description":"是否回傳不含標點的前後文 (`kwic_no_punc` 欄位)。0：不回傳；1：回傳。","schema":{"type":"string","enum":["0","1"],"default":"0"}},{"name":"place","in":"query","description":"是否附上這部佛典的地理資訊 (`place_*` 欄位)。0：不附；1：附上。","schema":{"type":"string","enum":["0","1"],"default":"0"}},{"name":"negative_lookbehind","in":"query","description":"排除前搭配。例如搜尋「直心」並指定 `正`，會排除「正直心」。","schema":{"type":"string"},"example":"正"},{"name":"negative_lookahead","in":"query","description":"排除後搭配。例如搜尋「舍利」並指定 `弗`，會排除「舍利弗」。","schema":{"type":"string"},"example":"弗"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"搜尋結果；參數錯誤時同樣是 200，見 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/KwicJuanResult"},{"$ref":"#/components/schemas/LegacyError"}]}}}},"400":{"description":"`q` 為空字串。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/lines":{"get":{"operationId":"getLines","summary":"取得行文字","description":"以行首資訊取得一行或一段範圍的文字。指定 `linehead`，或同時指定\n`linehead_start` 與 `linehead_end`；兩者都沒有時回傳空結果。\n\n若要取得全部佛典全文，建議改用下載的全文檔案。\n","tags":["text"],"parameters":[{"name":"linehead","in":"query","description":"單獨指定某一行的行首資訊。","schema":{"type":"string"},"example":"T01n0001_p0001a04"},{"name":"before","in":"query","description":"指定 `linehead` 時，一併取得前面幾行。","schema":{"type":"integer","minimum":0}},{"name":"after","in":"query","description":"指定 `linehead` 時，一併取得後面幾行。","schema":{"type":"integer","minimum":0}},{"name":"linehead_start","in":"query","description":"範圍的起始行首資訊，須與 `linehead_end` 一起使用。","schema":{"type":"string"},"example":"T01n0001_p0001a04"},{"name":"linehead_end","in":"query","description":"範圍的結束行首資訊，須與 `linehead_start` 一起使用。","schema":{"type":"string"},"example":"T01n0001_p0001a06"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"各行文字，依行首資訊排序。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinesResult"},"examples":{"linehead":{"summary":"linehead=T01n0001_p0001a04","value":{"num_found":1,"time":0.02,"results":[{"linehead":"T01n0001_p0001a04","html":"<a class=\"noteAnchor\" href=\"#n0001002\"></a>長安釋僧肇<a class=\"noteAnchor\" href=\"#n0001003\"></a>述<br />","notes":{"0001002":"長安【大】，〔－〕【宋】","0001003":"述【大】，〔－〕【宋】"}}]}}}}}}}}},"/juans":{"get":{"operationId":"getJuan","summary":"取得某卷 HTML","description":"回傳一卷的 HTML，內有各種標記供前端 UI 使用，格式見\n[HTML for UI 格式說明](https://cbdata.dila.edu.tw/dev/static_pages/html_for_ui)。\n查無此卷時回傳 `num_found: 0` 與空的 `results`。\n","tags":["text"],"parameters":[{"name":"work","in":"query","required":true,"description":"佛典編號。","schema":{"type":"string"},"example":"T0001"},{"name":"juan","in":"query","required":true,"description":"卷號。","schema":{"type":"integer","minimum":1},"example":1},{"name":"toc","in":"query","description":"是否一併回傳這部佛典的目次。0：不回傳；1：回傳。","schema":{"type":"string","enum":["0","1"],"default":"0"}},{"name":"work_info","in":"query","description":"是否一併回傳佛典資訊。0：不回傳；1：回傳。","schema":{"type":"string","enum":["0","1"],"default":"0"}},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"該卷 HTML。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JuansResult"},"examples":{"work_info":{"summary":"work=T0001&juan=1&work_info=1（results 的 HTML 已截短）","value":{"num_found":1,"uuid":"7f5913a2-bc18-48cf-84e5-4797573795b6","content":"72a12e41-9cd2-4cd4-a4ea-84f5a70fea57","results":["<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>長阿含經</title>\n</head>\n<body>\n<div id='body' data-punc=\"CBETA\"><span cl..."],"work_info":{"work":"T0001","uuid":"f84c8d22-ce0c-470c-8e94-20059f4d89c2","canon":"T","category":"阿含部類","orig_category":"阿含部","vol":"T01","title":"長阿含經","juan":22,"juan_list":"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22","cjk_chars":198436,"en_words":2,"file":"T01n0001","juan_start":1,"byline":"後秦 佛陀耶舍共竺佛念譯","creators":"佛陀耶舍,竺佛念","creators_with_id":"佛陀耶舍(A000439);竺佛念(A000435)","time_dynasty":"後秦","time_from":412,"time_to":413,"places":[{"name":"長安","id":"PL000000042393","latitude":34.3288,"longitude":108.9064}]}}},"toc":{"summary":"work=T0001&juan=1&toc=1（results 的 HTML 已截短，目次只列前幾筆）","value":{"num_found":1,"uuid":"7f5913a2-bc18-48cf-84e5-4797573795b6","content":"72a12e41-9cd2-4cd4-a4ea-84f5a70fea57","results":["<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n<title>長阿含經</title>\n</head>\n<body>\n<div id='body' data-punc=\"CBETA\"><span cl..."],"toc":{"mulu":[{"title":"序","file":"T01n0001","juan":1,"lb":"0001a02","type":"序"},{"title":"1 分","file":"T01n0001","juan":1,"lb":"0001b11","type":"分","n":1,"isFolder":true,"children":[{"title":"1 大本經","file":"T01n0001","juan":1,"lb":"0001b11","type":"經","n":1}]}],"juan":[{"file":"T01n0001","juan":1,"lb":"0001b08","title":"第一"},{"file":"T01n0001","juan":2,"lb":"0011a04","title":"第二"}]}}}}}}}}}},"/juans/goto":{"get":{"operationId":"gotoJuan","summary":"依經卷、冊頁或引用格式定位","description":"把「經號 + 卷 / 頁 / 欄 / 行」、「冊號 + 頁 / 欄 / 行」或行首資訊、\nCBETA 引用格式，換算成對應的卷與行首資訊。三種方式擇一：\n\n- 經卷結構：`canon` + `work`，可再加 `juan` 或 `page`、`col`、`line`\n- 書本結構：`canon` + `vol`，可再加 `page`、`col`、`line`\n- `linehead`：行首資訊、CBETA 引用格式，或常用的簡稱\n\n錯誤時 HTTP status 仍是 200，見 `LegacyCodedError`。\n","tags":["text"],"parameters":[{"name":"canon","in":"query","description":"藏經 ID，與 `work` 或 `vol` 一起使用。","schema":{"type":"string"},"example":"T"},{"name":"work","in":"query","description":"經號，不含藏經 ID，例如大正藏第一經為 `1`。","schema":{"type":"string"},"example":"1"},{"name":"vol","in":"query","description":"冊號，不含藏經 ID，例如大正藏第一冊為 `1`。","schema":{"type":"string"},"example":"1"},{"name":"juan","in":"query","description":"卷號，與 `work` 一起使用。","schema":{"type":"integer","minimum":1}},{"name":"page","in":"query","description":"頁碼。","schema":{"type":"string"},"example":"11"},{"name":"col","in":"query","description":"欄，例如 `a`、`b`、`c`。","schema":{"type":"string"},"example":"b"},{"name":"line","in":"query","description":"行號。","schema":{"type":"string"},"example":"10"},{"name":"linehead","in":"query","description":"行首資訊（例 `T01n0001_p0066c25`）或 CBETA 引用格式\n（例 `CBETA, T01, no. 1, p. 67, a13`、`CBETA 2019.Q3, T30, no. 1579, p. 279a7-23`）。\n引用格式需 URL encode。\n也接受論文慣用的引用格式（例如 `《大正藏》冊47，第1970 號，卷6`、`T46, no. 1911, p. 18c`），\n以及快速代碼（例如 `DA1`、`SN1.1`；完整對照表見\n[cbeta-metadata 的 goto-list.txt](https://github.com/DILA-edu/cbeta-metadata/blob/master/goto/goto-list.txt)）。\n","schema":{"type":"string"},"examples":{"linehead":{"value":"T01n0001_p0066c25"},"citation":{"value":"CBETA, T01, no. 1, p. 67, a13"}}},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"定位結果；錯誤時同樣是 200，見 `LegacyCodedError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/JuansGotoResult"},{"$ref":"#/components/schemas/LegacyCodedError"}]}}}}}}},"/works":{"get":{"operationId":"getWorks","summary":"取得佛典資訊，或依範圍、作譯者、時間搜尋佛典","description":"依參數決定查詢方式，同時給多種參數時依下列順序只取第一個：\n`work` → `creator` → `creator_id` → `creator_name` → `vol_start` →\n`work_start` → `time_start` → `dynasty` → `uuid`。\n都沒有給時回傳空結果。\n\n參數錯誤時 HTTP status 仍是 200，回應為 `Error` 格式。\n\n指定 `uuid` 時回傳格式不同（見 `AsiaResource`），且不支援 `callback`。\n","tags":["catalog"],"parameters":[{"name":"work","in":"query","description":"取得某部佛典的資訊，例如 `T1501`。","schema":{"type":"string"},"example":"T1501"},{"name":"creator","in":"query","description":"以作譯者姓名搜尋（部分比對），不論是否已確認作譯者 ID。","schema":{"type":"string"},"example":"竺法護"},{"name":"creator_id","in":"query","description":"以作譯者 ID 搜尋。","schema":{"type":"string"},"example":"A000439"},{"name":"creator_name","in":"query","description":"以作譯者姓名搜尋（部分比對），只搜尋尚未確認作譯者 ID 的佛典。","schema":{"type":"string"},"example":"竺"},{"name":"canon","in":"query","description":"藏經 ID。搭配 `vol_start` 或 `work_start` 使用。","schema":{"type":"string"},"example":"T"},{"name":"vol_start","in":"query","description":"起始冊數（數字），須同時指定 `canon`。","schema":{"type":"integer"},"example":1},{"name":"vol_end","in":"query","description":"結束冊數（數字），預設同 `vol_start`。","schema":{"type":"integer"},"example":2},{"name":"work_start","in":"query","description":"起始經號，不含藏經 ID（例如 `1`、`150A`），須同時指定 `canon`。","schema":{"type":"string"},"example":"1"},{"name":"work_end","in":"query","description":"結束經號，預設同 `work_start`。","schema":{"type":"string"},"example":"2"},{"name":"time_start","in":"query","description":"成立年代範圍起（西元年），須同時指定 `time_end`。","schema":{"type":"integer"},"example":600},{"name":"time_end","in":"query","description":"成立年代範圍迄（西元年）。","schema":{"type":"integer"},"example":700},{"name":"dynasty","in":"query","description":"以朝代名稱搜尋，允許以逗號分隔多值。","schema":{"type":"string"},"example":"符秦,前秦"},{"name":"uuid","in":"query","description":"藏經的 UUID，列出該藏經的所有佛典。","schema":{"type":"string","format":"uuid"}},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"查詢結果；參數錯誤時同樣是 200，見 `Error`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WorkList"},{"type":"array","description":"指定 `uuid` 時的回傳格式。","items":{"$ref":"#/components/schemas/AsiaResource"}},{"$ref":"#/components/schemas/Error"}]},"examples":{"work":{"summary":"work=T1501","value":{"num_found":1,"results":[{"work":"T1501","uuid":"310699e8-2abd-4430-8403-d33b2777d5ca","canon":"T","category":"律部類","orig_category":"律部","vol":"T24","title":"菩薩戒本","juan":1,"juan_list":"1","cjk_chars":7748,"en_words":0,"file":"T24n1501","juan_start":1,"byline":"彌勒菩薩說 唐 玄奘譯","creators":"彌勒菩薩,玄奘","creators_with_id":"彌勒菩薩(A001428);玄奘(A000294)","time_dynasty":"唐","time_from":649,"time_to":649,"places":[{"name":"大慈恩寺","id":"PL000000042410","latitude":34.219161,"longitude":108.959356},{"name":"翠微寺","id":"PL000000042513","latitude":33.839563,"longitude":108.928138}]}]}}}}}},"404":{"description":"指定 `uuid` 時，該 uuid 不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/works/toc":{"get":{"operationId":"getWorkToc","summary":"取得某部佛典的目次","description":"回傳該佛典的目次（`mulu`）與卷目次（`juan`）。","tags":["catalog"],"parameters":[{"name":"work","in":"query","required":true,"description":"佛典編號。","schema":{"type":"string"},"example":"T0001"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"目次；查無此佛典時 `results` 為空陣列。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkTocList"}}}}}}},"/toc":{"get":{"operationId":"searchToc","summary":"經目搜尋","description":"在部類目錄、佛典標題（經名）、佛典內目次三部份中搜尋，\n以 `type` 區分結果來源。`/search/toc` 與本 API 相同。\n部類目錄的結果依出現次序排列；經名與目次的結果依藏經重要性、再依佛典編號排列。\n藏經重要性的順序：T X A K S F C D U P J L G M N ZS I ZW B GA GB Y LC TX YP CC\n\n`q` 的格式若是佛典編號（例如 `T0001`）或「冊號 + 經號」（例如 `T01n0001`），\n則改為依編號直接取得佛典。\n\n參數錯誤時 HTTP status 仍是 200，錯誤訊息放在 `error` 欄位。\n","tags":["catalog"],"parameters":[{"$ref":"#/components/parameters/toc_q"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"搜尋結果；參數錯誤時同樣是 200，見 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TocSearchList"},{"$ref":"#/components/schemas/LegacyError"}]}}}}}}},"/search/toc":{"get":{"operationId":"searchTocAlias","summary":"經目搜尋（同 /toc）","description":"與 `/toc` 相同。","tags":["catalog"],"parameters":[{"$ref":"#/components/parameters/toc_q"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"搜尋結果；參數錯誤時同樣是 200，見 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/TocSearchList"},{"$ref":"#/components/schemas/LegacyError"}]},"examples":{"default":{"summary":"q=阿含 (三種 type 各取一筆)","value":{"num_found":155,"time":0.42,"results":[{"type":"catalog","n":"orig-T.001","label":"T01 阿含部上 T0001-0098"},{"type":"work","work":"T0001","uuid":"f84c8d22-ce0c-470c-8e94-20059f4d89c2","canon":"T","category":"阿含部類","orig_category":"阿含部","vol":"T01","title":"長阿含經","juan":22,"juan_list":"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22","cjk_chars":198436,"en_words":2,"file":"T01n0001","juan_start":1,"byline":"後秦 佛陀耶舍共竺佛念譯","creators":"佛陀耶舍,竺佛念","creators_with_id":"佛陀耶舍(A000439);竺佛念(A000435)","time_dynasty":"後秦","time_from":412,"time_to":413,"places":[{"name":"長安","id":"PL000000042393","latitude":34.3288,"longitude":108.9064}]},{"type":"toc","label":"後出中阿含經記","label_path":"後出中阿含經記","work":"T0026","lb":"0809b01","uuid":"2a8c78aa-65ec-4dba-b95f-76b527e140fd","canon":"T","category":"阿含部類","orig_category":"阿含部","vol":"T01","title":"中阿含經","juan":60,"juan_list":"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60","cjk_chars":527801,"en_words":0,"file":"T01n0026","juan_start":60,"byline":"東晉 瞿曇僧伽提婆譯","creators":"僧伽提婆","creators_with_id":"僧伽提婆(A001589)","time_dynasty":"東晉","time_from":397,"time_to":398,"linehead":"T01n0026_p0809b01"}]}}}}}}}}},"/catalog_entry":{"get":{"operationId":"getCatalogEntry","summary":"取得目錄節點的下層節點","description":"CBETA 的各種目錄（部類目錄、原書目錄等）以樹狀節點表示，\n以節點編號 `q` 取得其下一層節點。都不給參數時回傳根目錄。\n","tags":["catalog"],"parameters":[{"name":"q","in":"query","description":"目錄節點編號。`root`：根目錄；`CBETA`：部類目錄；`orig`：原書目錄；\n`orig-<藏經 ID>`：某部藏經的原書目錄（例如 `orig-T`）；\n其他節點編號取自回傳結果的 `n`。\n","schema":{"type":"string"},"examples":{"root":{"value":"root"},"category":{"value":"CBETA"},"orig":{"value":"orig-T"},"node":{"value":"CBETA.001"}}},{"name":"vol","in":"query","description":"冊號，取得該冊的目錄節點，例如 `T01`。優先於 `q`。","schema":{"type":"string"},"example":"T01"},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"下層節點；查無節點時 `results` 為空陣列。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogEntryList"},"examples":{"category":{"summary":"q=CBETA：部類目錄","value":{"num_found":23,"label":"部類目錄","results":[{"n":"CBETA.001","label":"01 阿含部類 T01-02,25,33 etc.","node_type":null},{"n":"CBETA.002","label":"02 本緣部類 T03-04, X20-21 etc.","node_type":null}]}},"alt":{"summary":"q=orig-J.001：CBETA 未收錄全文的佛典 (node_type 為 alt)","value":{"num_found":42,"label":"J01","results":[{"n":"orig-J.001.001","label":"JA001 (=T0293) 大方廣佛華嚴經","node_type":"alt"},{"n":"orig-J.001.002","label":"JA002 (=T0663) 金光明經","node_type":"alt"}]}},"juan_range":{"summary":"q=CBETA.003.001：指向佛典的部份卷數","value":{"num_found":1,"label":"01 上品般若(大般若經第1會) T05-06","results":[{"n":"CBETA.003.001.001","work":"T0220","label":"T0220 大般若波羅蜜多經 (卷1-400) 〈第1會〉","category":"般若部類","creators":"玄奘","juan_start":1,"juan_end":400,"file":"T05n0220","node_type":"work"}]}}}}}}}}},"/changes":{"get":{"operationId":"getChanges","summary":"內容修訂紀錄","description":"收錄自 2021Q1 起的內容修訂紀錄，標點修訂不記錄。`lb` 與 `work` 至少須指定一個。\n\n預設回傳 JSON；以 `format=html` 或路徑 `/changes.html` 改回傳 HTML\n（依版本分段，每行為「行首資訊║修訂內容」），HTML 不支援 `callback`。\n\n參數錯誤時 HTTP status 仍是 200，錯誤訊息放在 `error` 欄位。\n","tags":["catalog"],"parameters":[{"name":"lb","in":"query","description":"CBETA 行首資訊。","schema":{"type":"string"},"example":"A091n1057_p0321a10"},{"name":"work","in":"query","description":"佛典編號。","schema":{"type":"string"},"example":"T0026"},{"name":"juan","in":"query","description":"卷號，須同時指定 `work`。","schema":{"type":"integer"},"example":4},{"name":"format","in":"query","description":"回傳格式。","schema":{"type":"string","enum":["json","html"],"default":"json"}},{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"修訂紀錄；參數錯誤時同樣是 200，見 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ChangeList"},{"$ref":"#/components/schemas/LegacyError"}]},"examples":{"default":{"summary":"lb=A091n1057_p0321a10","value":{"num_found":3,"results":[{"work":"A1057","juan":1,"lb":"A091n1057_p0321a10","html":"見真理，故常生疑惑也。翳字又作翳。<span class=\"del\">蒙</span><span class=\"ins\">薆</span><span class=\"del\">言</span><span class=\"ins\">音</span>愛也。）漂淪（淪，力勻反。《玉篇》曰：「淪，","ver":"2026R1","del_chars":2,"ins_chars":2}]}}}},"text/html":{"schema":{"type":"string"},"example":"<h2>2025R2</h2>\nT19n0951_p0253b17║<span class=\"del\">密</span><span class=\"ins\">蜜</span>、酪一呪一燒<br>\n"}}}}}},"/export/all_creators2":{"get":{"operationId":"exportAllCreators","summary":"匯出所有作譯者及其別名","tags":["catalog"],"parameters":[{"$ref":"#/components/parameters/callback"}],"responses":{"200":{"description":"所有作譯者，以作譯者 ID 為 key。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatorExport"}}}}}}},"/chinese_tools/sc2tc":{"get":{"operationId":"chineseToolsSc2tc","summary":"簡體轉繁體","description":"以 OpenCC（s2tw）將簡體中文轉為繁體中文，回傳純文字。","tags":["tools"],"parameters":[{"name":"q","in":"query","required":true,"description":"要轉換的簡體中文。未指定時回傳空字串。","schema":{"type":"string"},"example":"简体转繁体"}],"responses":{"200":{"description":"轉換後的繁體中文。","content":{"text/plain":{"schema":{"type":"string"},"example":"簡體轉繁體"}}}}}},"/word_seg":{"get":{"operationId":"wordSeg","summary":"自動分詞（純文字）","description":"回傳以 `/` 分隔的分詞結果，例如 `/觀自在菩薩/`。\n只有一個字時直接回傳原字。缺少 `t` 時回傳「缺少 t 參數」，\n分詞失敗時回傳「斷詞失敗」（HTTP 200）。\n建議改用回傳 JSON 的 `/word_seg2`。\n","tags":["tools"],"parameters":[{"name":"t","in":"query","required":true,"description":"要分詞的文字。","schema":{"type":"string","minLength":1},"example":"觀自在菩薩"}],"responses":{"200":{"description":"以 `/` 分隔的分詞結果。","content":{"text/plain":{"schema":{"type":"string"},"example":"/觀自在菩薩/"}}}}}},"/word_seg2":{"get":{"operationId":"wordSeg2","summary":"自動分詞","description":"GET、POST 皆可，參數相同。","tags":["tools"],"parameters":[{"name":"payload","in":"query","required":true,"description":"要分詞的文字。","schema":{"type":"string","minLength":1},"example":"觀自在菩薩，行深般若波羅蜜多時。"}],"responses":{"200":{"description":"分詞結果；缺少 `payload` 等錯誤時同樣是 200，見 `LegacyCodedError`。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WordSegResult"},{"$ref":"#/components/schemas/LegacyCodedError"}]},"examples":{"default":{"summary":"payload=觀自在菩薩，行深般若波羅蜜多時。","value":{"segmented":["觀自在菩薩","，","行","深","般若波羅蜜多","時","。"]}}}}}}}}},"/textref/meta.csv":{"get":{"operationId":"textrefMeta","summary":"TextRef 登錄用的 metadata","description":"提供 [TextRef](https://textref.org/) 登錄用的 metadata（CSV）。\n副檔名 `.csv` 可省略。\n","tags":["tools"],"responses":{"200":{"description":"兩欄（Field, Value）的 CSV。","content":{"text/csv":{"schema":{"type":"string"},"example":"Field,Value\nMetaURL,https://cbdata.dila.edu.tw/stable/textref/meta.csv\nDataURL,https://cbdata.dila.edu.tw/stable/textref/data.csv\nShortName,CBETA\n"}}}}}},"/textref/data.csv":{"get":{"operationId":"textrefData","summary":"TextRef 登錄用的全部典籍書目","description":"提供 [TextRef](https://textref.org/) 登錄用的全部典籍書目（CSV，以 attachment 下載）。\n副檔名 `.csv` 可省略。欄位：primary_id（佛典編號）、title、dynasty、author、\nedition（藏經名稱）、fulltext_read、fulltext_search、fulltext_download、image。\n","tags":["tools"],"responses":{"200":{"description":"每部典籍一列的 CSV。","content":{"text/csv":{"schema":{"type":"string"},"example":"primary_id,title,dynasty,author,edition,fulltext_read,fulltext_search,fulltext_download,image\nA1057,新譯大方廣佛華嚴經音義,唐,慧菀,趙城金藏,y,y,y,n\n"}}}}}},"/api/collections":{"get":{"operationId":"asiaCollections","summary":"藏經清單","description":"列出所有藏經，每部藏經為一個 collection。","tags":["asia-network"],"responses":{"200":{"description":"藏經清單。","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AsiaCollection"}}}}}}}},"/api/collections/{uuid}/resources":{"get":{"operationId":"asiaCollectionResources","summary":"某部藏經的典籍清單","tags":["asia-network"],"parameters":[{"$ref":"#/components/parameters/asiaUuid"}],"responses":{"200":{"description":"典籍清單，每部典籍為一個 resource。","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AsiaResource"}}}}},"404":{"description":"uuid 不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/resources/{uuid}/sections":{"get":{"operationId":"asiaResourceSections","summary":"某部典籍的卷清單","tags":["asia-network"],"parameters":[{"$ref":"#/components/parameters/asiaUuid"}],"responses":{"200":{"description":"卷清單，每一卷為一個 section。","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AsiaSection"}}}}},"404":{"description":"uuid 不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sections/{uuid}":{"get":{"operationId":"asiaSection","summary":"某一卷的資訊","description":"回傳的 `uuid` 是該卷內容（content unit）的 uuid，與 `/api/sections/{uuid}/content_units`\n回傳的 `uuid` 相同；`uri` 指向該卷的純文字檔。\n","tags":["asia-network"],"parameters":[{"$ref":"#/components/parameters/asiaUuid"}],"responses":{"200":{"description":"卷的資訊。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AsiaSectionInfo"}}}},"404":{"description":"uuid 不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sections/{uuid}/content_units":{"get":{"operationId":"asiaSectionContentUnits","summary":"某一卷的內文","tags":["asia-network"],"parameters":[{"$ref":"#/components/parameters/asiaUuid"}],"responses":{"200":{"description":"只有一筆的陣列，內含整卷純文字；找不到文字檔時為 `LegacyError`。","content":{"application/json":{"schema":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/AsiaContentUnit"}},{"$ref":"#/components/schemas/LegacyError"}]}}}},"404":{"description":"uuid 不存在。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/health":{"get":{"operationId":"health","summary":"服務狀態","description":"服務正常時回傳 `success`。不需要 API key，也不計入 rate limit。","tags":["meta"],"responses":{"200":{"description":"服務正常。","content":{"text/plain":{"schema":{"type":"string","const":"success"}}}}}}},"/openapi.json":{"get":{"operationId":"openapi","summary":"本 API 的 OpenAPI spec","description":"即本文件的 JSON 版。`info.version` 為目前的 API 版號，`servers` 為目前的站台。\n不需要 API key，也不計入 rate limit。\n","tags":["meta"],"responses":{"200":{"description":"OpenAPI 3.1 文件。","content":{"application/json":{"schema":{"type":"object","required":["openapi","info","paths"]}}}}}}}},"components":{"parameters":{"callback":{"name":"callback","in":"query","description":"JSONP 的函式名稱。指定時回應改為 `application/javascript`，\n內容為 `/**/<callback>(<JSON>)`，其中的 JSON 與未指定時相同。\n各 API 有列出此參數才支援。\n","schema":{"type":"string","pattern":"^[A-Za-z_$][0-9A-Za-z_$.]*$"},"example":"cb"},"canon":{"name":"canon","in":"query","description":"指定藏經 ID，允許以逗號分隔多值，例如 `T,X`。","schema":{"type":"string"},"example":"T"},"category":{"name":"category","in":"query","description":"指定部類。`a,b+c,d` 表示 (a OR b) AND (c OR d)；URL 裡的 `+` 要 escape 為 `%2b`。\n","schema":{"type":"string"},"example":"阿含部類"},"work":{"name":"work","in":"query","description":"指定一部佛典。","schema":{"type":"string"},"example":"T0026"},"works":{"name":"works","in":"query","description":"指定多部佛典，以逗號分隔。","schema":{"type":"string"},"example":"T0026,T0099"},"creator":{"name":"creator","in":"query","description":"指定作譯者 ID，允許以逗號分隔多值。\n`a,b+c,d` 表示 (a OR b) AND (c OR d)；URL 裡的 `+` 要 escape 為 `%2b`。\n","schema":{"type":"string"},"example":"A000439"},"dynasty":{"name":"dynasty","in":"query","description":"指定朝代，允許以逗號分隔多值。","schema":{"type":"string"},"example":"隋,唐"},"time":{"name":"time","in":"query","description":"指定某一年（`800`）或範圍（`800..900`）。","schema":{"type":"string","pattern":"^-?\\d+(\\.\\.-?\\d+)?$"},"example":"800..900"},"work_type":{"name":"work_type","in":"query","description":"指定文本類型：`textbody`（正文）或 `non-textbody`（非正文）。","schema":{"type":"string","enum":["textbody","non-textbody"]}},"searchQ":{"name":"q","in":"query","required":true,"description":"要搜尋的關鍵字，標點符號會被去除。長度上限 40 字。\n支援 AND、OR、NOT、NEAR、Exclude 語法，見\n[Extended 語法](https://cbdata.dila.edu.tw/dev/static_pages/search_extended)。\n不支援括號分組，會回傳錯誤（雙引號內的括號視為標點，會被去除）。\n組字式要 escape，例如 `[幻-ㄠ%2B糸]`。\n","schema":{"type":"string","minLength":1,"maxLength":40},"examples":{"phrase":{"value":"法鼓"},"and":{"value":"\"法鼓\" \"迦葉\""},"near":{"value":"\"法鼓\" NEAR/7 \"迦葉\""},"exclude":{"value":"\"直心\" -\"正直心\""}}},"searchNote":{"name":"note","in":"query","description":"是否含夾注。0：不含夾注；1：含夾注。","schema":{"type":"string","enum":["0","1"],"default":"1"}},"searchStart":{"name":"start","in":"query","description":"分頁回傳起始位置。","schema":{"type":"integer","minimum":0,"default":0}},"searchRows":{"name":"rows","in":"query","description":"每頁回傳筆數。","schema":{"type":"integer","minimum":0,"default":20}},"toc_q":{"name":"q","in":"query","required":true,"description":"要搜尋的關鍵詞。長度上限 40 字。","schema":{"type":"string","minLength":1,"maxLength":40},"examples":{"keyword":{"value":"阿含"},"work":{"value":"T0001"},"file":{"value":"T01n0001"}}},"asiaUuid":{"name":"uuid","in":"path","required":true,"description":"由上一層 API 回傳的 `uuid`。","schema":{"type":"string","format":"uuid"}}},"schemas":{"AllInOneResult":{"type":"object","additionalProperties":false,"required":["query_string","time","num_found","results"],"properties":{"query_string":{"type":"string","description":"原始查詢字串。"},"time":{"type":"number","description":"伺服器處理時間（秒）。"},"num_found":{"type":"integer","description":"符合的卷數。"},"total_term_hits":{"type":"integer","description":"關鍵字出現總次數。"},"cache_key":{"type":["string","null"],"description":"使用 cache 時的 cache key；`cache=0` 時為 null。"},"results":{"type":"array","items":{"$ref":"#/components/schemas/JuanHit"}},"facet":{"$ref":"#/components/schemas/Facets"}}},"JuanHitFields":{"type":"object","description":"一卷的檢索結果的各欄位（供 `JuanHit`、`SearchHit` 組合使用）。\n指定 `fields` 參數時只回傳其中部分欄位，因此這裡不列 required。\n","properties":{"id":{"type":"integer"},"term_hits":{"type":"integer","description":"關鍵字在這一卷出現的次數。"},"canon":{"type":"string","description":"藏經 ID。","example":"T"},"category":{"type":"string","description":"部類名稱。","example":"阿含部類"},"file":{"type":"string","example":"T01n0026"},"work":{"type":"string","description":"佛典編號。","example":"T0026"},"juan":{"type":"integer","description":"卷號。"},"title":{"type":"string","description":"佛典題名。"},"byline":{"type":"string","example":"東晉 瞿曇僧伽提婆譯"},"creators":{"type":"string","example":"僧伽提婆"},"creators_with_id":{"type":"string","example":"僧伽提婆(A001589)"},"time_dynasty":{"type":"string","example":"東晉"},"time_from":{"type":"integer","description":"成立年代起（西元年）。"},"time_to":{"type":"integer","description":"成立年代迄（西元年）。"},"juan_list":{"type":"string","description":"這部佛典所有卷號，以逗號分隔。","example":12}}},"JuanHit":{"description":"all_in_one 的一卷檢索結果：`JuanHitFields` 加上該卷的 KWIC。","allOf":[{"$ref":"#/components/schemas/JuanHitFields"}],"type":"object","unevaluatedProperties":false,"properties":{"kwics":{"$ref":"#/components/schemas/KwicList"}}},"SearchHit":{"description":"/search、/search/extended 的一卷檢索結果，欄位見 `JuanHitFields`（不含 KWIC）。","allOf":[{"$ref":"#/components/schemas/JuanHitFields"}],"type":"object","unevaluatedProperties":false},"KwicList":{"type":"object","additionalProperties":false,"required":["num_found","results"],"properties":{"num_found":{"type":"integer"},"time":{"type":"number","description":"KWIC 處理時間（秒）。只有 NEAR 查詢會回傳。"},"results":{"type":"array","items":{"$ref":"#/components/schemas/Kwic"}}}},"Kwic":{"type":"object","additionalProperties":false,"required":["vol","lb","kwic","linehead"],"properties":{"vol":{"type":"string","description":"冊號。","example":"T01"},"work":{"type":"string","description":"佛典編號。只有 NEAR 與 Exclude 查詢會回傳。"},"juan":{"type":"integer","description":"卷號。只有 NEAR 與 Exclude 查詢會回傳。"},"offset_in_text_with_punc":{"type":"integer","description":"在含標點的卷文字中的位置。"},"lb":{"type":"string","description":"行號。","example":"0724c01"},"kwic":{"type":"string","description":"前後文，關鍵字以 `<mark>` 標示。","example":"法界、甘露界、多鼓、<mark>法鼓</mark>、甘露鼓、法鏡、四品"},"linehead":{"type":"string","description":"行首資訊。","example":"T01n0026_p0724c01"}}},"Facets":{"type":"object","additionalProperties":false,"required":["canon","category","creator","dynasty","work"],"properties":{"canon":{"type":"array","items":{"$ref":"#/components/schemas/CanonFacet"}},"category":{"type":"array","items":{"$ref":"#/components/schemas/CategoryFacet"}},"creator":{"type":"array","items":{"$ref":"#/components/schemas/CreatorFacet"}},"dynasty":{"type":"array","items":{"$ref":"#/components/schemas/DynastyFacet"}},"work":{"type":"array","items":{"$ref":"#/components/schemas/WorkFacet"}}}},"FacetCount":{"type":"object","required":["docs","hits"],"properties":{"docs":{"type":"integer","description":"符合的卷數。"},"hits":{"type":"integer","description":"關鍵字出現次數。"}}},"CanonFacet":{"allOf":[{"$ref":"#/components/schemas/FacetCount"}],"type":"object","unevaluatedProperties":false,"required":["canon"],"properties":{"canon":{"type":"string"},"canon_name":{"type":"string","example":"大正藏"}}},"CategoryFacet":{"allOf":[{"$ref":"#/components/schemas/FacetCount"}],"type":"object","unevaluatedProperties":false,"required":["category_id","category_name"],"properties":{"category_id":{"type":"integer","description":"部類 ID。"},"category_name":{"type":"string","example":"禪宗部類"}}},"CreatorFacet":{"allOf":[{"$ref":"#/components/schemas/FacetCount"}],"type":"object","unevaluatedProperties":false,"required":["creator_id"],"properties":{"creator_id":{"type":"string","example":"A023393"},"creator_name":{"type":"string","description":"作譯者名稱；查無此 ID 時不回傳。","example":"釋印順"}}},"DynastyFacet":{"allOf":[{"$ref":"#/components/schemas/FacetCount"}],"type":"object","unevaluatedProperties":false,"required":["dynasty"],"properties":{"dynasty":{"type":"string","example":"唐"}}},"WorkFacet":{"allOf":[{"$ref":"#/components/schemas/FacetCount"}],"type":"object","unevaluatedProperties":false,"required":["work"],"properties":{"work":{"type":"string","example":"T0270"},"title":{"type":"string","example":"大法鼓經"}}},"LegacyError":{"type":"object","description":"舊式的錯誤回應：HTTP status 仍是 200，錯誤訊息放在 `error` 字串\n（既有 client 依賴這個行為）。多數 API 的參數錯誤都是這個格式。\n實際回應可能另含 `query_string` 等欄位，不屬於公開契約，\n因此這裡不限制額外欄位。\n","required":["error"],"properties":{"error":{"type":"string","example":"q 參數長度不得大於 40 字"},"num_found":{"type":"integer","const":0},"results":{"type":"array","maxItems":0}}},"Error":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}},"SearchResult":{"type":"object","additionalProperties":false,"required":["query_string","num_found","results"],"properties":{"query_string":{"type":"string","description":"正規化之後的查詢字串（標點會被去除，組字式會轉為 Unicode PUA）。"},"time":{"type":"number","description":"伺服器處理時間（秒）。`q` 去除標點後為空時不回傳。"},"num_found":{"type":"integer","description":"符合的卷數。"},"total_term_hits":{"type":"integer","description":"關鍵字出現總次數。NEAR 查詢不回傳。"},"cache_key":{"type":"null","description":"固定為 null。`q` 去除標點後為空時不回傳。"},"results":{"type":"array","description":"各卷的檢索結果。NEAR 查詢不含 `term_hits`。","items":{"$ref":"#/components/schemas/SearchHit"}}}},"NotesSearchResult":{"type":"object","additionalProperties":false,"required":["query_string","num_found","results"],"properties":{"query_string":{"type":"string","description":"正規化之後的查詢字串（標點會被去除，組字式會轉為 Unicode PUA）。"},"time":{"type":"number","description":"伺服器處理時間（秒）。`q` 去除標點後為空時不回傳。"},"num_found":{"type":"integer","description":"符合的條目數。"},"total_term_hits":{"type":"integer","description":"關鍵字出現總次數。NEAR 查詢不回傳。"},"cache_key":{"type":"null","description":"固定為 null。`q` 去除標點後為空時不回傳。"},"results":{"type":"array","items":{"$ref":"#/components/schemas/NoteHit"}},"facet":{"$ref":"#/components/schemas/Facets"}}},"NoteHit":{"type":"object","additionalProperties":false,"required":["id","note_place","canon","category","vol","file","work","title","juan","lb","content","highlight"],"properties":{"id":{"type":"integer"},"term_hits":{"type":"integer","description":"關鍵字在這一條出現的次數。只有 Exclude 查詢會回傳。"},"note_place":{"type":"string","enum":["foot","inline"],"description":"`foot`：校註（腳注）；`inline`：夾注。"},"canon":{"type":"string","example":"T"},"category":{"type":"string","example":"密教部類"},"vol":{"type":"string","example":"T18"},"file":{"type":"string","example":"T18n0894a"},"work":{"type":"string","example":"T0894a"},"title":{"type":"string","description":"佛典題名。"},"juan":{"type":"integer"},"lb":{"type":"string","description":"行號。","example":"0692b03"},"n":{"type":"string","description":"校註編號。夾注 (`inline`) 不回傳。","example":"n0692004"},"content":{"type":"string","description":"條目內容（已去除標點）。"},"highlight":{"type":"string","description":"含標點的條目內容，關鍵字以 `<mark>` 標示。\n夾注會附上前後文，前後各保留 `around` 字。\n"}}},"TitleSearchResult":{"type":"object","additionalProperties":false,"required":["query_string","time","num_found","results"],"properties":{"query_string":{"type":"string"},"time":{"type":"number","description":"伺服器處理時間（秒）。"},"num_found":{"type":"integer","description":"符合的佛典數。"},"results":{"type":"array","items":{"$ref":"#/components/schemas/TitleHit"}}}},"TitleHit":{"type":"object","additionalProperties":false,"required":["work","content","highlight"],"description":"一部佛典的經名檢索結果。佛典資料查不到時只回傳 work、content、highlight。","properties":{"work":{"type":"string","example":"T1749"},"content":{"type":"string","description":"經名。","example":"觀無量壽經義疏"},"highlight":{"type":"string","description":"經名，符合的字以 `<mark>` 標示。","example":"<mark>觀無量壽經</mark>義疏"},"byline":{"type":"string","example":"隋 慧遠撰"},"juan":{"type":"integer","description":"卷數。"},"creators_with_id":{"type":"string","example":"慧遠(A002000)"},"time_dynasty":{"type":"string"},"time_from":{"type":"integer"},"time_to":{"type":"integer"}}},"ScResult":{"type":"object","additionalProperties":false,"required":["q","hits"],"properties":{"time":{"type":"number","description":"伺服器處理時間（秒）。轉換前後相同時不回傳。"},"q":{"type":"string","description":"轉為繁體後的查詢字串。","example":"四聖諦"},"hits":{"type":"integer","description":"關鍵字出現總次數。轉換前後相同時為 0。"}}},"SimilarResult":{"type":"object","additionalProperties":false,"required":["query_string","time","num_found","cache_key","results"],"properties":{"query_string":{"type":"string","description":"去除標點後的查詢字串。"},"time":{"type":"number","description":"伺服器處理時間（秒）。"},"num_found":{"type":"integer","description":"回傳的段落數。"},"cache_key":{"type":"string","description":"cache key。"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SimilarHit"}},"facet":{"$ref":"#/components/schemas/SimilarFacets"}}},"SimilarHit":{"type":"object","additionalProperties":false,"required":["id","canon","category","work","title","juan","creators_with_id","dynasty","linehead","content","score","highlight"],"properties":{"id":{"type":"integer"},"canon":{"type":"string","description":"藏經 ID。","example":"X"},"category":{"type":"string","description":"部類名稱，可能以逗號分隔多值。","example":"禪宗部類"},"work":{"type":"string","description":"佛典編號。","example":"X1318"},"title":{"type":"string","description":"佛典題名。"},"juan":{"type":"integer","description":"卷號。"},"creators_with_id":{"type":"string","description":"作譯者及其 ID，多位以分號分隔；無作譯者時為空字串。","example":"師明(A000913)"},"dynasty":{"type":"string","description":"朝代；不詳時為 `unknown`。","example":"宋"},"linehead":{"type":"string","description":"段落起始的行首資訊。","example":"X68n1318_p0394c06"},"content":{"type":"string","description":"段落文字（不含標點）。"},"score":{"type":"integer","description":"Smith-Waterman 分數。"},"highlight":{"type":"string","description":"段落文字加上標記：最長符合的字串以 `<mark>` 標記，\n其中與 `q` 不同的字以 `<del>` 標記；`<mark>` 以外、包含在 `q` 內的字以 `<em>` 標記。\n"}}},"SimilarFacets":{"type":"object","description":"以回傳的段落計算；`hits` 為段落數。","additionalProperties":false,"required":["canon","category","creator","dynasty","work"],"properties":{"canon":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["canon","hits"],"properties":{"canon":{"type":"string"},"canon_name":{"type":"string","example":"新纂卍續藏"},"hits":{"type":"integer"}}}},"category":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["category_id","category_name","hits"],"properties":{"category_id":{"type":"integer"},"category_name":{"type":"string","example":"禪宗部類"},"hits":{"type":"integer"}}}},"creator":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["creator_id","hits"],"properties":{"creator_id":{"type":"string","example":"A000913"},"creator_name":{"type":"string","example":"師明"},"hits":{"type":"integer"}}}},"dynasty":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["dynasty","hits"],"properties":{"dynasty":{"type":"string","example":"宋"},"hits":{"type":"integer"}}}},"work":{"type":"array","items":{"type":"object","additionalProperties":false,"required":["work","hits"],"properties":{"work":{"type":"string","example":"X1318"},"title":{"type":"string","example":"續古尊宿語要"},"hits":{"type":"integer"}}}}}},"SynonymResult":{"type":"object","additionalProperties":false,"required":["time","num_found","results"],"properties":{"time":{"type":"number","description":"伺服器處理時間（秒）。"},"num_found":{"type":"integer","description":"近義詞數量。"},"results":{"type":"array","description":"近義詞。","items":{"type":"string"},"example":["曼殊室利","妙吉祥","文殊"]}}},"VariantsResult":{"type":"object","additionalProperties":false,"required":["time","num_found","cache_key","possibility","results"],"properties":{"time":{"type":"number","description":"伺服器處理時間（秒）。"},"num_found":{"type":"integer","description":"回傳的異體字變化數量。"},"cache_key":{"type":["string","null"],"description":"使用 cache 時的 cache key；`cache=0` 時為 null。"},"possibility":{"type":"integer","description":"存在於 CBETA 的變化總數（含 `q` 本身）。"},"results":{"type":"array","items":{"$ref":"#/components/schemas/VariantsHit"}}}},"VariantsHit":{"type":"object","additionalProperties":false,"required":["q","hits"],"properties":{"q":{"type":"string","description":"異體字變化後的字串。","example":"著衣持缽"},"hits":{"type":"integer","description":"出現次數。"}}},"KwicJuanResult":{"type":"object","additionalProperties":false,"required":["num_found","time","results"],"properties":{"num_found":{"type":"integer"},"time":{"type":"number","description":"伺服器處理時間（秒）。"},"results":{"type":"array","items":{"$ref":"#/components/schemas/KwicJuanHit"}}}},"KwicJuanHit":{"type":"object","additionalProperties":false,"required":["vol","lb"],"properties":{"vol":{"type":"string","description":"冊號。一卷可能跨冊。","example":"X30"},"lb":{"type":"string","description":"行號。","example":"0236a11"},"kwic":{"type":"string","description":"含標點的前後文；`kwic_w_punc=0` 時不回傳。","example":"吹法螺擊大法鼓，度脫一切"},"kwic_no_punc":{"type":"string","description":"不含標點的前後文；`kwic_wo_punc=1` 時才回傳。"},"place_name":{"type":"string","description":"地名；`place=1` 且這部佛典有地理資訊時才回傳，其他 `place_*` 欄位亦同。","example":"長安"},"place_id":{"type":"string","example":"PL000000042393"},"place_long":{"type":"number","description":"經度。"},"place_lat":{"type":"number","description":"緯度。"}}},"LinesResult":{"type":"object","additionalProperties":false,"required":["num_found","results"],"properties":{"num_found":{"type":"integer"},"time":{"type":"number","description":"伺服器處理時間（秒）。"},"results":{"type":"array","items":{"$ref":"#/components/schemas/LinesLine"}}}},"LinesLine":{"type":"object","additionalProperties":false,"required":["linehead","html"],"properties":{"linehead":{"type":"string","description":"行首資訊。","example":"T01n0001_p0001a04"},"html":{"type":"string","description":"該行文字。有註解的話會有 `<a class=\"noteAnchor\">` 標記。"},"notes":{"type":"object","description":"該行的註解，key 為註號；沒有註解時不回傳。","additionalProperties":{"type":"string"},"example":{"0001002":"長安【大】，〔－〕【宋】"}}}},"JuansResult":{"type":"object","additionalProperties":false,"required":["num_found","results"],"properties":{"num_found":{"type":"integer","description":"找到該卷時為 1，否則為 0。"},"uuid":{"type":"string","format":"uuid","description":"卷的 UUID；查無此卷時不回傳。"},"content":{"type":"string","format":"uuid","description":"卷內容的 UUID；查無此卷時不回傳。"},"results":{"type":"array","maxItems":1,"items":{"type":"string","description":"該卷的 HTML。"}},"toc":{"description":"目次；`toc=1` 時才回傳，這部佛典沒有目次時為 null。","oneOf":[{"$ref":"#/components/schemas/JuansToc"},{"type":"null"}]},"work_info":{"description":"佛典資訊；`work_info=1` 時才回傳。","oneOf":[{"$ref":"#/components/schemas/JuansWorkInfo"},{"type":"null"}]}}},"JuansToc":{"type":"object","additionalProperties":false,"required":["mulu","juan"],"properties":{"mulu":{"type":"array","description":"章節目次。","items":{"$ref":"#/components/schemas/JuansTocNode"}},"juan":{"type":"array","description":"卷目次。","items":{"$ref":"#/components/schemas/JuansTocJuan"}}}},"JuansTocNode":{"type":"object","additionalProperties":false,"required":["title","file","juan","lb"],"properties":{"title":{"type":"string","example":"序"},"file":{"type":"string","example":"T01n0001"},"juan":{"type":"integer"},"lb":{"type":"string","example":"0001a02"},"type":{"type":"string","example":"序"},"n":{"type":"integer","description":"節點編號；有子節點時才回傳。"},"isFolder":{"type":"boolean","description":"有子節點時才回傳。"},"children":{"type":"array","description":"子節點。","items":{"$ref":"#/components/schemas/JuansTocNode"}}}},"JuansTocJuan":{"type":"object","additionalProperties":false,"required":["file","juan","lb","title"],"properties":{"file":{"type":"string","example":"T01n0001"},"juan":{"type":"integer"},"lb":{"type":"string","example":"0001b08"},"title":{"type":"string","example":"第一"}}},"JuansWorkInfo":{"description":"卷所屬佛典的資訊，欄位見 `WorkInfoFields`。","allOf":[{"$ref":"#/components/schemas/WorkInfoFields"}],"type":"object","unevaluatedProperties":false,"required":["work","uuid","canon","category","orig_category","vol","title","juan","juan_list"]},"JuansGotoResult":{"type":"object","additionalProperties":false,"required":["num_found","results"],"properties":{"num_found":{"type":"integer"},"results":{"type":"array","maxItems":1,"items":{"$ref":"#/components/schemas/JuansGotoTarget"}}}},"JuansGotoTarget":{"type":"object","additionalProperties":false,"required":["vol","work","file","juan","lb","linehead"],"properties":{"vol":{"type":"string","example":"T01"},"work":{"type":"string","example":"T0001"},"file":{"type":"string","example":"T01n0001"},"juan":{"type":"integer"},"lb":{"type":"string","example":"0011b10"},"linehead":{"type":"string","example":"T01n0001_p0011b10"},"title":{"type":"string","example":"長阿含經"}}},"LegacyCodedError":{"type":"object","description":"舊式的錯誤回應：HTTP status 仍是 200，錯誤放在 `error` 物件，`code` 為對應的\nHTTP status。實際回應可能另含其他欄位，不屬於公開契約，\n因此這裡不限制額外欄位。\n","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"integer","example":404},"message":{"type":"string"}}}}},"WorkInfoFields":{"type":"object","description":"佛典資訊的各欄位（供其他 schema 組合使用）。\nCBETA 未收錄全文的佛典（有 `alt`）沒有 `file`、`juan_start`，\n`juan_list`、`cjk_chars`、`en_words` 為 null。\n","properties":{"work":{"type":"string","description":"佛典編號（經號）。","example":"T1501"},"uuid":{"type":"string","format":"uuid"},"canon":{"type":"string","description":"藏經 ID。","example":"T"},"category":{"type":"string","description":"所屬部類（CBETA 分類），未分類時為空字串。","example":"律部類"},"orig_category":{"type":"string","description":"底本分部，例如大正藏的阿含部、本緣部；沒有時為空字串。","example":"律部"},"vol":{"type":"string","description":"冊號；跨冊的佛典以 `..` 表示範圍，例如 `T05..T07`。","example":"T24"},"title":{"type":"string","description":"佛典題名（經名）。","example":"菩薩戒本"},"juan":{"type":"integer","description":"卷數。"},"juan_list":{"type":["string","null"],"description":"所有卷號，以逗號分隔。","example":"1"},"cjk_chars":{"type":["integer","null"],"description":"中日韓文字數（不含標點）。"},"en_words":{"type":["integer","null"],"description":"英文、半形數字、梵文、巴利文的 word 數。"},"alt":{"type":"string","description":"CBETA 未收錄此經全文時，對應到的其他藏經佛典編號。","example":"T0293"},"file":{"type":"string","description":"第一個 XML 檔的主檔名。","example":"T24n1501"},"juan_start":{"type":"integer","description":"於 `file` 中的起始卷號。"},"byline":{"type":"string","description":"作譯者行。","example":"彌勒菩薩說 唐 玄奘譯"},"creators":{"type":"string","description":"作者、譯者或其他貢獻者姓名，以逗號分隔。","example":"彌勒菩薩,玄奘"},"creators_with_id":{"type":"string","description":"附作譯者 ID 的姓名，以分號分隔。","example":"彌勒菩薩(A001428);玄奘(A000294)"},"time_dynasty":{"type":"string","description":"成立的朝代。","example":"唐"},"time_from":{"type":"integer","description":"成立年代起（西元年）。"},"time_to":{"type":"integer","description":"成立年代迄（西元年）。"},"places":{"type":"array","description":"成立地點，多值。","items":{"$ref":"#/components/schemas/WorkPlace"}}}},"WorkInfo":{"allOf":[{"$ref":"#/components/schemas/WorkInfoFields"}],"type":"object","unevaluatedProperties":false,"required":["work","uuid","canon","category","orig_category","vol","title","juan","juan_list","cjk_chars","en_words"]},"WorkPlace":{"type":"object","additionalProperties":false,"required":["name","id"],"properties":{"name":{"type":"string","example":"大慈恩寺"},"id":{"type":"string","description":"地名權威 ID。","example":"PL000000042410"},"latitude":{"type":"number"},"longitude":{"type":"number"}}},"WorkList":{"type":"object","additionalProperties":false,"required":["num_found","results"],"properties":{"num_found":{"type":"integer"},"results":{"type":"array","items":{"$ref":"#/components/schemas/WorkInfo"}}}},"WorkTocList":{"type":"object","additionalProperties":false,"required":["num_found","time","results"],"properties":{"num_found":{"type":"integer"},"time":{"type":"number","description":"伺服器處理時間（秒）。"},"results":{"type":"array","maxItems":1,"items":{"$ref":"#/components/schemas/WorkToc"}}}},"WorkToc":{"type":"object","additionalProperties":false,"required":["mulu","juan"],"properties":{"mulu":{"type":"array","description":"佛典內目次。","items":{"$ref":"#/components/schemas/WorkTocNode"}},"juan":{"type":"array","description":"卷目次。","items":{"$ref":"#/components/schemas/WorkTocJuan"}}}},"WorkTocNode":{"type":"object","additionalProperties":false,"required":["title","file","juan","lb"],"properties":{"title":{"type":"string","description":"目次節點標題。","example":"1 分"},"file":{"type":"string","description":"所在 XML 檔的主檔名。","example":"T01n0001"},"juan":{"type":"integer","description":"所在卷號。"},"lb":{"type":"string","description":"所在頁、欄、行。","example":"0001b11"},"type":{"type":"string","description":"節點類型，例如「1 分」的 type 為「分」。","example":"分"},"n":{"type":"integer","description":"節點序號，例如「1 分」的 n 為 1。"},"isFolder":{"type":"boolean","description":"為 true 時表示有 `children`。"},"children":{"type":"array","description":"下層目次節點。","items":{"$ref":"#/components/schemas/WorkTocNode"}}}},"WorkTocJuan":{"type":"object","additionalProperties":false,"required":["title","file","juan","lb"],"properties":{"title":{"type":"string","example":"第一"},"file":{"type":"string","example":"T01n0001"},"juan":{"type":"integer"},"lb":{"type":"string","example":"0001b08"}}},"TocSearchList":{"type":"object","additionalProperties":false,"required":["num_found","time","results"],"properties":{"num_found":{"type":"integer"},"time":{"type":"number","description":"伺服器處理時間（秒）。"},"results":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/TocSearchCatalogHit"},{"$ref":"#/components/schemas/TocSearchWorkHit"},{"$ref":"#/components/schemas/TocSearchTocHit"}]}}}},"TocSearchCatalogHit":{"description":"在部類目錄中找到的節點。節點若對應到某部佛典，另附該佛典的資訊。","allOf":[{"$ref":"#/components/schemas/WorkInfoFields"}],"type":"object","unevaluatedProperties":false,"required":["type","n","label"],"properties":{"type":{"const":"catalog"},"n":{"type":"string","description":"目錄節點編號，可用於 `/catalog_entry?q=`。","example":"CBETA.001"},"label":{"type":"string","example":"01 阿含部類 T01-02,25,33 etc."}}},"TocSearchWorkHit":{"description":"在佛典標題（經名）中找到的佛典。","allOf":[{"$ref":"#/components/schemas/WorkInfoFields"}],"type":"object","unevaluatedProperties":false,"required":["type","work","uuid","canon","category","orig_category","vol","title","juan","juan_list","cjk_chars","en_words"],"properties":{"type":{"const":"work"}}},"TocSearchTocHit":{"description":"在佛典內目次標題中找到的節點，另附該佛典的資訊；\n其中 `file`、`juan_start` 為該目次節點所在的檔案與卷號。\n","allOf":[{"$ref":"#/components/schemas/WorkInfoFields"}],"type":"object","unevaluatedProperties":false,"required":["type","label","label_path","work","lb","linehead"],"properties":{"type":{"const":"toc"},"label":{"type":"string","description":"目次節點標題。","example":"1 大本經"},"label_path":{"type":"string","description":"從最上層到此節點的標題路徑，以 `/` 分隔。","example":"1 分/1 大本經"},"lb":{"type":"string","description":"目次節點所在頁、欄、行。","example":"0001b11"},"linehead":{"type":"string","description":"目次節點的行首資訊。","example":"T01n0001_p0001b11"}}},"CatalogEntryList":{"type":"object","additionalProperties":false,"required":["num_found","label","results"],"properties":{"num_found":{"type":"integer"},"label":{"type":["string","null"],"description":"查詢節點本身的標題；`q=root` 或查無節點時為 null。","example":"部類目錄"},"results":{"type":"array","items":{"$ref":"#/components/schemas/CatalogEntryNode"}}}},"CatalogEntryNode":{"type":"object","additionalProperties":false,"required":["n","node_type"],"properties":{"n":{"type":"string","description":"目錄節點編號，可用於取得下層節點。","example":"CBETA.001"},"label":{"type":"string","example":"01 阿含部類 T01-02,25,33 etc."},"node_type":{"type":["string","null"],"enum":["work","alt","html",null],"description":"`work`：指向某部佛典；`alt`：CBETA 未收錄此經全文，對應到其他藏經的全文；\n`html`：指向說明文件（`file` 為其路徑）；null：一般目錄節點。\n"},"work":{"type":"string","description":"佛典編號（`node_type` 為 `work` 時）。","example":"T0001"},"category":{"type":"string","description":"佛典所屬部類（`node_type` 為 `work` 時）。"},"creators":{"type":"string","description":"佛典的作譯者（`node_type` 為 `work` 時）。"},"juan_start":{"type":"integer","description":"節點所指向的起始卷。節點可能只指向佛典的部份卷數。"},"juan_end":{"type":["integer","null"],"description":"節點所指向的結束卷。"},"file":{"type":"string","description":"XML 檔的主檔名；`node_type` 為 `html` 時為說明文件路徑。","example":"T01n0001"},"lb":{"type":"string","description":"節點所指向的頁、欄、行。","example":"0540a16"}}},"ChangeList":{"type":"object","additionalProperties":false,"required":["num_found","results"],"properties":{"num_found":{"type":"integer"},"results":{"type":"array","description":"依版本由新到舊排序。","items":{"$ref":"#/components/schemas/ChangeEntry"}}}},"ChangeEntry":{"type":"object","additionalProperties":false,"required":["work","juan","lb","html","ver"],"properties":{"work":{"type":"string","example":"A1057"},"juan":{"type":"integer"},"lb":{"type":"string","description":"行首資訊。","example":"A091n1057_p0321a10"},"html":{"type":"string","description":"修訂後的該行內容，刪除的文字以 `<span class=\"del\">`、新增的文字以 `<span class=\"ins\">` 標示。"},"ver":{"type":"string","description":"修訂所在的 CBETA 版本。","example":"2025R2"},"del_chars":{"type":["integer","null"],"description":"刪除的字數。"},"ins_chars":{"type":["integer","null"],"description":"新增的字數。"}}},"CreatorExport":{"type":"object","additionalProperties":false,"required":["num_found","results"],"properties":{"num_found":{"type":"integer"},"results":{"type":"object","description":"以作譯者 ID 為 key。","propertyNames":{"pattern":"^A\\d{6}$"},"additionalProperties":{"$ref":"#/components/schemas/CreatorAliases"}}}},"CreatorAliases":{"type":"object","additionalProperties":false,"required":["regular_name"],"properties":{"regular_name":{"type":"string","description":"作譯者的正式名稱。","example":"金總持"},"aliases_all":{"type":"array","description":"所有別名。","items":{"type":"string"}},"aliases_byline":{"type":"array","description":"出現在作譯者行的別名。","items":{"type":"string"}}}},"WordSegResult":{"type":"object","additionalProperties":false,"required":["segmented"],"properties":{"segmented":{"type":"array","description":"分詞結果，標點符號也各自成為一個元素。","items":{"type":"string"},"example":["觀自在菩薩","，","行","深","般若波羅蜜多","時","。"]}}},"AsiaCollection":{"type":"object","additionalProperties":false,"required":["uuid","name","resourceCount"],"properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string","description":"藏經 ID 與名稱。","example":"A 趙城金藏"},"resourceCount":{"type":"integer","description":"典籍數。"}}},"AsiaResource":{"type":"object","additionalProperties":false,"required":["uuid","name"],"properties":{"uuid":{"type":"string","format":"uuid"},"name":{"type":"string","description":"佛典編號與題名。","example":"M1540 大慧普覺禪師普說"}}},"AsiaSection":{"type":"object","description":"卷清單裡的一卷。","additionalProperties":false,"required":["uuid","title","parentUuid","uri","contentUnitCount"],"properties":{"uuid":{"type":"string","format":"uuid","description":"卷的 uuid，可用於 `/api/sections/{uuid}`。"},"title":{"type":"string","example":"M1540 大慧普覺禪師普說 第1卷"},"parentUuid":{"type":"null"},"uri":{"type":"string","format":"uri","description":"該卷在 CBETA Online 的閱讀網址。","example":"http://cbetaonline.dila.edu.tw/M1540_001"},"contentUnitCount":{"type":"integer","const":1}}},"AsiaSectionInfo":{"type":"object","description":"`/api/sections/{uuid}` 回傳的卷資訊。欄位與 `AsiaSection` 相同，但 `uuid` 與 `uri`\n指的是該卷的內容（content unit），不是卷本身。\n","additionalProperties":false,"required":["uuid","title","parentUuid","uri","contentUnitCount"],"properties":{"uuid":{"type":"string","format":"uuid","description":"該卷內容的 uuid，與 `/api/sections/{uuid}/content_units` 回傳的 `uuid` 相同。"},"title":{"type":"string","example":"M1540 大慧普覺禪師普說 第1卷"},"parentUuid":{"type":"null"},"uri":{"type":"string","format":"uri","description":"該卷純文字檔的網址。","example":"https://cbdata.dila.edu.tw/dev/download/text-for-asia-network/M/M1540/M1540_001.txt"},"contentUnitCount":{"type":"integer","const":1}}},"AsiaContentUnit":{"type":"object","additionalProperties":false,"required":["uuid","title","contents"],"properties":{"uuid":{"type":"string","format":"uuid"},"title":{"type":"string","example":"M1540 大慧普覺禪師普說 第1卷"},"contents":{"type":"string","description":"整卷純文字（含檔頭的經文資訊）。"}}}}}}