通用文字识别(标准版)
表格文字识别
通用文字识别(高精度版)
手写文字识别
高精度含位置版
请求Header:
名称 | 值 | |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
image | 和 url/pdf_file 三选一 | string | 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 | |
url | 和 image/pdf_file 三选一 | string | 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,优先级:image > url > pdf_file,当image字段存在时,url字段失效 | |
pdf_file | 和 image/pdf_file 三选一 | string | PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 | |
pdf_file_num | 否 | string | 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 | |
language_type | 否 | string | 识别语言类型,默认为CHN_ENG 可选值包括:CHN_ENG:中英文混合, ENG:英文, JAP:日语, KOR:韩语 , FRE:法语 , SPA:西班牙语 , POR:葡萄牙语, GER:德语, ITA:意大利语, RUS:俄语 | |
detect_direction | 否 | string | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: true:检测朝向; false:不检测朝向。 | |
detect_language | 否 | string | 是否检测语言,默认不检测,即:false。当前支持中文、英语、日语、韩语 | |
paragraph | 否 | string | 是否输出段落信息(true/false) | |
probability | 否 | string | 是否返回识别结果中每一行的置信度(true/false) |
请求代码示例:
curl -k -i -d "key=key&image=&url=http%3A%2F%2Fwww.juhe.cn&pdf_file=&pdf_file_num=&language_type=&detect_direction=&detect_language=¶graph=&probability=" "http://apis.juhe.cn/verify_word/general_basic"
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
error_code | int | 状态码 | |
reason | string | 状态提示 | |
result.orderid | stirng | 流水号 | |
result.data | json | 返回结果 | |
words_result_num | uint32 | (必选)识别结果数,表示words_result的元素个数 | |
words_result | array[] | (必选)识别结果数组 | |
+ words | string | (非必选)识别结果字符串 | |
+ probability | object | (非必选)识别结果中每一行的置信度值,包含average:行置信度平均值, | |
direction | int32 | (非必选)图像方向,当 detect_direction=true 时返回该字段。 1:未定义,0:正向, 1:逆时针90度, 2:逆时针180度, 3:逆时针270度;variance:行置信度方差,min:行置信度最小值,当 probability=true 时返回该字段 | |
paragraphs_result | array[] | (非必选)段落检测结果,当 paragraph=true 时返回该字段 | |
+ words_result_idx | array[] | (非必选)一个段落包含的行序号,当 paragraph=true 时返回该字段 | |
paragraphs_result_num | uint32 | (非必选)识别结果数,表示 paragraphs_result的元素个数,当 paragraph=true 时返回该字段 | |
language | int32 | (非必选)语种类型,当 detect_language=true 时返回该字段。 1:未定义, 0:英文, 1:日文, 2:韩文, 3:中文 | |
pdf_file_size | string | (非必选)传入PDF文件的总页数,当 pdf_file 参数有效时返回该字段 |
JSON返回示例:JSON在线格式化工具 >
{
"reason":"成功",
"result":{
"data":{
"words_result":[
{
"words":"这是一段文字"
},
{
"words":"这也是一段文字"
},
{
"words":"这还是一段文字"
}
],
"words_result_num":3
},
"orderid":"JH753230217110701366301cA"
},
"error_code":0
}
请求Header:
名称 | 值 | |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
image | 和 url/pdf_file 三选一 | string | 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 | |
url | 和 image/pdf_file 三选一 | string | 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,优先级:image > url > pdf_file,当image字段存在时,url字段失效 | |
pdf_file | 和 image/pdf_file 三选一 | string | PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 | |
pdf_file_num | 否 | string | 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 | |
cell_contents | 否 | string | 是否输出单元格文字位置信息 ; false: 默认值,仅输出单元格行列信息及四角点坐标,不输出单元格内文字位置信息; true: 输出单元格内文字的外接四边形四角点坐标,若文字折行,则分行分别输出 |
请求代码示例:
curl -k -i -d "key=key&image=&url=http%3A%2F%2Fwww.juhe.cn&pdf_file=&pdf_file_num=&cell_contents=" "http://apis.juhe.cn/verify_word/table"
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
error_code | int | 状态码 | |
reason | string | 状态提示 | |
result.orderid | stirng | 流水号 | |
result.data | json | 返回结果 | |
words_result_num | uint32 | (必选)识别结果数,表示words_result的元素个数 | |
table_num | int | (必选)检测到的表格数量 | |
tables_result | array[] | (必选)表格内容 | |
table_location | array[] | (必选)单个表格的四角点x,y坐标 | |
header | array[] | (必选)表头信息 | |
+ location | array[] | (必选)表头位置,四角点 x,y 坐标 | |
+ words | string | (必选)表头文字内容,按行拆分 | |
body | array[] | (必选)单元格信息 | |
+ cell_location | array[] | (必选)单元格四角点x,y坐标 | |
+ row_start | array[] | (必选)单元格行起始编号,横线编号从0开始 | |
+ row_end | array[] | (必选)单元格行终止编号 | |
+ col_start | array[] | (必选)单元格列起始编号,竖线编号从0开始 | |
+ col_end | array[] | (必选)单元格列终止编号 | |
+ words | string | (必选)单元格文字内容 | |
+ contents | array[] | (非必选)单元格内文字内容,分行显示,当请求参数 cell_contents = true 时返回 | |
++ poly_location | array[] | (非必选)单元格内文字各行的四角点x,y坐标 | |
++ word | string | (非必选)单元格内分行文字内容 | |
footer | array[] | (必选)表尾信息 | |
+ location | array[] | (必选)表尾位置,四角点 x,y 坐标 | |
+ words | string | (必选)表尾信息,按行拆分 | |
pdf_file_size | string | (非必选)传入PDF文件的总页数,当 pdf_file 参数有效时返回该字段 |
JSON返回示例:JSON在线格式化工具 >
{
"reason":"成功",
"result":{
"data":{
"tables_result":[
{
"header":[
],
"body":[
{
"col_end":1,
"row_end":1,
"cell_location":[
{
"x":1,
"y":0
},
{
"x":122,
"y":0
},
{
"x":122,
"y":29
},
{
"x":1,
"y":29
}
],
"row_start":0,
"col_start":0,
"words":"准确率"
},
{
"col_end":2,
"row_end":1,
"cell_location":[
{
"x":122,
"y":0
},
{
"x":237,
"y":0
},
{
"x":237,
"y":29
},
{
"x":122,
"y":29
}
],
"row_start":0,
"col_start":1,
"words":"数据更新时效"
},
{
"col_end":1,
"row_end":2,
"cell_location":[
{
"x":1,
"y":29
},
{
"x":122,
"y":29
},
{
"x":122,
"y":72
},
{
"x":1,
"y":72
}
],
"row_start":1,
"col_start":0,
"words":"99.90%"
},
{
"col_end":2,
"row_end":2,
"cell_location":[
{
"x":122,
"y":29
},
{
"x":237,
"y":29
},
{
"x":237,
"y":72
},
{
"x":122,
"y":72
}
],
"row_start":1,
"col_start":1,
"words":"与公民中心同步"
},
{
"col_end":1,
"row_end":3,
"cell_location":[
{
"x":1,
"y":72
},
{
"x":122,
"y":72
},
{
"x":122,
"y":116
},
{
"x":1,
"y":116
}
],
"row_start":2,
"col_start":0,
"words":""
},
{
"col_end":2,
"row_end":3,
"cell_location":[
{
"x":122,
"y":72
},
{
"x":237,
"y":72
},
{
"x":237,
"y":116
},
{
"x":122,
"y":116
}
],
"row_start":2,
"col_start":1,
"words":""
}
],
"table_location":[
{
"x":1,
"y":0
},
{
"x":237,
"y":0
},
{
"x":237,
"y":116
},
{
"x":1,
"y":116
}
],
"footer":[
]
}
],
"table_num":1
},
"orderid":"JH753230217131854913225lS"
},
"error_code":0
}
请求Header:
名称 | 值 | |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
image | 和 url/pdf_file 三选一 | string | 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 | |
url | 和 image/pdf_file 三选一 | string | 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,优先级:image > url > pdf_file,当image字段存在时,url字段失效 | |
pdf_file | 和 image/pdf_file 三选一 | string | PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 | |
pdf_file_num | 否 | string | 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 | |
language_type | 否 | string | 识别语言类型,默认为CHN_ENG 可选值包括:auto_detect:自动检测语言,并识别,CHN_ENG:中英文混合, ENG:英文, JAP:日语, KOR:韩语 , FRE:法语 , SPA:西班牙语 , POR:葡萄牙语, GER:德语, ITA:意大利语, RUS:俄语,DAN:丹麦语,DUT:荷兰语, MAL:马来语,SWE:瑞典语,IND:印尼语,POL:波兰语,ROM:罗马尼亚语,TUR:土耳其语,GRE:希腊语,HUN:匈牙利语,THA:泰语,VIE:越南语,ARA:阿拉伯语,HIN:印地语 | |
detect_direction | 否 | string | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: true:检测朝向; false:不检测朝向。 | |
paragraph | 否 | string | 是否输出段落信息(true/false) | |
probability | 否 | string | 是否返回识别结果中每一行的置信度(true/false) |
请求代码示例:
curl -k -i -d "key=key&image=&url=http%3A%2F%2Fwww.juhe.cn&pdf_file=&pdf_file_num=&language_type=&detect_direction=¶graph=&probability=" "http://apis.juhe.cn/verify_word/accurate_basic"
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
error_code | int | 状态码 | |
reason | string | 状态提示 | |
result.orderid | stirng | 流水号 | |
result.data | json | 返回结果 | |
words_result_num | uint32 | (必选)识别结果数,表示words_result的元素个数 | |
words_result | array[] | (必选)识别结果数组 | |
+ words | string | (非必选)识别结果字符串 | |
+ probability | object | (非必选)识别结果中每一行的置信度值,包含average:行置信度平均值,variance:行置信度方差,min:行置信度最小值,当 probability=true 时返回该字段 | |
direction | int32 | (非必选)图像方向,当 detect_direction=true 时返回该字段。 1:未定义,0:正向, 1:逆时针90度, 2:逆时针180度, 3:逆时针270度;variance:行置信度方差,min:行置信度最小值,当 probability=true 时返回该字段 | |
paragraphs_result | array[] | (非必选)段落检测结果,当 paragraph=true 时返回该字段 | |
+ words_result_idx | array[] | (非必选)一个段落包含的行序号,当 paragraph=true 时返回该字段 | |
paragraphs_result_num | uint32 | (非必选)识别结果数,表示 paragraphs_result的元素个数,当 paragraph=true 时返回该字段 | |
pdf_file_size | string | (非必选)传入PDF文件的总页数,当 pdf_file 参数有效时返回该字段 |
JSON返回示例:JSON在线格式化工具 >
{
"reason":"成功",
"result":{
"data":{
"words_result":[
{
"words":"这是一段文字"
},
{
"words":"这也是一段文字"
},
{
"words":"这还是一段文字"
}
],
"words_result_num":3
},
"orderid":"JH753230217132531840505l5"
},
"error_code":0
}
请求Header:
名称 | 值 | |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
image | 和 url/pdf_file 三选一 | string | 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 | |
url | 和 image/pdf_file 三选一 | string | 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,优先级:image > url > pdf_file,当image字段存在时,url字段失效 | |
pdf_file | 和 image/pdf_file 三选一 | string | PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 | |
pdf_file_num | 否 | string | 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 | |
recognize_granularity | 否 | string | 是否定位单字符位置,big:不定位单字符位置,默认值;small:定位单字符位置 | |
probability | 否 | string | 是否返回识别结果中每一行的置信度(true/false) | |
detect_direction | 否 | string | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: true:检测朝向; false:不检测朝向。 |
请求代码示例:
curl -k -i -d "key=key&image=&url=http%3A%2F%2Fwww.juhe.cn&pdf_file=&pdf_file_num=&recognize_granularity=&probability=&detect_direction=" "http://apis.juhe.cn/verify_word/handwriting"
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
error_code | int | 状态码 | |
reason | string | 状态提示 | |
result.orderid | stirng | 流水号 | |
result.data | json | 返回结果 | |
words_result_num | uint32 | (必选)识别结果数,表示words_result的元素个数 | |
words_result | array[] | (必选)识别结果数组 | |
+ location | object | (必选)位置数组(坐标0点为左上角) | |
++ left | uint32 | (必选)表示定位位置的长方形左上顶点的水平坐标 | |
++ top | uint32 | (必选)表示定位位置的长方形左上顶点的垂直坐标 | |
++ width | uint32 | (必选)表示定位位置的长方形的宽度 | |
++ height | uint32 | (必选)表示定位位置的长方形的高度 | |
+ words | string | (必选)识别结果字符串 | |
+ chars | array[] | (非必选)单字符结果,当 recognize_granularity=small 时存返回该字段 | |
++ char | string | (非必选)单字符识别结果 | |
++ candidates | array[] | (非必选)单字符识别结果的候选词内容 | |
+++ word | string | (非必选)单字符识别结果的候选词文字 | |
+++ prob | string | (非必选)单字符识别结果的候选词置信度 | |
++ location | object | (非必选)位置数组(坐标0点为左上角) | |
+++ left | uint32 | (非必选)表示定位位置的长方形左上顶点的水平坐标 | |
+++ top | uint32 | (非必选)表示定位位置的长方形左上顶点的垂直坐标 | |
+++ width | uint32 | (非必选)表示定位定位位置的长方形的宽度 | |
+++ height | uint32 | (非必选)表示位置的长方形的高度 | |
probability | object | (非必选)当 probability=true 时返回该字段,表示识别结果中每一行的置信度值,包含:average: 行置信度平均值,variance:行置信度方差,min:行置信度最小值 | |
direction | int32 | (非必选)图像方向,当 detect_direction=true 时返回该字段。 1:未定义,0:正向, 1:逆时针90度, 2:逆时针180度, 3:逆时针270度; | |
pdf_file_size | string | (非必选)传入PDF文件的总页数,当 pdf_file 参数有效时返回该字段 |
JSON返回示例:JSON在线格式化工具 >
{
"reason":"成功",
"result":{
"data":{
"words_result":[
{
"location":{
"top":2,
"left":73,
"width":49,
"height":20
},
"words":"AIt"
},
{
"location":{
"top":9,
"left":263,
"width":56,
"height":42
},
"words":"Fn"
},
{
"location":{
"top":65,
"left":808,
"width":69,
"height":39
},
"words":"Ctrl"
},
{
"location":{
"top":124,
"left":1030,
"width":31,
"height":26
},
"words":"+"
},
{
"location":{
"top":863,
"left":86,
"width":672,
"height":188
},
"words":"我是手写文字"
},
{
"location":{
"top":1103,
"left":79,
"width":784,
"height":263
},
"words":"我也是手写文字"
}
],
"words_result_num":6
},
"orderid":"JH753230217133722208147RT"
},
"error_code":0
}
请求Header:
名称 | 值 | |
---|---|---|
Content-Type | application/x-www-form-urlencoded |
请求参数说明:
名称 | 必填 | 类型 | 说明 | |
---|---|---|---|---|
key | 是 | string | 在个人中心->我的数据,接口名称上方查看 | |
image | 和 url/pdf_file 三选一 | string | 图像数据,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,优先级:image > url > pdf_file,当image字段存在时,url、pdf_file字段失效 | |
url | 和 image/pdf_file 三选一 | string | 图片完整url,url长度不超过1024字节,url对应的图片base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/jpeg/png/bmp格式,优先级:image > url > pdf_file,当image字段存在时,url字段失效 | |
pdf_file | 和 image/pdf_file 三选一 | string | PDF文件,base64编码后进行urlencode,要求base64编码和urlencode后大小不超过4M,最短边至少15px,最长边最大4096px,优先级:image > url > pdf_file,当image、url字段存在时,pdf_file字段失效 | |
pdf_file_num | 否 | string | 需要识别的PDF文件的对应页码,当 pdf_file 参数有效时,识别传入页码的对应页面内容,若不传入,则默认识别第 1 页 | |
eng_granularity | 否 | string | word/letter,表示识别语言类型为「中英文(CHN_ENG)」的情况下,英文的单字符结果是按照单词(word)维度输出还是字母(letter)维度输出,当 recognize_granularity=small 时生效 | |
recognize_granularity | 否 | string | big/small,是否定位单字符位置,big:不定位单字符位置,默认值;small:定位单字符位置 | |
vertexes_location | 否 | string | true/false,是否返回文字外接多边形顶点位置,不支持单字位置。默认为false | |
paragraph | 否 | string | true/false,是否输出段落信息 | |
probability | 否 | string | 是否返回识别结果中每一行的置信度(true/false) | |
detect_direction | 否 | string | 是否检测图像朝向,默认不检测,即:false。朝向是指输入图像是正常方向、逆时针旋转90/180/270度。可选值包括: true:检测朝向; false:不检测朝向。 |
请求代码示例:
curl -k -i "http://apis.juhe.cn/verify_word/accurate?key=key&image=&url=http%3A%2F%2Fwww.juhe.cn&pdf_file=&pdf_file_num=&eng_granularity=&recognize_granularity=&vertexes_location=¶graph=&probability=&detect_direction="
返回参数说明:
名称 | 类型 | 说明 | |
---|---|---|---|
error_code | int | 状态码 | |
reason | string | 状态提示 | |
result.orderid | stirng | 流水号 | |
result.data | json | 返回结果 | |
direction | int32 | (非必需)图像方向,当 detect_direction=true 时返回该字段。1:未定义,0:正向,1:逆时针90度,2:逆时针180度,3:逆时针270度 | |
words_result_num | uint32 | (必需)识别结果数,表示words_result的元素个数 | |
words_result | array[] | (必需)识别结果数组 | |
+ words | string | 否 识别结果字符串 | |
+ location | array[] | (必需)位置数组(坐标0点为左上角) | |
++ left | uint32 | (必需)表示定位位置的长方形左上顶点的水平坐标 | |
++ top | uint32 | (必需)表示定位位置的长方形左上顶点的垂直坐标 | |
++ width | uint32 | (必需)表示定位位置的长方形的宽度 | |
++ height | uint32 | (必需)表示定位位置的长方形的高度 | |
+ chars | array[] | (非必需)单字符结果,当 recognize_granularity=small 时返回该字段 | |
++ char | string | (非必需)单字符识别结果,当 recognize_granularity=small 时返回该字段 | |
++ location | array[] | (非必需)位置数组(坐标0点为左上角),当 recognize_granularity=small 时返回该字段 | |
+++ left | uint32 | (非必需)表示定位位置的长方形左上顶点的水平坐标,当 recognize_granularity=small 时返回该字段 | |
+++ top | uint32 | (非必需)表示定位位置的长方形左上顶点的垂直坐标,当 recognize_granularity=small 时返回该字段 | |
+++ width | uint32 | (非必需)表示定位定位位置的长方形的宽度,当 recognize_granularity=small 时返回该字段 | |
+++ height | uint32 | (非必需)表示定位位置的长方形的高度,当 recognize_granularity=small 时返回该字段 | |
+ probability | object | (非必需)识别结果中每一行的置信度值,包含average:行置信度平均值,variance:行置信度方差,min:行置信度最小值,当 probability=true 时返回该字段 | |
+ vertexes_location | array[] | (非必需)识别结果中每一行的外包四边形点坐标,当 vertexes_location=true 时返回该字段 | |
++ x | uint32 | (非必需)水平坐标(坐标0点为左上角) | |
++ y | uint32 | (非必需)垂直坐标(坐标0点为左上角) | |
+ finegrained_vertexes_location | array[] | (非必需)识别结果中每一行的多边形轮廓点坐标,当 vertexes_location=true 时返回该字段 | |
++ x | uint32 | (非必需)水平坐标(坐标0点为左上角) | |
++ y | uint32 | (非必需)垂直坐标(坐标0点为左上角) | |
+ min_finegrained_vertexes_location | array[] | (非必需)表示 finegrained_poly_location对应的最小外包矩形点坐标,当 vertexes_location=true 时返回该字段 | |
++ x | uint32 | (非必需)水平坐标(坐标0点为左上角) | |
++ y | uint32 | (非必需)垂直坐标(坐标0点为左上角) | |
paragraphs_result_num | uint32 | (非必需)识别结果数,表示 paragraphs_result的元素个数,当 paragraph=true 时返回该字段 | |
paragraphs_result | array[] | (非必需)段落检测结果,当 paragraph=true 时返回该字段 | |
+ words_result_idx | array[] | (非必需)一个段落包含的行序号,当 paragraph=true 时返回该字段 | |
+ finegrained_vertexes_location | array[] | (非必需)识别结果中每一行的多边形轮廓点坐标,当 paragraph=true && vertexes_location=true 时返回该字段 | |
++ x | uint32 | (非必需)水平坐标(坐标0点为左上角) | |
++ y | uint32 | (非必需)垂直坐标(坐标0点为左上角) | |
+ min_finegrained_vertexes_location | array[] | (非必需)识别结果中每一行的多边形轮廓点坐标,当 paragraph=true && vertexes_location=true 时返回该字段 | |
++ x | uint32 | (非必需)水平坐标(坐标0点为左上角) | |
++ y | uint32 | (非必需)垂直坐标(坐标0点为左上角) | |
pdf_file_size | string | (非必需)传入PDF文件的总页数,当 pdf_file 参数有效时返回该字段 |
JSON返回示例:JSON在线格式化工具 >
{
"reason": "成功",
"result": {
"data": {
"words_result": [
{
"words": "附件一:",
"location": {
"top": 125,
"left": 139,
"width": 54,
"height": 18
}
},
{
"words": "国家能源集团龙源电力集团股份有限公司",
"location": {
"top": 156,
"left": 267,
"width": 333,
"height": 24
}
},
{
"words": "国际核证减排量VCUs报价方案",
"location": {
"top": 199,
"left": 303,
"width": 262,
"height": 23
}
},
{
"words": "公司名称",
"location": {
"top": 238,
"left": 154,
"width": 63,
"height": 19
}
},
{
"words": "甘肃超碳咨询服务有限公司",
"location": {
"top": 242,
"left": 375,
"width": 189,
"height": 17
}
},
{
"words": "联系人",
"location": {
"top": 277,
"left": 160,
"width": 48,
"height": 18
}
},
{
"words": "范超逸",
"location": {
"top": 278,
"left": 321,
"width": 46,
"height": 18
}
},
{
"words": "联系电话",
"location": {
"top": 280,
"left": 466,
"width": 63,
"height": 18
}
},
{
"words": "15193120678",
"location": {
"top": 283,
"left": 577,
"width": 90,
"height": 16
}
},
{
"words": "甘肃省兰州市南滨",
"location": {
"top": 311,
"left": 558,
"width": 127,
"height": 18
}
},
{
"words": "E-mail",
"location": {
"top": 328,
"left": 159,
"width": 48,
"height": 16
}
},
{
"words": "admin@carbonchecking.com",
"location": {
"top": 330,
"left": 246,
"width": 193,
"height": 18
}
},
{
"words": "联系地址",
"location": {
"top": 330,
"left": 465,
"width": 63,
"height": 17
}
},
{
"words": "河东路名城广场2",
"location": {
"top": 332,
"left": 559,
"width": 125,
"height": 17
}
},
{
"words": "号楼3422室",
"location": {
"top": 354,
"left": 577,
"width": 87,
"height": 17
}
},
{
"words": "采购总量(单",
"location": {
"top": 370,
"left": 137,
"width": 93,
"height": 17
}
},
{
"words": "位:吨)",
"location": {
"top": 390,
"left": 137,
"width": 56,
"height": 17
}
},
{
"words": "2035512",
"location": {
"top": 386,
"left": 440,
"width": 57,
"height": 13
}
},
{
"words": "报价量(单",
"location": {
"top": 415,
"left": 137,
"width": 94,
"height": 17
}
},
{
"words": "2012年",
"location": {
"top": 416,
"left": 287,
"width": 47,
"height": 16
}
},
{
"words": "2013-2016年",
"location": {
"top": 419,
"left": 397,
"width": 81,
"height": 13
}
},
{
"words": "2017年及以后",
"location": {
"top": 418,
"left": 497,
"width": 88,
"height": 17
}
},
{
"words": "总计",
"location": {
"top": 418,
"left": 629,
"width": 32,
"height": 18
}
},
{
"words": "位:吨)",
"location": {
"top": 435,
"left": 137,
"width": 56,
"height": 17
}
},
{
"words": "0",
"location": {
"top": 439,
"left": 305,
"width": 12,
"height": 15
}
},
{
"words": "0",
"location": {
"top": 441,
"left": 431,
"width": 12,
"height": 14
}
},
{
"words": "0",
"location": {
"top": 442,
"left": 535,
"width": 12,
"height": 14
}
},
{
"words": "0",
"location": {
"top": 443,
"left": 639,
"width": 11,
"height": 15
}
},
{
"words": "单价(美元/",
"location": {
"top": 463,
"left": 140,
"width": 86,
"height": 17
}
},
{
"words": "2012年",
"location": {
"top": 464,
"left": 307,
"width": 45,
"height": 13
}
},
{
"words": "2013-2016年",
"location": {
"top": 466,
"left": 442,
"width": 81,
"height": 13
}
},
{
"words": "2017年及以后",
"location": {
"top": 467,
"left": 575,
"width": 87,
"height": 13
}
},
{
"words": "吨)",
"location": {
"top": 484,
"left": 166,
"width": 26,
"height": 18
}
},
{
"words": "0.2美元/吨",
"location": {
"top": 489,
"left": 287,
"width": 85,
"height": 17
}
},
{
"words": "0.7美元/吨",
"location": {
"top": 491,
"left": 440,
"width": 85,
"height": 17
}
},
{
"words": "1.4美元/吨",
"location": {
"top": 492,
"left": 576,
"width": 85,
"height": 17
}
},
{
"words": "单价是否含",
"location": {
"top": 516,
"left": 143,
"width": 78,
"height": 18
}
},
{
"words": "税",
"location": {
"top": 536,
"left": 172,
"width": 20,
"height": 21
}
},
{
"words": "回是",
"location": {
"top": 527,
"left": 362,
"width": 33,
"height": 21
}
},
{
"words": "口否",
"location": {
"top": 530,
"left": 538,
"width": 31,
"height": 18
}
},
{
"words": "是否可以开",
"location": {
"top": 565,
"left": 136,
"width": 93,
"height": 17
}
},
{
"words": "具增值税专",
"location": {
"top": 585,
"left": 135,
"width": 93,
"height": 18
}
},
{
"words": "回是,税率_",
"location": {
"top": 588,
"left": 356,
"width": 98,
"height": 17
}
},
{
"words": "3%",
"location": {
"top": 589,
"left": 463,
"width": 22,
"height": 17
}
},
{
"words": "口否",
"location": {
"top": 589,
"left": 545,
"width": 31,
"height": 17
}
},
{
"words": "用发票",
"location": {
"top": 606,
"left": 135,
"width": 47,
"height": 17
}
},
{
"words": "报价有效期",
"location": {
"top": 635,
"left": 141,
"width": 79,
"height": 17
}
},
{
"words": "至:2022年10月31日",
"location": {
"top": 637,
"left": 350,
"width": 229,
"height": 19
}
},
{
"words": "备注说明",
"location": {
"top": 663,
"left": 149,
"width": 63,
"height": 18
}
},
{
"words": "/",
"location": {
"top": 668,
"left": 462,
"width": 7,
"height": 15
}
},
{
"words": "法人代表/委托人签字:",
"location": {
"top": 701,
"left": 133,
"width": 137,
"height": 19
}
},
{
"words": "公司盖章(公章):",
"location": {
"top": 807,
"left": 160,
"width": 117,
"height": 17
}
},
{
"words": "咨询",
"location": {
"top": 761,
"left": 320,
"width": 90,
"height": 64
}
},
{
"words": "范超逸",
"location": {
"top": 728,
"left": 415,
"width": 144,
"height": 66
}
},
{
"words": "日期:2022年9月26日",
"location": {
"top": 892,
"left": 160,
"width": 171,
"height": 17
}
},
{
"words": "注:1、本报价为双方交易价格,包含税费,不包含各自承担的交易手续费。",
"location": {
"top": 943,
"left": 132,
"width": 524,
"height": 23
}
},
{
"words": "2、本报价有效期:2022年10月31日。",
"location": {
"top": 967,
"left": 162,
"width": 275,
"height": 17
}
},
{
"words": "3、VCUs最晚交割日期:2022年10月31日。",
"location": {
"top": 987,
"left": 163,
"width": 318,
"height": 19
}
},
{
"words": "4、报价量可以低于采购总量,3个时间段的报价量需按照7%、72%、21%",
"location": {
"top": 1008,
"left": 162,
"width": 521,
"height": 20
}
},
{
"words": "的比例。",
"location": {
"top": 1027,
"left": 130,
"width": 55,
"height": 18
}
}
],
"words_result_num": 60,
"pdf_file_size": 2
},
"orderid": "JH753230227140122822928M4"
},
"error_code": 0
}
服务级错误码参照(error_code):
错误码 | 说明 | |
---|---|---|
275300 | 网络错误 | |
275301 | 请求中包含非法参数,请检查后重新尝试 | |
275302 | 缺少必须的参数,请检查参数是否有遗漏 | |
275303 | 请求中某些参数过长,请检查后重新尝试 | |
275304 | 图片为空,请检查后重新尝试 | |
275305 | 上传的图片格式错误 | |
275306 | 上传的图片大小错误 | |
275307 | URL参数不存在 | |
275308 | URL格式非法 | |
275309 | url下载超时 | |
275310 | URL返回无效参数 | |
275311 | URL长度超过1024字节或为0 | |
275399 | 识别失败 |
系统级错误码参照:
错误码 | 说明 | 旧版本(resultcode) | |
---|---|---|---|
10001 | 错误的请求KEY | 101 | |
10002 | 该KEY无请求权限 | 102 | |
10003 | KEY过期 | 103 | |
10004 | 错误的OPENID | 104 | |
10005 | 应用未审核超时,请提交认证 | 105 | |
10007 | 未知的请求源 | 107 | |
10008 | 被禁止的IP | 108 | |
10009 | 被禁止的KEY | 109 | |
10011 | 当前IP请求超过限制 | 111 | |
10012 | 请求超过次数限制 | 112 | |
10013 | 测试KEY超过请求限制 | 113 | |
10014 | 系统内部异常 (调用充值类业务时,请务必联系客服或通过订单查询接口检测订单,避免造成损失) | 114 | |
10020 | 接口维护 | 120 | |
10021 | 接口停用 | 121 |
错误码格式说明(示例:200201):
2 | 002 | 01 | |
---|---|---|---|
服务级错误(1为系统级错误) | 服务模块代码(即数据ID) | 具体错误代码 |