#  CBDB API 

 



 ##  

  expand\_more  

 
  

 

### 簡介

API (application programming interfaces) 是一種允許資料庫之間互相溝通的介面. 透過 API, 每個資料庫都可以取用其他資料庫的資訊, 來補充自己未能著重的資料面相, 而不必在自己資料庫重新輸入這些資料.

CBDB 現在為其他資料庫提供API服務，讓任何資料庫都可以取用CBDB 人物傳記, 並於自己的資料庫呈現出來。CBDB API 現在支持兩種查詢方式：

1\. 用人物ID查詢 (CBDB ID)

2\. 用人名查詢 (漢字或拼音)

**如何呼叫CBDB API**

例：為王安石創建API Call

以程式送出以下http請求:

1\. 用人物ID查詢 (用CBDB ID取得人物傳記 ):

<https://cbdb.fas.harvard.edu/cbdbapi/person.php?id=1762> (王安石的ID)

2\. 用人名查詢 (漢字或拼音):

[https://cbdb.fas.harvard.edu/cbdbapi/person.php?name=王安石](https://cbdb.fas.harvard.edu/cbdbapi/person.php?name=%E7%8E%8B%E5%AE%89%E7%9F%B3)

<https://cbdb.fas.harvard.edu/cbdbapi/person.php?name=wang%20anshi>

3\. 輸出為 json 格式:

[https://cbdb.fas.harvard.edu/cbdbapi/person.php?name=王安石&amp;o=json](https://cbdb.fas.harvard.edu/cbdbapi/person.php?name=王安石&o=json)

**輸出格式**

呼叫CBDB API後，我們會回傳關於此人在CBDB完整的傳記資料:

HTML格式

Embed



 



 ![CBDB-api-html](/sites/g/files/omnuum3961/files/2025-10/CBDB-api-html.png)

 

CBDB API 也支持另外 JSON 輸出格式：

 ![cbdb-api-json](/sites/g/files/omnuum3961/files/2025-10/cbdb-api-json.png)

 

**目前在使用CBDB API的資料庫有:**

[**明清婦女著作**](https://digital.library.mcgill.ca/mingqing/chinese/index.php) **-- McGill大學**

[**人名權威人物傳記資料**](http://archive.ihp.sinica.edu.tw/ttsweb/html_name/index.php) **-- 中央研究院歷史語言研究所**

[**Communication and Empire: Chinese Empires in Comparative Perspective**](https://chinese-empires.eu/) ***--*** **Hilde De Weerdt**

[**Digging into Data: Automating Chinese Text Extraction**](https://did-acte.org/) ***--*** **Peter K. Bol, Naomi Standen, Hilde De Weerdt**