palemoky/chinese-poetry-api — explained in plain English
Analysis updated 2026-05-18
Query a large database of classical Chinese poetry through a REST or GraphQL API
Build an app or study tool that displays random poems filtered by author or dynasty
Search poems by title, content, or author across nearly 400,000 entries
Self-host the poetry API using the published Docker image
| palemoky/chinese-poetry-api | compozy/compozy | nvidia/aistore | |
|---|---|---|---|
| Stars | 2,109 | 2,025 | 1,864 |
| Language | Go | Go | Go |
| Setup difficulty | easy | moderate | hard |
| Complexity | 2/5 | 3/5 | 5/5 |
| Audience | developer | developer | researcher |
Figures from each repo's GitHub metadata at analysis time.
Cloning the full dataset requires the git submodules flag, Docker is the fastest way to run it.
chinese-poetry-api is a high performance web service, written in Go, that serves classical Chinese poetry through both a REST API and a GraphQL API. It gives programmatic access to a large collection of nearly 400,000 poems, covering Tang dynasty poems, Song dynasty lyrics, Yuan dynasty verse, and several other classical forms, all sourced from the existing chinese-poetry open dataset. A hosted version of the service is available online, and the project also runs as a Docker container you can deploy yourself. Every endpoint supports switching between simplified and traditional Chinese through a language parameter, since the same underlying data is stored to support both. The REST API includes routes for health checks, overall statistics, listing and searching poems, fetching a random poem with optional filters for author, dynasty, or poetic form, and browsing lists of authors, dynasties, and poem types with their details. Search can be scoped to titles, content, authors, or all fields at once. The GraphQL API exposes the same kind of data through queries for poems, search, and statistics, with paginated results. Setting it up is meant to be quick: running the published Docker image with a single command starts the server, or you can build it from source using the project's Makefile, which includes commands for building, processing the poetry data, and running the server. The poetry data itself is managed as a Git submodule, so cloning the repository with the recurse submodules flag pulls in the full dataset alongside the code. The service includes built in IP-based rate limiting to prevent abuse, and it is designed to run on multiple processor architectures through its container image. The project credits the chinese-poetry dataset as its data source and a library called gocc for simplified to traditional Chinese conversion. It is released under an open source license as indicated in the repository.
A Go-based API that serves nearly 400,000 classical Chinese poems through REST and GraphQL, with simplified and traditional Chinese support.
Mainly Go. The stack also includes Go, REST, GraphQL.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.