{
    "openapi": "3.0.0",
    "info": {
        "title": "身份证归属地 - API文档",
        "version": "1.0.0",
        "description": "通过身份证号码前六位查询归属地（发证地）、证号完整时返回生日、生肖、星座、性别信息。15位的身份证号自动转换为18位。"
    },
    "servers": [
        {
            "url": "https:\/\/apis.tianapi.com"
        }
    ],
    "paths": {
        "\/sfz\/index": {
            "get": {
                "summary": "身份证归属地",
                "tags": [
                    "身份证归属地"
                ],
                "description": "根据身份证号编码规则查询归属地等信息",
                "parameters": [
                    {
                        "name": "key",
                        "in": "query",
                        "description": "API密钥",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "description": "API密钥"
                        }
                    },
                    {
                        "name": "idcard",
                        "in": "query",
                        "description": "完整证号或前六位",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "example": "421121195205201619",
                            "description": "完整证号或前六位"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "age": {
                                            "type": "int",
                                            "example": "69",
                                            "description": "年龄"
                                        },
                                        "sex": {
                                            "type": "string",
                                            "example": "男",
                                            "description": "性别"
                                        },
                                        "zodiac": {
                                            "type": "string",
                                            "example": "龙",
                                            "description": "生肖"
                                        },
                                        "address": {
                                            "type": "string",
                                            "example": "湖北省黄冈市团风县",
                                            "description": "发证地"
                                        },
                                        "xingzuo": {
                                            "type": "string",
                                            "example": "金牛座",
                                            "description": "星座"
                                        },
                                        "birthday": {
                                            "type": "string",
                                            "example": "1952-05-20",
                                            "description": "生日"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "age": 69,
                                        "sex": "男",
                                        "zodiac": "龙",
                                        "address": "湖北省黄冈市团风县",
                                        "xingzuo": "金牛座",
                                        "birthday": "1952-05-20"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "summary": "身份证归属地",
                "tags": [
                    "身份证归属地"
                ],
                "description": "根据身份证号编码规则查询归属地等信息",
                "requestBody": {
                    "content": {
                        "application\/x-www-form-urlencoded": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "key": {
                                        "type": "string",
                                        "description": "API密钥"
                                    },
                                    "idcard": {
                                        "type": "string",
                                        "example": "421121195205201619",
                                        "description": "完整证号或前六位"
                                    }
                                },
                                "required": [
                                    "key",
                                    "idcard"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "成功响应",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "age": {
                                            "type": "int",
                                            "example": "69",
                                            "description": "年龄"
                                        },
                                        "sex": {
                                            "type": "string",
                                            "example": "男",
                                            "description": "性别"
                                        },
                                        "zodiac": {
                                            "type": "string",
                                            "example": "龙",
                                            "description": "生肖"
                                        },
                                        "address": {
                                            "type": "string",
                                            "example": "湖北省黄冈市团风县",
                                            "description": "发证地"
                                        },
                                        "xingzuo": {
                                            "type": "string",
                                            "example": "金牛座",
                                            "description": "星座"
                                        },
                                        "birthday": {
                                            "type": "string",
                                            "example": "1952-05-20",
                                            "description": "生日"
                                        }
                                    }
                                },
                                "example": {
                                    "msg": "success",
                                    "code": 200,
                                    "result": {
                                        "age": 69,
                                        "sex": "男",
                                        "zodiac": "龙",
                                        "address": "湖北省黄冈市团风县",
                                        "xingzuo": "金牛座",
                                        "birthday": "1952-05-20"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}