Free Hanzi API
Chinese Character Stroke Order API
Use 汉字怎么写 as a structured REST API for AI agents, education apps, handwriting practice tools, and Chinese learning products.
What You Can Build
- Explain how to write a Chinese character step by step.
- Generate handwriting worksheets for children and beginner learners.
- Render stroke-order animation with Hanzi Writer compatible SVG path data.
- Add pinyin, radical, stroke count, and common words to education apps.
Endpoints
- GET /api/hanzi?char=学 returns one character's writing data.
- GET /api/phrase?text=学习 returns per-character writing data for a word or short phrase.
- GET /api/hanzi/学/strokes returns Hanzi Writer compatible stroke path data.
OpenAPI
- The machine-readable OpenAPI file is available at /openapi.json.
- Agents and developer tools can use it to understand the request parameters and response schema.
Examples
curl "https://wr.practice-hanzi.uk/api/hanzi?char=学"
curl "https://wr.practice-hanzi.uk/api/phrase?text=学习"
curl "https://wr.practice-hanzi.uk/api/hanzi/学/strokes"