Skip to content

接口说明

版本说明

版本号说明
2026-02-13首次上线

通用 OCR 服务

shell
POST https://api.scnet.cn/api/llm/v1/ocr/recognize

1.功能介绍

​ Scnet 通用 OCR 服务,单个 API 即可集成 10 种识别能力,无需对接多个接口,一站式覆盖四大类高频识别场景,帮你高效解决文字与票据信息提取需求:

​ 【通用识别】支持通用文字识别,轻松应对各类零散文字提取场景;
​ 【个人证照】可快速识别大陆身份证、银行卡,助力身份核验与信息录入;
​ 【行业资质】支持营业执照识别,简化企业资质审核流程;
​ 【财务票据】覆盖增值税发票、出租车发票、火车票、航空行程单等多类票据,实现票据信息自动化采集。

​ 操作便捷高效,欢迎体验!具体场景列表:

类别类型
通用识别通用文字识别
个人证照大陆身份证
银行卡
行业资质营业执照
财务票据增值税发票
增值税卷票
出租车发票
火车票
航空运输电子客票行程单
机动车销售统一发票

2.请求参数

Header 参数

名称类型必填示例值
Content-Typestringmultipart/form-data
AuthorizationstringBearer

Body form参数

名称类型必填默认值描述
fileFile\需要识别的图片文件
ocrTypestring\ocrType枚举类型

识别类别与ocrType枚举对应关系如下:

类别类型ocrType枚举类型
通用识别通用文字识别GENERAL
个人证照大陆身份证ID_CARD
银行卡BANK_CARD
行业资质营业执照BUSINESS_LICENSE
财务票据增值税发票VAT_INVOICE
增值税卷票VAT_ROLL_INVOICE
出租车发票TAXI_INVOICE
火车票TRAIN_TICKET
空运输电子客票行程单AIRPORT_TICKET
机动车销售统一发票VEHICLE_SALE_INVOICE

3.响应参数

参数名称参数类型描述
codeString应答码
msgString应答信息
dataObject应答数据体
     resultArray票据识别结果

result 说明: result为票据识别信息,结构为序列化后的Json内容。结构分为两层:
第一层为多张图片结构,场景为:压缩包解压后的多张图片、PDF解析后的多张图片;
第二层为多张单据结构。

参数名称参数类型描述
resultArray原始文件处理后结果
     coordinateArray图片在原图片位置坐标(左上,左下,右下,右上),以图片左上角点为原点
     printOffsetString是否打印偏移 (0: 不偏移, 1: 偏移)
     isCopyString是否为复印件 (0: 否, 1: 是)
     pageInt页索引号,默认 0
     elementsObject票据要素识别结果

3.1 接口输出示例

点击展开/收起 JSON 数据
json
[
  {
    "imageCosPath": "/example/xxx.png",
    "result":[
      {
        "confidence": "0.98",
        "coordinate": [3, 584, 3, 1, 412, 1, 412, 584],
        "cosPath": "/example/xxx_xxx.png",
        "elements":
        {
          "Inv_Stamp_GRP":[],
          "key1": "value1",
          "key2": "value2",
          "key3": "value3"
        },
        "isCopy": "0",
        "page": 0,
        "printOffset": "0"
      }
    ]
  }
]

4.请求示例

4.1 cURL请求示例

shell
curl --location 'https://api.scnet.cn/api/llm/v1/ocr/recognize' \
--header 'Authorization: Bearer <API Key>' \
--form 'file="<filePath>"' \
--form 'ocrType="<ocrType>"'

4.2 Python请求示例

python
import requests

url = "https://api.scnet.cn/api/llm/v1/ocr/recognize"
# 替换为ocrType枚举类型 
payload = {'ocrType': '<ocrType>'}
# 替换为图片绝对路径
files=[
  ('file',('<fileName>',open('<filePath>','rb'),'image/jpeg'))
]
headers = {
   # 替换为真实授权密钥
  'Authorization': 'Bearer <API Key>',
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)

4.3 Go请求示例

go
package main

import (
	"bytes"
	"io"
	"log"
	"mime/multipart"
	"net/http"
	"os"
)

func main() {
	apiURL := "https://api.scnet.cn/api/llm/v1/ocr/recognize"
	filePath := "<filePath>"     // 替换为图片绝对路径
	ocrType := "<ocrType>"       // 替换为ocrType枚举类型                              
	bearerToken := "<API Key>"   // 替换为真实授权密钥

	file, err := os.Open(filePath)
	if err != nil {
		log.Fatalf("打开文件失败: %v", err)
	}
	defer file.Close() 

	bodyBuf := &bytes.Buffer{}
	bodyWriter := multipart.NewWriter(bodyBuf)

	fileWriter, err := bodyWriter.CreateFormFile("file", file.Name())
	if err != nil {
		log.Fatalf("创建文件表单字段失败: %v", err)
	}
	_, err = io.Copy(fileWriter, file)
	if err != nil {
		log.Fatalf("复制文件内容失败: %v", err)
	}

	err = bodyWriter.WriteField("ocrType", ocrType)
	if err != nil {
		log.Fatalf("写入ocrType字段失败: %v", err)
	}

	contentType := bodyWriter.FormDataContentType()
	err = bodyWriter.Close()
	if err != nil {
		log.Fatalf("关闭表单写入器失败: %v", err)
	}

	req, err := http.NewRequest("POST", apiURL, bodyBuf)
	if err != nil {
		log.Fatalf("构建请求失败: %v", err)
	}

	req.Header.Set("Authorization", "Bearer "+bearerToken)
	req.Header.Set("Content-Type", contentType) 

	client := &http.Client{}
	resp, err := client.Do(req)
	if err != nil {
		log.Fatalf("发送请求失败: %v", err)
	}
	defer resp.Body.Close() 

	respBody, err := io.ReadAll(resp.Body)
	if err != nil {
		log.Fatalf("读取响应体失败: %v", err)
	}
	log.Printf("接口响应状态码: %d", resp.StatusCode)
	log.Printf("接口响应内容: %s", string(respBody))
}

4.4 Nodejs请求示例

import fs from 'fs'

const API_KEY = '<API Key>'; // 替换为真实授权密钥
const FILE_PATH = '<filePath>'; // 替换为图片绝对路径


async function idCardOcrRecognize() {
    try {

        const buffer = fs.readFileSync(FILE_PATH)

        const formData = new FormData()
        formData.append(
            'file',
            new Blob([buffer]),
            'test.jpg'
        )

        // 替换为ocrType枚举类型
        formData.append('ocrType', '<ocrType>');

        const response = await fetch('https://api.scnet.cn/api/llm/v1/ocr/recognize', {
            method: 'POST',
            headers: {
                'Authorization': "'Bearer ' + API_KEY"
            },
            body: formData
        });

        if (!response.ok) {
            // 非2xx状态码,返回详细错误信息
            throw new Error(`请求失败 [状态码: ${response.status}]:${await response.text()}`);
        }
        const ocrResult = await response.json();
        console.log('✅ 身份证OCR识别成功(JPG格式):\n', JSON.stringify(ocrResult, null, 2));

    } catch (error) {
        // 捕获所有错误:文件不存在、密钥错误、网络问题、接口异常等
        console.error('❌ OCR识别失败:', error.message);
    }
}

// 执行OCR识别
idCardOcrRecognize();

5. 接口输出结果elements票据要素识别结果说明

5.1 通用文字识别

字段说明

字段Key字段Value字段描述
width985图像宽度(像素)
height1178图像高度(像素)
angle0图像旋转角度(度)
text[[]]文字识别结果
     text喜欢欣赏文字条内容
     text_class"2"文本类别标识,1是竖向文本,2是横向文本
    anglenet_class"0"角度分类标识
     x113文本块左上角X坐标
     y23文本块左上角Y坐标
     width796文本块宽度(像素)
     height44文本块高度(像素)
     pos[[113,23],[909,27],[909,72],[113,67]]  文本块四边形坐标(左上、右上、右下、左下)    
     confidences[]文字条置信度
     chars[]字符识别结果
             pos[[113,23],[909,27],[909,72],[113,67]]字符四点坐标
             text识别的字符

Json结果示例

点击展开/收起 JSON 数据
json
{
  "code": "0",
  "data": [
    {
      "result": [
        {
          "confidence": "0.9667",
          "coordinate": [
            10,
            1937,
            10,
            759,
            995,
            759,
            995,
            1937
          ],
          "elements": {
            "width": 985,
            "angle": 0,
            "text": [
              {
                "pos": [
                  [
                    113,
                    23
                  ],
                  [
                    909,
                    27
                  ],
                  [
                    909,
                    72
                  ],
                  [
                    113,
                    67
                  ]
                ],
                "confidences": [],
                "width": 796,
                "x": 113,
                "y": 23,
                "anglenet_class": "0",
                "text": "毛泽东主席闲暇时,喜欢欣赏、临摹名家碑帖,",
                "chars": [],
                "text_class": "2",
                "height": 44
              },
              {
                "pos": [
                  [
                    39,
                    87
                  ],
                  [
                    907,
                    89
                  ],
                  [
                    907,
                    133
                  ],
                  [
                    39,
                    132
                  ]
                ],
                "confidences": [],
                "width": 868,
                "x": 39,
                "y": 87,
                "anglenet_class": "0",
                "text": "书法造诣很高。 他的行草道劲奔放, 自由洒脱, 自",
                "chars": [],
                "text_class": "2",
                "height": 44
              },
              {
                "pos": [
                  [
                    37,
                    151
                  ],
                  [
                    178,
                    151
                  ],
                  [
                    178,
                    195
                  ],
                  [
                    37,
                    195
                  ]
                ],
                "confidences": [],
                "width": 140,
                "x": 37,
                "y": 151,
                "anglenet_class": "0",
                "text": "成一家。",
                "chars": [],
                "text_class": "2",
                "height": 43
              },
              {
                "pos": [
                  [
                    112,
                    216
                  ],
                  [
                    907,
                    218
                  ],
                  [
                    907,
                    262
                  ],
                  [
                    112,
                    259
                  ]
                ],
                "confidences": [],
                "width": 794,
                "x": 112,
                "y": 216,
                "anglenet_class": "0",
                "text": "有一次, 毛主席听说黄炎培先生收藏了一本东",
                "chars": [],
                "text_class": "2",
                "height": 43
              },
              {
                "pos": [
                  [
                    37,
                    280
                  ],
                  [
                    911,
                    282
                  ],
                  [
                    911,
                    326
                  ],
                  [
                    37,
                    324
                  ]
                ],
                "confidences": [],
                "width": 873,
                "x": 37,
                "y": 280,
                "anglenet_class": "0",
                "text": "晋大书法家王羲之的真迹, 兴奋极了, 迫不及待地",
                "chars": [],
                "text_class": "2",
                "height": 43
              },
              {
                "pos": [
                  [
                    35,
                    343
                  ],
                  [
                    889,
                    346
                  ],
                  [
                    889,
                    389
                  ],
                  [
                    35,
                    387
                  ]
                ],
                "confidences": [],
                "width": 853,
                "x": 35,
                "y": 343,
                "anglenet_class": "0",
                "text": "要借来看看。黄炎培当然舍不得将真迹轻易出借,",
                "chars": [],
                "text_class": "2",
                "height": 43
              },
              {
                "pos": [
                  [
                    39,
                    409
                  ],
                  [
                    906,
                    414
                  ],
                  [
                    906,
                    454
                  ],
                  [
                    39,
                    449
                  ]
                ],
                "confidences": [],
                "width": 867,
                "x": 39,
                "y": 409,
                "anglenet_class": "0",
                "text": "可是毛主席要借, 他不好意思拒绝, 于是就和主席",
                "chars": [],
                "text_class": "2",
                "height": 40
              },
              {
                "pos": [
                  [
                    36,
                    472
                  ],
                  [
                    578,
                    476
                  ],
                  [
                    578,
                    517
                  ],
                  [
                    36,
                    514
                  ]
                ],
                "confidences": [],
                "width": 541,
                "x": 36,
                "y": 472,
                "anglenet_class": "0",
                "text": "讲好: 只借一个月, 到期归还。",
                "chars": [],
                "text_class": "2",
                "height": 41
              },
              {
                "pos": [
                  [
                    112,
                    537
                  ],
                  [
                    891,
                    540
                  ],
                  [
                    891,
                    582
                  ],
                  [
                    112,
                    578
                  ]
                ],
                "confidences": [],
                "width": 778,
                "x": 112,
                "y": 537,
                "anglenet_class": "0",
                "text": "字帖借出去后,黄炎培心里老惦记着这件事。",
                "chars": [],
                "text_class": "2",
                "height": 41
              },
              {
                "pos": [
                  [
                    35,
                    600
                  ],
                  [
                    738,
                    601
                  ],
                  [
                    738,
                    645
                  ],
                  [
                    35,
                    644
                  ]
                ],
                "confidences": [],
                "width": 702,
                "x": 35,
                "y": 600,
                "anglenet_class": "0",
                "text": "要知道, 王羲之的真迹可是世间罕有呀!",
                "chars": [],
                "text_class": "2",
                "height": 43
              },
              {
                "pos": [
                  [
                    109,
                    664
                  ],
                  [
                    909,
                    668
                  ],
                  [
                    909,
                    712
                  ],
                  [
                    109,
                    708
                  ]
                ],
                "confidences": [],
                "width": 800,
                "x": 109,
                "y": 664,
                "anglenet_class": "0",
                "text": "好不容易过了一个星期, 黄炎培就给毛主席的",
                "chars": [],
                "text_class": "2",
                "height": 43
              },
              {
                "pos": [
                  [
                    36,
                    728
                  ],
                  [
                    908,
                    730
                  ],
                  [
                    908,
                    774
                  ],
                  [
                    36,
                    771
                  ]
                ],
                "confidences": [],
                "width": 871,
                "x": 36,
                "y": 728,
                "anglenet_class": "0",
                "text": "警卫室打电话, 询问主席是否看完了字帖。 值班警",
                "chars": [],
                "text_class": "2",
                "height": 43
              },
              {
                "pos": [
                  [
                    36,
                    791
                  ],
                  [
                    578,
                    793
                  ],
                  [
                    578,
                    837
                  ],
                  [
                    36,
                    835
                  ]
                ],
                "confidences": [],
                "width": 541,
                "x": 36,
                "y": 791,
                "anglenet_class": "0",
                "text": "卫员很有礼貌地告诉他还没有。",
                "chars": [],
                "text_class": "2",
                "height": 43
              },
              {
                "pos": [
                  [
                    110,
                    855
                  ],
                  [
                    909,
                    858
                  ],
                  [
                    909,
                    901
                  ],
                  [
                    110,
                    899
                  ]
                ],
                "confidences": [],
                "width": 799,
                "x": 110,
                "y": 855,
                "anglenet_class": "0",
                "text": "过了两天, 黄炎培又打电话询问, 警卫员告诉",
                "chars": [],
                "text_class": "2",
                "height": 43
              },
              {
                "pos": [
                  [
                    34,
                    919
                  ],
                  [
                    876,
                    921
                  ],
                  [
                    876,
                    965
                  ],
                  [
                    34,
                    964
                  ]
                ],
                "confidences": [],
                "width": 842,
                "x": 34,
                "y": 919,
                "anglenet_class": "0",
                "text": "他, 主席还在看, 看完了会立刻把字帖给他送去",
                "chars": [],
                "text_class": "2",
                "height": 44
              },
              {
                "pos": [
                  [
                    36,
                    984
                  ],
                  [
                    577,
                    985
                  ],
                  [
                    577,
                    1027
                  ],
                  [
                    36,
                    1026
                  ]
                ],
                "confidences": [],
                "width": 540,
                "x": 36,
                "y": 984,
                "anglenet_class": "0",
                "text": "可黄炎培总是感到心里不踏实。",
                "chars": [],
                "text_class": "2",
                "height": 41
              },
              {
                "pos": [
                  [
                    115,
                    1049
                  ],
                  [
                    911,
                    1050
                  ],
                  [
                    911,
                    1094
                  ],
                  [
                    115,
                    1092
                  ]
                ],
                "confidences": [],
                "width": 796,
                "x": 115,
                "y": 1049,
                "anglenet_class": "0",
                "text": "又过了几天, 黄炎培实在忍不住了, 就直接把",
                "chars": [],
                "text_class": "2",
                "height": 43
              },
              {
                "pos": [
                  [
                    41,
                    1113
                  ],
                  [
                    908,
                    1113
                  ],
                  [
                    908,
                    1154
                  ],
                  [
                    41,
                    1154
                  ]
                ],
                "confidences": [],
                "width": 867,
                "x": 41,
                "y": 1113,
                "anglenet_class": "0",
                "text": "电话打到了主席那儿。 电话里, 他先讲了一些其他",
                "chars": [],
                "text_class": "2",
                "height": 41
              }
            ],
            "height": 1178
          },
          "isCopy": "0",
          "page": 0,
          "printOffset": "0"
        }
      ]
    }
  ],
  "msg": "success"
}

5.2 大陆身份证

字段说明

字段Key字段Value字段描述
name张示例姓名
gender性别
nation民族
bornDate1990年9月4日出生日期
address湖南省衡东县霞流镇白村村1组11号住址
IDNumber430024199009042311公民身份号码
issueInstitution沂源县公安局签发机关
validityPeriod2013.11.16-2023.11.16有效期

Json结果示例

点击展开/收起 JSON 数据
json
{
  "code": "0",
  "data": [
    {
      "result": [
        {
          "confidence": "0.9565",
          "coordinate": [
            63,
            1704,
            63,
            92,
            2596,
            92,
            2596,
            1704
          ],
          "elements": {
            "address": "四川省攀枝花市榕树街",
            "gender": "男",
            "nation": "汉",
            "name": "王某某",
            "bornDate": "1986年12月12日",
            "IDNumber": "111222198612123333"
          },
          "isCopy": "0",
          "page": 0,
          "printOffset": "0"
        }
      ]
    }
  ],
  "msg": "success"
}

5.3 银行卡

字段说明

字段Key字段Value字段描述
bankName中国建设银行银行名称
validThru09/30有效期
cardNumber6217000730030000000卡号
cardHolder持卡人

Json结果示例

点击展开/收起 JSON 数据
json
{
  "code": "0",
  "data": [
    {
      "result": [
        {
          "confidence": "0",
          "coordinate": [
            3,
            1078,
            3,
            5,
            1576,
            5,
            1576,
            1078
          ],
          "elements": {
            "validThru": "2024/12",
            "cardNumber": "6222621370000000000",
            "bankName": "交通銀行",
            "cardHolder": "SUN LEI"
          },
          "isCopy": "0",
          "page": 0,
          "printOffset": "0"
        }
      ]
    }
  ],
  "msg": "success"
}

5.4 营业执照

字段说明

字段Key字段Value字段描述
title营业执照标题
socialCreditCode9141225973G225973G统一社会信用代码
name技术开发电子科技有限公司名称
capital陆佰壹拾万圆整注册资本
type有限责任公司(自然人投资或控股的法人独资)类型
date2003年04月28日成立日期
directorType法定代表人负责人类型
director张开发负责人
businessTerm2003年04月28日至2028年04月01日有效日期至
businessScope电子产品的技术开发, 安全生产检测检验(凭有效资质证经营)。(依法须经批准的项目,
经相关部门批准后方可开展经营活动)
经营范围
address山州市圆山路330号院307室住址

Json结果示例

点击展开/收起 JSON 数据
json
{
  "code": "0",
  "data": [
    {
      "result": [
        {
          "confidence": "0.999996770715493",
          "coordinate": [
            3,
            919,
            3,
            32,
            1246,
            32,
            1246,
            919
          ],
          "elements": {
            "date": "2003年04月28日",
            "capital": "陆佰壹拾万圆整",
            "address": "山州市圆山路330号院307室",
            "socialCreditCode": "9141225973G225973G",
            "directorType": "法定代表人",
            "director": "张开发",
            "title": "营业执照",
            "type": "有限责任公司(自然人投资或控股的法人独资)",
            "businessTerm": "2003年04月28日至2028年04月01日",
            "businessScope": "电子产品的技术开发, 安全生产检测检验(凭有效资质证经营) 。 (依法须经批准的项目, 经相关部门批准后方可开展经营活动)",
            "name": "技术开发电子科技有限公司"
          },
          "isCopy": "0",
          "page": 0,
          "printOffset": "0"
        }
      ]
    }
  ],
  "msg": "success"
}

5.5 增值税发票

字段说明

字段Key字段Value字段描述
title厦门增值税专用发票发票名称
invoiceCode3502210221发票代码
invoiceNo04727777发票号码
printedCode3502210221机打代码
printedNo04727777机打号码
checkCode校验码
machineCode499099900999机器编号
invoiceDate20220707开票日期
passwordArea03+6//8820/+688-+3>5<45-56>703+6//8820/+688-+3> 5<45-56>703+6//8
820/+688-+3>5<45-56>703+6//8820 /+688-+3>5<45-56>7
密码区
buyerName中国思味银行股份有限公司厦门市分行购方名称
buyerCode913502008520082008购方纳税人识别号
buyerAddressAndPhone厦门市思明区思明道05号05922105922购方地址及电话
buyerBankAndAccount厦门分行营业部35350035003500013500购方开户行及账号
sellerName中国厦门厦门有限公司厦门分公司销售方名称
sellerCode91350200720072007D销售方纳税人识别号
sellerAddressAndPhone厦门市思明路25号10000销售方地址及电话
sellerBankAndAccount思明厦门思明支行4100020009200020009销售方开户行及账号
preTaxTotalAmount39622.64税前合计金额
totalTaxAmount2377.36合计税额
totalAmountUpper肆万贰仟圆整价税合计(大写)
totalAmountLower42000.00价税合计(小写)
invoiceForm第三联:发票联联次
remarks备注示例备注
payee张三收款人
checker李四复核
drawer李明开票人
substitute张四代开人
goodsDetails发票商品明细
     goodsName*电信服务*增值电信服务货物服务名称
     specification规格
     unit单位
     quantity1数量
     unitPrice39622.64单价
     itemAmount39622.64金额
     taxRate6%税率
     taxAmount2377.36税额

Json结果示例

点击展开/收起 JSON 数据
json
{
  "code": "0",
  "data": [
    {
      "result": [
        {
          "confidence": "0.9699",
          "coordinate": [
            3,
            720,
            3,
            3,
            1280,
            3,
            1280,
            720
          ],
          "elements": {
            "title": "厦门增值税专用发票",
            "buyerName": "中国思明银行股份有限公司厦门市分行",
            "buyerCode": "913502008520082008",
            "buyerBankAndAccount": "厦门分行营业部35350035003500013500",
            "buyerAddressAndPhone": "厦门市思明区思明道05号05922105922",
            "invoiceCode": "3502210221",
            "invoiceNo": "04727777",
            "totalAmountLower": "42000.00",
            "totalAmountUpper": "肆万贰仟圆整",
            "invoiceDate": "20220707",
            "printedCode": "3502210221",
            "printedNo": "04727777",
            "totalTaxAmount": "2377.36",
            "preTaxTotalAmount": "39622.64",
            "sellerName": "中国厦门厦门有限公司厦门分公司",
            "sellerCode": "91350200720072007D",
            "sellerBankAndAccount": "思明厦门思明支行4100020009200020009",
            "sellerAddressAndPhone": "厦门市思明路25号10000",
            "checkCode": "",
            "remarks": "202206",
            "checker": "",
            "substitute": "",
            "payee": "",
            "goodsDetails": [
              {
                "goodsName": "*电信服务*增值电信服务",
                "unit": "项",
                "quantity": "1",
                "taxAmount": "2377.36",
                "itemAmount": "39622.64",
                "specification": "无",
                "unitPrice": "39622.64",
                "taxRate": "6%"
              }
            ],
            "drawer": "",
            "machineCode": "499099900999",
            "passwordArea": "03+6//8820/+688-+3>5<45-56>703+6//8820/+688-+3>5<45-56>703+6//8820/+688-+3>5<45-56>703+6//8820/+688-+3>5<45-56>7",
            "invoiceForm": "第三联:发票联"
          },
          "isCopy": "N",
          "page": 0,
          "printOffset": "0"
        }
      ]
    }
  ],
  "msg": "success"
}

5.6 增值税卷票

字段说明

字段Key字段Value字段描述
invoiceCode042001000000发票代码
invoiceNo21900000发票号码
printedNo21953291机打号码
invoiceDate20210608开票日期
buyerName中国餐饮费行股份有限餐饮费州分行购方名称
buyerCode201207008700087000购方纳税人识别号
sellerName江汉市江汉区老金江汉村销售方名称
sellerCode20120103MA00000000销售方纳税人识别号
totalAmountUpper肆佰圆整价税合计(大写)
totalAmountLower400.00价税合计(小写)
checkCode80069154593970000000校验码

Json结果示例

点击展开/收起 JSON 数据
json
{
  "code": "0",
  "data": [
    {
      "result": [
        {
          "confidence": "0.9718",
          "coordinate": [
            472,
            818,
            472,
            22,
            813,
            22,
            813,
            818
          ],
          "elements": {
            "buyerName": "中国餐饮费行股份有限餐饮费州分行",
            "buyerCode": "201207008700087000",
            "invoiceCode": "042001000000",
            "invoiceNo": "21900000",
            "totalAmountLower": "400.00",
            "totalAmountUpper": "肆佰圆整",
            "invoiceDate": "20210608",
            "printedNo": "21953291",
            "sellerName": "江汉市江汉区老金江汉村",
            "sellerCode": "20120103MA00000000",
            "checkCode": "80069154593970000000"
          },
          "isCopy": "N",
          "page": 0,
          "printOffset": "0"
        }
      ]
    }
  ],
  "msg": "success"
}

5.7 出租车发票

字段说明

字段Key字段Value字段描述
title北京市出租汽车专用发票标题
invoiceCode111002180218发票代码
invoiceNo55247777发票号码
vehicleNoBDA3263车号
certificateNo288888证号
date2024-06-24日期
boardingTime21:37上车时间
alightingTime21:51下车时间
amount26.80金额
actualAmount27.00实收金额

Json结果示例

点击展开/收起 JSON 数据
json
{
  "code": "0",
  "data": [
    {
      "result": [
        {
          "confidence": "0",
          "coordinate": [
            20,
            3919,
            20,
            9,
            1597,
            9,
            1597,
            3919
          ],
          "elements": {
            "title": "北京市出租汽车专用发票",
            "invoiceCode": "111002180218",
            "invoiceNo": "55247777",
            "vehicleNo": "BDA322",
            "CertificateNo": "288888",
            "date": "2024-06-24",
            "boardingTime": "21:37",
            "alightingTime": "21:51",
            "amount": "26.80",
            "actualAmount": "27.00"
          },
          "isCopy": "0",
          "page": 0,
          "printOffset": "0"
        }
      ]
    }
  ],
  "msg": "success"
}

5.8 火车票

字段说明

字段Key字段Value字段描述
ticketNo03C027012车票编号
departStation南京起始站
destinationStation上海虹桥终止站
trainNoD1021车次
departDate20220120发车日期
departTime0.265972222222222发车时间
seatPostion03车01F号座位号
seatNo一等座座次
ticketPrice48票价
passengerName梁某某旅客姓名
identifyIdTagY是否有身份证号
invoiceNo22119230671000000011发票号码
invoiceDate20220317开票日期
preTaxAmount45.28税前金额
taxRate0.06税率
taxAmount2.72税额
elecTicketNo306712A086012090014312022电子客票号
originInvoiceNo22119230671000000010原发票号码
buyerName铁路客票电子发票测试单位购买方名称
socialCreditCode91110001110AE35858统一社会信用代码
refundTagY退票标识
replaceTagY换开标识
otherInfo其他信息

Json结果示例

点击展开/收起 JSON 数据
json
{
  "code": "0",
  "data": [
    {
      "result": [
        {
          "confidence": "0.9704",
          "coordinate": [
            21,
            347,
            21,
            43,
            493,
            43,
            493,
            347
          ],
          "elements": {
            "trainNo": "G132",
            "departDate": "20171227",
            "departTime": "16:28",
            "departStation": "济南西",
            "destinationStation": "北京南",
            "ticketPrice": "314.50",
            "seatNo": "一等座",
            "passengerName": "",
            "ticketNo": "J003590",
            "otherInfo": "",
            "taxAmount": "",
            "elecTicketNo": "",
            "buyerName": "",
            "preTaxAmount": "",
            "taxRate": "",
            "invoiceDate": "",
            "socialCreditCode": "",
            "refundTag": "N",
            "replaceTag": "N",
            "invoiceNo": "",
            "identifyIdTag": "Y",
            "originInvoiceNo": "",
            "seatPostion": "03车06D号"
          },
          "isCopy": "N",
          "page": 0,
          "printOffset": "0"
        }
      ]
    }
  ],
  "msg": "success"
}

5.9 航空运输电子客票行程单

字段说明

字段Key字段Value字段描述
title电子发票(航空运输电子客票行程单)标题
domesticTag国内国内国际标识
gpBillNoGP单号
issueStatus开具状态
invoiceNo发票号码
serialNumber印刷序号
passengerName王示例旅客姓名
identifyIdNo31002197822223300身份证号码
endorsementQ|不得转签|退改收费签注
openMarkOPEN标示
refundMark退票费标示
ticketPrice1073.39票价
fuleDischarge46.87燃油附加费
civilAviationFund50民航发展基金
taxRate0.09增值税税率
taxAmount100.74增值税税额
otherTaxes0其他税费
totalAmount1270合计金额
ticketNo电子客票号码
checkCode验证码
reminderInfo销售网点代号:提示信息
insuranceCharge0保险费
salesOutletCode销售网点代号
issueUnit上海携程宏睿国际旅行社有限公司填开单位
issueDate20240801填开日期
buyerName上海这个示例数据有限公司购买方名称
taxPayerCode93436774MA234XK123纳税人识别号
airTransportRoutes行程信息
     departPlace柏林-帕西 T2始发地
     destinationPlace上海-浦东 T1目的地
     carrier东航承运人
     flightNoMU88073航班号
     seatLevelN座位等级
     departDate45504航班日期
     departTime0.666666666666667航班时间
     ticketLevelYN24AKN客票级别
     ticketEffectiveDate客票生效日期
     ticketExpirationDate客票失效日期
     freeLuggage20K免费行李

Json结果示例

点击展开/收起 JSON 数据
json
{
  "code": "0",
  "data": [
    {
      "result": [
        {
          "confidence": "0.8149",
          "coordinate": [
            7,
            490,
            7,
            10,
            996,
            10,
            996,
            490
          ],
          "elements": {
            "ticketPrice": "930.00",
            "civilAviationFund": "0.00",
            "fuleDischarge": "0.00",
            "otherTaxes": "0.00",
            "totalAmount": "980.00",
            "insuranceCharge": "0.00",
            "ticketNo": "211008868",
            "checkCode": "6152",
            "serialNumber": "31105050505",
            "passengerName": "范签转",
            "identifyIdNo": "440508199001048199",
            "issueDate": "20210521",
            "openMark": "N",
            "refundMark": "N",
            "airTransportRoutes": [
              {
                "departTime": "14:35",
                "flightNo": "",
                "destinationPlace": "",
                "seatLevel": "",
                "departPlace": "哈尔滨/H",
                "departDate": "00000000"
              }
            ]
          },
          "isCopy": "N",
          "page": 0,
          "printOffset": "1"
        }
      ]
    }
  ],
  "msg": "success"
}

5.10 机动车销售统一发票

字段说明

字段Key字段Value字段描述
title机动车销售统一发票发票名称
invoiceForm第一联:发票联发票联次
invoiceCode163163163163发票代码
invoiceNo390039发票号码
issueDate20200702开票日期
printedCode163163163163机打代码
printedNo390039机打号码
machineCode539929120039机器编号
taxControlCode0343<-1<6097D+0>>79^6<00>*9^3+72<<0534
0343<-1<6097+
税控码
buyerName中国流动服务股份有限公司
河北省分行
购方名称
buyerTaxId91130000891130000Y购方纳税人识别号
buyerCode91130000891130000Y购买方身份证或组织机构代码
vehicleType流动服务车车辆类型
brandModelNJH5045XDWW6161厂牌型号
originalPlace南京市产地
qualifiedNoYV3342001942001合格证号
importCertificateNo进口证明书号
commodityInspectionNo商检单号
engineNo1366666发动机号码
vehicleIdentificationNoLNVL9113000000998车辆识别代号
totalAmountUpper捌拾贰万圆整价税合计(大写)
totalAmountLower820000价税合计(小写)
sellerName青海经济技术开发区
汽车销售有限公司
销售方名称
sellerTaxId91632900595900595Q销售方纳税人识别号
sellerAddressAndPhone青海省西宁市经济技术开发区开发路55号
(0971-8877777)
销售方地址及电话
sellerBankAndAccount流动服务经济技术开发区支行|2806018309198130919销售方开户行及账号
taxRate增值税税率
taxAmount94336.28增值税税额
taxAuthorityName国家税务总局西宁经济技术开发区
开发工业园区税务局税源管理股
主管税务机关名称
taxAuthorityCode163320000004主管税务机关代码
preTaxAmount725663.72不含税价
taxPaymentVoucher完税凭证号码
tonnage吨位
maxCapacity限乘人数
drawer王莺开票人
remark备注

Json结果示例

点击展开/收起 JSON 数据
json
{
  "code": "0",
  "data": [
    {
      "result": [
        {
          "confidence": "0.9693",
          "coordinate": [
            101,
            802,
            101,
            36,
            1170,
            36,
            1170,
            802
          ],
          "elements": {
            "buyerName": "中国流动服务股份有限公司河北省分行",
            "buyerTaxId": "91130000891130000Y",
            "invoiceCode": "163163163163",
            "invoiceNo": "00390039",
            "totalAmountLower": "820000.00",
            "totalAmountUpper": "捌拾贰万圆整",
            "issueDate": "20200702",
            "title": "机动车销售统一发票",
            "printedCode": "163163163163",
            "printedNo": "00390039",
            "taxAmount": "94336.28",
            "preTaxAmount": "725663.72",
            "sellerName": "青海经济技术开汽车销售有限公司",
            "sellerTaxId": "91632900595900595Q",
            "taxRate": "13%",
            "buyerCode": "91130000891130000Y",
            "originalPlace": "南京市",
            "qualifiedNo": "YV3342001942001",
            "importCertificateNo": "",
            "commodityInspectionNo": "",
            "engineNo": "1366666",
            "vehicleIdentificationNo": "LNVL9113000009998",
            "taxAuthorityName": "国家税务总局西宁经济技术开发区开发工业园区税务局税源管理股",
            "taxAuthorityCode": "16332000004",
            "taxPaymentVoucher": "",
            "tonnage": "",
            "maxCapacity": "",
            "brandModel": "NJH5045XDW6161",
            "vehicleType": "流动服务车",
            "machineCode": "539929120039",
            "taxControlCode": "0343-1<16097+0>>79*6<*00>9*3+72>2<05340343-1<16097+0>>79*6<*00>9*3+72>2<05340343-1<16097+0>>79*6<*00>9*3+72>2<05340343-1<16097+0>>79*6<*00>9*3+72>2<05340343-1<16097+0>>79*6<*00>9*3+72>2<0534",
            "remark": "",
            "drawer": "王莺",
            "invoiceForm": "第一联:发票联",
            "sellerAddressAndPhone": "青海省西宁市经济技术开发区开发路55号|0971-8877777",
            "sellerBankAndAccount": "流动服务经济技术开发区支行|2806018309191830919"
          },
          "isCopy": "N",
          "page": 0,
          "printOffset": "0"
        }
      ]
    }
  ],
  "msg": "success"
}