查询单个汉字的详细信息,包括读音、部首、笔画、五行、结构、基本解释、组词、成语、同音字、同部首字、同五行字等。
查询单个汉字的详细信息,包括读音、部首、笔画、五行、结构、基本解释、组词、成语、同音字、同部首字、同五行字等。
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| char | string | 是 | 要查询的单个汉字,如:好、学、字等 |
[
{
"name": "char",
"type": "string",
"required": true,
"description": "要查询的单个汉字,如:好、学、字等",
"example": ""
}
]{"openapi":"3.1.1","info":{"title":"汉语字典","description":"查询单个汉字的详细信息,包括读音、部首、笔画、五行、结构、基本解释、组词、成语、同音字、同部首字、同五行字等。","version":"1.0.0"},"paths":{"/apis/gateway?api=dictionary":{"get":{"summary":"汉语字典","description":"查询单个汉字的详细信息,包括读音、部首、笔画、五行、结构、基本解释、组词、成语、同音字、同部首字、同五行字等。","parameters":[{"name":"char","in":"query","required":true,"schema":{"type":"string"},"description":"要查询的单个汉字,如:好、学、字等"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object"}}}}}},"post":{"summary":"汉语字典","description":"查询单个汉字的详细信息,包括读音、部首、笔画、五行、结构、基本解释、组词、成语、同音字、同部首字、同五行字等。","parameters":[{"name":"char","in":"query","required":true,"schema":{"type":"string"},"description":"要查询的单个汉字,如:好、学、字等"}],"responses":{"200":{"description":"成功","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"servers":[{"url":"https://api.souxiaocha.com","description":"当前访问入口(https)"}]}
{"code":200,"message":"成功","data":{"char":"汉","pronunciation":"hàn ㄏㄢˋ","pronunciations_list":"hàn","radical":"三点水","strokes":"5","wuxing":"水","structure":"左右结构","traditional":"漢","traditional_strokes":"14","kangxi_strokes":"15","unicode":"U+6C49","stroke_order":"点、点、提、横撇、捺","query_count":1,"definitions":["[hàn] 1. 中国主体民族:汉族、汉人。","[hàn] 2. 中国古代朝代名,公元前206年-公元220年,由刘邦建立:汉代、西汉。","[hàn] 3. 指银河:银汉、云汉。","[hàn] 4. 男子:好汉、汉子、硬汉。","[hàn] 5. 水名,即汉水(汉江),长江最大支流。","[hàn] 6. 指汉语、汉字:英汉翻译、汉文。"],"words":["汉字","汉族","汉语","汉朝","好汉","银汉","汉江"],"idioms":["绿林好汉","气冲霄汉","楚河汉界","彪形大汉","汉官威仪","披霄决汉"],"homophones":["汗","旱","憾","撼","悍","焊","菡"],"same_radical_chars":["江","河","湖","海","流","清","溪"],"same_wuxing_chars":["江","河","波","涛","清","海","洋"]}}https://api.souxiaocha.com/apis/gateway?api=dictionaryGET https://api.souxiaocha.com/apis/gateway?api=dictionary apikey=你的API密钥&char=请填写char
GET 参数放在查询字符串中。参数值请替换为实际有效值。
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
char | string | 是 | 要查询的单个汉字,如:好、学、字等 |
{"code":200,"message":"成功","data":{"char":"汉","pronunciation":"hàn ㄏㄢˋ","pronunciations_list":"hàn","radical":"三点水","strokes":"5","wuxing":"水","structure":"左右结构","traditional":"漢","traditional_strokes":"14","kangxi_strokes":"15","unicode":"U+6C49","stroke_order":"点、点、提、横撇、捺","query_count":1,"definitions":["[hàn] 1. 中国主体民族:汉族、汉人。","[hàn] 2. 中国古代朝代名,公元前206年-公元220年,由刘邦建立:汉代、西汉。","[hàn] 3. 指银河:银汉、云汉。","[hàn] 4. 男子:好汉、汉子、硬汉。","[hàn] 5. 水名,即汉水(汉江),长江最大支流。","[hàn] 6. 指汉语、汉字:英汉翻译、汉文。"],"words":["汉字","汉族","汉语","汉朝","好汉","银汉","汉江"],"idioms":["绿林好汉","气冲霄汉","楚河汉界","彪形大汉","汉官威仪","披霄决汉"],"homophones":["汗","旱","憾","撼","悍","焊","菡"],"same_radical_chars":["江","河","湖","海","流","清","溪"],"same_wuxing_chars":["江","河","波","涛","清","海","洋"]}}查询单个汉字的详细信息,包括读音、部首、笔画、五行、结构、基本解释、组词、成语、同音字、同部首字、同五行字等。
https://api.souxiaocha.com/apis/gateway?api=dictionary
GET / POST(业务参数 GET 通过 URL 传递,POST 支持表单或 JSON)
调用需携带平台密钥(用户中心「令牌管理」获取,SK- 开头):
key=SK-你的密钥X-API-Key: SK-你的密钥| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| char | string | 是 | 要查询的单个汉字,如:好、学、字等 |
[
{"name": "char", "type": "string", "required": true, "description": "要查询的单个汉字,如:好、学、字等"}
]
成功返回示例:
{"code":200,"message":"成功","data":{"char":"汉","pronunciation":"hàn ㄏㄢˋ","pronunciations_list":"hàn","radical":"三点水","strokes":"5","wuxing":"水","structure":"左右结构","traditional":"漢","traditional_strokes":"14","kangxi_strokes":"15","unicode":"U+6C49","stroke_order":"点、点、提、横撇、捺","query_count":1,"definitions":["[hàn] 1. 中国主体民族:汉族、汉人。","[hàn] 2. 中国古代朝代名,公元前206年-公元220年,由刘邦建立:汉代、西汉。","[hàn] 3. 指银河:银汉、云汉。","[hàn] 4. 男子:好汉、汉子、硬汉。","[hàn] 5. 水名,即汉水(汉江),长江最大支流。","[hàn] 6. 指汉语、汉字:英汉翻译、汉文。"],"words":["汉字","汉族","汉语","汉朝","好汉","银汉","汉江"],"idioms":["绿林好汉","气冲霄汉","楚河汉界","彪形大汉","汉官威仪","披霄决汉"],"homophones":["汗","旱","憾","撼","悍","焊","菡"],"same_radical_chars":["江","河","湖","海","流","清","溪"],"same_wuxing_chars":["江","河","波","涛","清","海","洋"]}}
失败返回示例:
{"code":400,"message":"请提供单个汉字","data":null}
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | integer | 状态码,200表示成功 |
| messag | string | 状态信息 |
| data.character | string | 查询的汉字 |
| data.pronunciation | string | 读音(拼音和注音),多音字用换行分隔 |
| data.pronunciations_list | string | 所有读音列表(拼音),逗号分隔 |
| data.radical | string | 部首 |
| data.strokes | string | 总笔画数 |
| data.wuxing | string | 五行属性 |
| data.structure | string | 结构(左右结构、上下结构等) |
| data.traditional | string | 繁体字写法 |
| data.traditional_strokes | string | 繁体字笔画数 |
| data.kangxi_strokes | string | 康熙字典笔画数 |
| data.unicode | string | Unicode编码 |
| data.stroke_order | string | 笔顺 |
| data.definitions | array | 基本解释列表,多音字用[读音]标注 |
| data.words | array | 常用组词列表 |
| data.idioms | array | 相关成语列表 |
| data.homophones | array | 同音字列表 |
| data.same_radical_chars | array | 同部首字列表 |
| data.same_wuxing_chars | array | 同五行字列表 |
curl "https://api.souxiaocha.com/apis/gateway?api=dictionary?key=SK-你的密钥&char=%E5%A5%BD"
上游业务级错误:
| code | msg | 描述 |
|---|---|---|
| 400 | 参数错误(缺少char参数、非单个汉字、非有效汉字) | |
| 400 | 查询内容包含受限词汇 |
平台级错误(errcode):11001 缺少密钥 / 11002 密钥无效或已禁用 / 11005 接口禁用 / 11006 接口维护 / 11010 积分不足 / 11018 请求方式不允许。
失败时请以响应体中的 code / errcode 与 msg 判断。
2026-09-24
curl "https://api.souxiaocha.com/apis/gateway?api=dictionary?key=SK-你的密钥&char=%E5%A5%BD"
// 结果将在此处显示