百度智能云卡证文字识别API文档 - 营业执照识别
文档简介:
接口描述:
支持对不同版式营业执照的证件编号、社会信用代码、单位名称、地址、法人、类型、成立日期、有效日期、经营范围等关键字段进行结构化识别。
在线调试:
您可以在 示例代码中心 中调试该接口,可进行签名验证、查看在线调用的请求内容和返回结果、示例代码的自动生成。
【百度智能云】通用场景文字识别
【百度智能云】卡证文字识别
【百度智能云】财务票据文字识别
【百度智能云】医疗票据文字识别
【百度智能云】交通场景文字识别
【百度智能云】教育场景文字识别
【百度智能云】其他场景文字识别
【百度智能云】iOCR自定义模板文字识别
【百度智能云】通用文字识别(标准版)
【百度智能云】通用文字识别(高精度版)
【百度智能云】网络图片文字识别
【百度智能云】手写文字识别
【百度智能云】门脸文字识别
接口描述
支持对不同版式营业执照的证件编号、社会信用代码、单位名称、地址、法人、类型、成立日期、有效日期、经营范围等关键字段进行结构化识别。
在线调试
您可以在 示例代码中心 中调试该接口,可进行签名验证、查看在线调用的请求内容和返回结果、示例代码的自动生成。
请求说明
请求示例
HTTP 方法: POST
请求URL: https://aip.baidubce.com/rest/2.0/ocr/v1/business_license
URL参数:
参数 | 值 |
---|---|
access_token | 通过API Key和Secret Key获取的access_token,参考“Access Token获取” |
Header如下:
参数 | 值 |
---|---|
Content-Type | application/x-www-form-urlencoded |
Body中放置请求参数,参数详情如下:
请求参数
参数 | 类型 | 是否必须 | 说明 |
---|---|---|---|
image | string | 和url二选一 | 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式 |
url | string | 和image二选一 |
图片完整URL,URL长度不超过1024字节,URL对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,当image字段存在时url字段失效 请注意关闭URL防盗链 |
accuracy | string | 否 | 此参数新版本无需传,可选值:normal,high |
risk_warn | string | 否 |
是否开启风险类型功能,默认不开启,即:false。 - false:不开启 - true:开启 |
请求代码示例
提示一:使用示例代码前,请记得替换其中的示例Token、图片地址或Base64信息。
提示二:部分语言依赖的类或库,请在代码注释中查看下载地址。
curl -i -k 'https://aip.baidubce.com/rest/2.0/ocr/v1/business_license?access_token=
【调用鉴权接口获取的token】' --data 'image=【图片Base64编码,需UrlEncode】' -H '
Content-Type:application/x-www-form-urlencoded'
返回说明
返回参数
参数 | 是否必须 | 类型 | 说明 |
---|---|---|---|
log_id | 是 | uint64 | 请求标识码,随机数,唯一。 |
direction | 是 | uint32 |
图像方向。 - - 1:未定义, - 0:正向, - 1:逆时针90度, - 2:逆时针180度, - 3:逆时针270度 |
risk_type | 否 | string | 当输入参数 risk_warn=true 时返回识出的营业执照的类型:normal-正常营业执照;copy-复印件;screen-翻拍;scan-扫描 |
words_result_num | 是 | uint32 | 识别结果数,表示words_result的元素个数 |
words_result | 是 | object | 识别结果 |
+ location | 是 | object | 位置数组(坐标0点为左上角) |
++ left | 是 | uint32 | 表示定位位置的长方形左上顶点的水平坐标 |
++ top | 是 | uint32 | 表示定位位置的长方形左上顶点的垂直坐标 |
++ width | 是 | uint32 | 表示定位位置的长方形的宽度 |
++ height | 是 | uint32 | 表示定位位置的长方形的高度 |
+ words | 否 | string | 识别结果字符串 |
返回示例
{ "words_result": { "经营范围": { "location": { "top": 589, "left": 381, "width": 90, "height": 19 },
"words": "商务服务业" }, "组成形式": { "location": { "top": -1, "left": -1, "width": 0, "height": 0 },
"words": "无" }, "法人": { "location": { "top": 537, "left": 381, "width": 36, "height": 19 },
"words": "方平" }, "证件编号": { "location": { "top": 218, "left": 302, "width": 140, "height": 15 },
"words": "921MA190538210301" }, "注册资本": { "location": { "top": 431, "left": 1044, "width": 152,
"height": 21 }, "words": "200万元" }, "单位名称": { "location": { "top": 431, "left": 384, "width": 71,
"height": 20 }, "words": "有限公司" }, "有效期": { "location": { "top": 536, "left": 1044, "width": 198,
"height": 20 }, "words": "长期" }, "社会信用代码": { "location": { "top": 300, "left": 241, "width": 156,
"height": 16 }, "words": "10440119MA06M85" }, "实收资本": { "location": { "top": -1, "left": -1, "width"
: 0, "height": 0 }, "words": "无" }, "有效期起始日期": { "location": { "top": 536, "left": 1044, "width":
198, "height": 20 }, "words": "2019年01月01日" }, "核准日期": { "location": { "top": 884, "left": 1188,
"width": 199, "height": 22 }, "words": "2019年01月01日" }, "成立日期": { "location": { "top": 484, "left":
1043, "width": 126, "height": 19 }, "words": "2019年01月01日" }, "税务登记号": { "location": { "top": -1,
"left": -1, "width": 0, "height": 0 }, "words": "无" }, "地址": { "location": { "top": 588, "left": 1043,
"width": 55, "height": 22 }, "words": "广州市" }, "登记机关": { "location": { "top": 0, "left": 0, "width":
0, "height": 0 }, "words": "无" }, "类型": { "location": { "top": 484, "left": 382, "width": 258, "height":
20 }, "words": "有限责任公司(自然人投资或控股)" } }, "direction": 0, "words_result_num": 16,
"log_id": "3166723741167575145" }