npm install pinyin-rest
GET: https://api.pinyin.pepe.asia/pinyin/我的猫喜欢喝牛奶
=> {
"text": "wǒ de māo xǐhuan hē niúnǎi",
"data": ["wǒ ", ["de", "dī", "dí", "dì"], " māo xǐhuan ", ["hē", "hè"], " niúnǎi"]
}
GET: https://api.pinyin.pepe.asia/pinyin/wo3 xi3huan1 he1 cha2
=> {
"text": "wǒ xǐhuān hē chá",
"data": "wǒ xǐhuān hē chá"
}
GET: https://api.pinyin.pepe.asia/pinyin/woxihuanhecha?split=true
=> {
"text": "wo xi huan he cha",
"data": ["wo", "xi", "huan", "he", "cha"]
}
GET: https://api.pinyin.pepe.asia/definition/的
=> {
"de5": [
"of",
"~'s (possessive particle)",
"(used after an attribute)",
"(used to form a nominal expression)",
"(used at the end of a declarative sentence for emphasis)"
],
"di1": [
"see 的士[di1 shi4]"
],
"di2": [
"really and truly"
],
"di4": [
"aim",
"clear"
]
}
GET: https://api.pinyin.pepe.asia/hanzi/苹果
=> {
"traditional": "蘋果",
"simplified": "苹果",
"data": {
"ping2 guo3": {
"mandarin": "píng guǒ",
"definitions": [
"apple"
],
"classifiers": {
"ge4": {
"traditional": "個",
"simplified": "个",
"mandarin": "gè",
"definition": "classifier for people or objects in general"
},
"ke1": {
"traditional": "顆",
"simplified": "颗",
"mandarin": "kē",
"definition": "classifier for small spheres, pearls, corn grains, teeth, hearts, satellites etc"
}
}
}
}
}
pinyin-utils
pinyin-split
find-hanzi
hsk-words
cedict
mdbg
pinyin-or-hanzi
hanzi-to-pinyin
pinyin-convert
pinyin-api
pinyin-bot-core
pinyin-telegram
pinyin-messenger
pinyin-line
pinyin-chrome
pinyin-cli
hanzi-cli
If you have a question, found a bug or want to propose a feature, have a look at the issues page.