护照OCR识别

HTTPS
传入护照照片,扫描识别护照信息
免费套餐
套餐 2
套餐 3
套餐 4
0 / 5 次

雷达评级

AA

用户规模

10 万+

产品上线

5

护照OCR识别

接口地址
https://tianyan.apistd.com/v2/passport/ocr
请求格式
multipart/form-data
响应格式
application/json
请求方法
POST
请求参数 (Query)
参数类型必须描述
keystring
string
请求 AccessKey, 请在控制台中查看
请求参数 (Body)
参数类型必须描述
filefile
file
护照照片,文件类型,file、image、url三选一
imagestring
string
图片base64字符串,file、image、url三选一
urlstring
string
图片url,file、image、url三选一
返回参数 (Body)
参数类型描述
successboolean
boolean
接口请求成功标识,true为成功,false为失败,失败情况下,会有对应描述和状态码
codenumber
number
成功为200,其它为失败状态码
msgstring
string
code对应的说明描述
dataobject
object
验证结果详细信息
order_nostring
string
订单号
resultobject
object
识别结果,该字段不为空收费,否则不收费
请求返回示例
{
  "msg": "成功",
  "success": true,
  "code": 200,
  "data": {
    "order_no": "694557636569468928",
    "result": {
      "log_id": 235509498581932800,
      "words_result": {
        "姓名": {
          "words": "张三三",
          "location": {
            "top": 53,
            "left": 124,
            "width": 36,
            "height": 11
          }
        },
        "护照签发地点": {
          "words": "青Q/INGHAI",
          "location": {
            "top": 126,
            "left": 225,
            "width": 78,
            "height": 11
          }
        },
        "签发机关": {
          "words": "山东SHANDONG",
          "location": {
            "top": 173,
            "left": 126,
            "width": 83,
            "height": 11
          }
        },
        "护照号码": {
          "words": "G06091123",
          "location": {
            "top": 20,
            "left": 266,
            "width": 75,
            "height": 12
          }
        },
        "签发日期": {
          "words": "2002**30",
          "location": {
            "top": 148,
            "left": 125,
            "width": 75,
            "height": 11
          }
        },
        "出生地点": {
          "words": "/",
          "location": {
            "top": 101,
            "left": 226,
            "width": 124,
            "height": 12
          }
        },
        "生日": {
          "words": "19751124",
          "location": {
            "top": 126,
            "left": 125,
            "width": 75,
            "height": 12
          }
        },
        "国家码": {
          "words": "CHN",
          "location": {
            "top": 19,
            "left": 169,
            "width": 21,
            "height": 8
          }
        },
        "有效期至": {
          "words": "20071229",
          "location": {
            "top": 148,
            "left": 225,
            "width": 77,
            "height": 11
          }
        },
        "姓名拼音": {
          "words": "ZHANG,SANSAN",
          "location": {
            "top": 77,
            "left": 125,
            "width": 76,
            "height": 12
          }
        },
        "性别": {
          "words": "男/M",
          "location": {
            "top": 102,
            "left": 125,
            "width": 26,
            "height": 11
          }
        }
      },
      "words_result_num": 11
    }
  }
}

传入护照照片,扫描识别身份证信息并返回

图片要求:

格式为 jpg或png,宽和⾼大于 8px,⼩于等于4000px,大小不能超过1MB