CBDB API

Introduction to CBDB API

API (application programming interfaces) is an application which allows system interoperability. Through API, each database can retrieve data from another database to supplement its own without actually storing them. 

CBDB API now allows other databases to retrieve and present CBDB data on the fly. We accept two types of queries:

  1. Query by person ID (CBDB ID)
  2. Query by name (Chinese and Pinyin)

How to Call CBDB API:

Example: creating an API call to CBDB for 王安石 (Wang Anshi)

Send out http request using the following link:

 

Query by person ID:

https://cbdb.fas.harvard.edu/cbdbapi/person.php?id=1762 (Wang Anshi's CBDB ID)

 

Query by name:

https://cbdb.fas.harvard.edu/cbdbapi/person.php?name=王安石
https://cbdb.fas.harvard.edu/cbdbapi/person.php?name=Wang%20Anshi

 

Output to json:

https://cbdb.fas.harvard.edu/cbdbapi/person.php?name=王安石&o=json

 

Output Format:

After calling the API, it will return the complete data of the person in CBDB.

HTML output:

CBDB API HTML output for Wang Anshi: ID 1762, index year 1080, 1021-1086, choronym Taiyuan, followed by a biographical note, alternative names and offices held.
Rest of the same output: a kinship table of brothers, sons, wives and in-laws with sources, then social associations such as recommendations.

 

CBDB API also supports JSON output formats:

CBDB API JSON output: a PersonSources array listing reference works with page numbers, and PersonAliases giving the style name Jiefu.

 

Current Users of CBDB API:

 

Ming Qing Women's Writings by McGill University

 

人名權威人物傳記資料 by Academia Sinica

 

Communication and Empire: Chinese Empires in Comparative Perspective by Hilde De Weerdt

 

Digging into Data: Automating Chinese Text Extraction by Peter K. Bol, Naomi Standen, Hilde De Weerdt