Chinese Text Project API

Beginner's Pick Dictionaries / No Auth Required Beginner HTTPS
Free to Use
60 C
Measured Score 0 50 100 Speed 9/30 Consistency 17/20 Security 16/20 Browser access 10/15 Transparency 8/15 TESTED 2026-08-10

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.

Measurement Record

What actually happened when we called this API from our own infrastructure. Every value below was recorded by the request, not copied from the provider's documentation.

Request
GET https://api.ctext.org/getstatus
Result
HTTP 200 · application/json · 55 bytes · compressed
Response time
335 ms (median of 3) · fastest 300 ms
Transport
TLSv1.3 · TLS_AES_256_GCM_SHA384
Browser CORS
Allowed — Access-Control-Allow-Origin: https://apisscore.com
Served by
Apache
Recorded
2026-08-10

Fields Returned

Top-level fields present in the response we captured, with the type and value we actually received.

Field Type Value received
loggedin string false
subscriber string false

Captured Response

Captured from a real request to https://api.ctext.org/getstatus on 2026-08-10. Long arrays and nested objects are truncated to keep the shape readable.

JSON Response · Captured
{
  "loggedin": "false",
  "subscriber": "false"
}

Implementation Example

Calls a real endpoint of this API. Replace any placeholder credentials with your own key.

Request
const url = "https://ctext.org/api.pl?if=en&op=gettext&urn=urn:cts:shicai:lunyu&format=json";
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

Generated guidance based on this API's documentation, not observed by us. Treat it as a starting point and check against the provider's own error reference.

error: invalid request A required parameter such as op or urn is missing or misspelled.
Double-check that op is set to a valid operation (e.g., gettext, gettextinfo) and that urn follows the ctext URN format.
Returned HTML instead of JSON The format=json parameter was omitted from the request.
Always append &format=json to receive machine-readable JSON output.
Empty result for a known text The text identifier or URN does not exactly match the CTP database entry.
Browse https://ctext.org to find the exact URN for the text you want before querying.

Measured Score Breakdown

Live HTTP request to the API endpoint

Speed 9/30
Consistency 17/20
Security 16/20
Browser access 10/15
Transparency 8/15
Endpoint Response Time 335ms

Fully tested on Aug 10, 2026

Technical Specifications

Auth No Auth
HTTPS REQUIRED
CORS UNKNOWN
Category Dictionaries
Difficulty Beginner
Endpoint last called: 2026-08-10

Related Tags

Similar APIs

View All →