Dictionaries — entry 002 of 12
Chinese Text Project
Chinese Text Project's JSON API resolves opaque CTP URNs into full text, titles, and subsection metadata across its library of pre-Qin and Han-era classical Chinese works, and underpins the site's own browser plugins for text lookup and annotation. Anonymous requests work without any key but are rate-limited; logged-in accounts get a higher ceiling, and academic institutions can arrange a subscription that issues API keys for extended, programmatic access.
Chinese Text Project's JSON API resolves opaque CTP URNs into full text, titles, and subsection metadata across its library of pre-Qin and Han-era classical Chinese works. Anonymous requests work without any key but are rate-limited; the readlink/getlink pair converts freely between a ctext.org URL and its URN with no rate limit at all.
GreatAPIs Score
Auth quickstart
- No key needed — call it now.
Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.
Resolve a ctext.org URL to its CTP URN
GEThttps://api.ctext.org/readlink?url=https://ctext.org/analects/xue-er
{
"urn": "ctp:analects/xue-er"
}The reverse lookup — turning a URN back into a link — is getlink?urn=ctp:analects/xue-er, which returns { "url": "https://ctext.org/analects/xue-er" }.
Developer reference
Gotchas & limits
- The main
gettextfunction (fetching actual passage content) returnsERR_REQUIRES_AUTHENTICATIONfor unauthenticated requests from most cloud/datacenter IPs — it's gated to registered residential-range IPs or an API key, unlikereadlink/getlinkwhich are open to everyone - Chapter-level URNs (e.g.
ctp:analects/xue-er) return afulltextarray once authenticated; book-level URNs (e.g.ctp:analects) return asubsectionsarray instead — the same function, two different shapes - Errors are always a JSON
errorobject with a stablecodefield (e.g.ERR_INVALID_FUNCTION,ERR_MISSING_PARAM) — checkcode, not the human-readabledescription, for application logic - URNs are opaque identifiers the docs explicitly warn not to parse — treat them as strings to pass around, not to decompose