Chinese Text Project API
Overview
Chinese Text Project offers a free API to access a massive digital library of pre-modern Chinese texts, including classics like the Analects and Tao Te Ching. You can retrieve chapter content, search for passages, and look up textual metadata without any API key. It is a great starting point for digital humanities projects or anyone studying classical Chinese literature.
Beginner Tip
Use the gettext operation to fetch the content of a specific text section by its CTP identifier (e.g., analects/1). Response data is returned as JSON with nested chapter and passage objects.
Available Data
Example Response
{
"title": "The Great Gatsby",
"authors": [
"F. Scott Fitzgerald"
],
"publishedDate": "1925-04-10",
"pageCount": 218,
"categories": [
"Fiction"
],
"imageLinks": {
"thumbnail": "https://books.google.com/..."
},
"averageRating": 4
} Field Reference
result Indicates success or failure of the API operation. urn Unique resource name identifying the text in the CTP database. title Title of the retrieved text or chapter. text Array of passage objects each containing line number and Chinese text content. en English translation of the passage, if available. Implementation Example
// ⚠️ Note: This URL may be a documentation page. Check official docs for actual API endpoint.
const url = "https://ctext.org/tools/api";
const response = await fetch(url);
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data); What Can You Build?
Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.
Common Errors & Troubleshooting
Matrix Score Breakdown
Fully tested on Apr 5, 2026
Technical Specifications
Related Tags
Similar APIs
View All →Chinese Character Web
⭐ Beginner's PickChinese Character Web is a free API providing definitions, stroke counts, and pronunciations for Chinese characters without requiring an API key.
Free Dictionary
Free Dictionary provides programmatic access to definitions, phonetics, pronounciations, parts of speech, examples, synonyms via REST API.
Indonesia Dictionary
Indonesia Dictionary provides programmatic access to indonesia dictionary many words via REST API.
Wiktionary
⭐ Beginner's PickWiktionary's API gives free access to the entire collaboratively-edited dictionary, covering definitions, pronunciations, etymology, and translations for words in hundreds of languages.
Collins
Collins Dictionary API gives developers access to comprehensive bilingual dictionary and thesaurus data for multiple language pairs, including English, Spanish, French, and more.