{
  "openapi": "3.0.3",
  "info": {
    "title": "企业证件OCR识别",
    "description": "通过OCR技术识别营业执照及公章，提取企业名称、统一社会信用代码、法定代表人等关键信息，应用于企业信息存档、资质审查等场景。",
    "termsOfService": "https://www.showapi.com/helpcenter/view#/4019/2",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://route.showapi.com"
    }
  ],
  "paths": {
    "/1780-3": {
      "x-pointCode": 3,
      "x-mode": "mapping",
      "x-read-timeout": 40,
      "x-connect-timeout": 40,
      "post": {
        "summary": "OCR营业执照识别-V2",
        "description": "此OCR营业执照识别版本支持从图片提取名称、经营场所、公司类型、统一社会信用代码、营业期限、法定代表人、注册资本、经营范围、注册日期等信息，并在V1基础上新增图片URL识别功能，同时优化了渠道处理方式。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "ret_code": {
                              "type": "number",
                              "description": "接口调用是否成功,0为成功,其他为失败"
                            },
                            "remark": {
                              "type": "string",
                              "description": "提示信息"
                            },
                            "com_name": {
                              "type": "string",
                              "description": "名称"
                            },
                            "addr": {
                              "type": "string",
                              "description": "住所/经营场所/主要经营场所/营业场所"
                            },
                            "type": {
                              "type": "string",
                              "description": "类型/公司类型/主体类型"
                            },
                            "reg_code": {
                              "type": "string",
                              "description": "统一社会信用代码"
                            },
                            "expiry_date": {
                              "type": "string",
                              "description": "营业期限"
                            },
                            "person": {
                              "type": "string",
                              "description": "法定代表人/负责人/经营者/经营者姓名"
                            },
                            "reg_capital": {
                              "type": "string",
                              "description": "注册资本"
                            },
                            "business": {
                              "type": "string",
                              "description": "经营范围"
                            },
                            "set_date": {
                              "type": "string",
                              "description": "成立日期/注册日期"
                            },
                            "approval_date": {
                              "type": "string",
                              "description": "核准日期"
                            },
                            "serial_number": {
                              "type": "string",
                              "description": "编号"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1780_3_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "img_base64": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 10000000,
                    "description": "营业执照base64字符串，要求base64编码和urlencode后大小不超过8M"
                  },
                  "img_url": {
                    "type": "string",
                    "description": "营业执照下载URL，URL长度不超过1024字节，URL对应的图片base64编码和urlencode后大小不超过8M，最短边至少256px，最长边最大2048px,支持jpg/jpeg/png/bmp格式"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/1780-2": {
      "x-pointCode": 2,
      "x-mode": "mapping",
      "x-read-timeout": 60,
      "x-connect-timeout": 60,
      "post": {
        "summary": "公章识别",
        "description": "可支持多种印章（如发票章、财务章等），适用于公文、票据等场景。图像数据需经base64编码并urlencode，处理后大小不超过10M，最短边≥15px，最长边≤8192px，支持jpg/jpeg/png/bmp格式。此功能名为公章识别。",
        "responses": {
          "200": {
            "description": "成功响应",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ShowapiResEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "showapi_res_body": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string",
                              "description": "印章内容"
                            },
                            "ext_para_list": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "其它内容"
                            },
                            "ret_code": {
                              "type": "number",
                              "description": "0为成功，其它为失败"
                            },
                            "remark": {
                              "type": "string"
                            }
                          },
                          "description": "业务返回体"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "operationId": "1780_2_POST",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "img_base64": {
                    "type": "string",
                    "minLength": 0,
                    "maxLength": 10000000,
                    "description": "公章图片base64字符串"
                  },
                  "img_url": {
                    "type": "string",
                    "description": "公章图片下载url"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AppKeyAuth": {
        "type": "apiKey",
        "in": "query",
        "name": "appKey",
        "description": "从 ShowAPI 控制台获取的 appKey，管理地址：https://www.showapi.com/console#/myApp"
      }
    },
    "schemas": {
      "ShowapiResEnvelope": {
        "type": "object",
        "description": "ShowAPI 统一返回包裹（业务数据位于 showapi_res_body）",
        "properties": {
          "showapi_res_code": {
            "type": "integer",
            "description": "API 返回的状态码"
          },
          "showapi_res_error": {
            "type": "string",
            "description": "API 返回的错误信息"
          },
          "showapi_res_id": {
            "type": "string",
            "description": "API 请求的唯一标识"
          },
          "showapi_fee_num": {
            "type": "integer",
            "description": "API 调用计费次数"
          }
        }
      }
    }
  },
  "security": [
    {
      "AppKeyAuth": []
    }
  ],
  "externalDocs": {
    "url": "https://www.showapi.com/apiGateway/view/1780?tab=book"
  },
  "x-apiCode": "1780",
  "x-is-own": false,
  "x-is-op": false
}