接口地址:https://www.myshengong.com/api/openapi.Idcardvalidata/singleQuery
返回格式:JSON
请求方式:POST
请求示例:https://www.myshengong.com/api/openapi.Idcardvalidata/singleQuery?id=身份证号码
接口备注:校验身份证号码是否正确,和归属地信息,本服务并不能识别出身份证的真伪,仅依编码及格式进行识别判断
请求参数说明:
名称 | 类型 | 必填 | 默认值 | 说明 |
---|
apikey | string | 是 | 无 | 用户中心免费获取APIKEY |
id | string | 是 | 无 | 身份证号码 |
返回参数说明:
名称 | 类型 | 说明 |
---|
code | int | 1成功,0失败 |
msg | string | 返回消息 |
time | string | 时间戳 |
data | object | 返回数据 |
data.idcard | string | 查询的身份证号码 |
data.location | string | 发证地 |
data.provnce | string | 省 |
data.city | string | 市 |
data.district | string | 区/县 |
data.gender | string | 性别 |
data.birthdate | string | 出生日期 |
data.age | int | 年龄 |
data.valid | bool | 身份证是否合法,true=合法,false=不合法 |
data.validformat | string | 格式化后显示 |
返回示例:
{
"code": 1,
"msg": "查询成功",
"time": "1742797843",
"data": {
"idcard": "示例号码",
"location": "嘉禾县",
"provnce": "海南省",
"city": "海口市",
"district": "美兰区",
"gender": "女",
"birthdate": "2000-08-08",
"age": 35,
"valid": true,
"validformat": "合法"
}
}