{
    "openapi": "3.0.0",
    "info": {
        "title": "汉语拆字查询 - API文档",
        "version": "1.0.0",
        "description": "本接口支持汉字查部首，也可以根据部首结构查汉字。适合一些只认识字不知道读音的场景使用，例如“鸬”字，输入“卢 鸟”即可查询。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/chaizi\/index": {
            "get": {
                "summary": "查询汉语拆字信息",
                "tags": [
                    "汉语拆字查询"
                ],
                "description": "汉字部首分拆正向或逆向查询",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "description": "部首查汉字0、汉字查部首1",
                        "required": false,
                        "schema": {
                            "type": "int",
                            "example": 0,
                            "description": "部首查汉字0、汉字查部首1"
                        }
                    },
                    {
                        "name": "word",
                        "in": "query",
                        "description": "完整部首（空格分隔）或单个汉字",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "山 合",
                            "description": "完整部首（空格分隔）或单个汉字"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "texts": {
                                            "type": "string",
                                            "example": "峆",
                                            "description": "查询结果"
                                        },
                                        "words": {
                                            "type": "string",
                                            "example": "山 合",
                                            "description": "查询内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "texts": "峆",
                                                "words": "山 合"
                                            },
                                            {
                                                "texts": "峇",
                                                "words": "山 合"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "查询汉语拆字信息",
                "tags": [
                    "汉语拆字查询"
                ],
                "description": "汉字部首分拆正向或逆向查询",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "type": {
                                        "type": "int",
                                        "example": 0,
                                        "description": "部首查汉字0、汉字查部首1"
                                    },
                                    "word": {
                                        "type": "string",
                                        "example": "山 合",
                                        "description": "完整部首（空格分隔）或单个汉字"
                                    }
                                },
                                "required": [
                                    "key",
                                    "word"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "texts": {
                                            "type": "string",
                                            "example": "峆",
                                            "description": "查询结果"
                                        },
                                        "words": {
                                            "type": "string",
                                            "example": "山 合",
                                            "description": "查询内容"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "list": [
                                            {
                                                "texts": "峆",
                                                "words": "山 合"
                                            },
                                            {
                                                "texts": "峇",
                                                "words": "山 合"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}