API 文档
接口地址: https://api.gugudata.com/imagerecognition/html2word
返回格式: application/json; charset=utf-8
请求方式: POST
请求协议: HTTPS
使用说明: 公开模式 Data 是 DOCX 下载地址字符串;私有模式 Data 是既有六字段文件引用,可由所属应用取得短期下载链接。HTML 与网页内容转换结果应人工核对,复杂布局可能变化;不承诺任意站点或原样还原。filename 保留现有命名与下载路径规则。
请求示例: https://api.gugudata.com/imagerecognition/html2word?appkey=YOUR_APPKEY
数据预览: https://www.gugudata.com/preview/html2word
接口测试: https://api.gugudata.com/imagerecognition/html2word/demo
OpenAPI: https://www.gugudata.com/openapi/gugudata.openapi.3.1.json
请求参数(POST 请求参数以 application/x-www-form-urlencoded 格式、文件流以 formdata 格式传递,具体可参见下方示例代码)
| 参数名 |
参数类型 |
是否必须 |
默认值 |
备注 |
| appkey |
string |
是 |
无 |
使用本产品已授权的 AppKey,保留现有有效鉴权方式。 |
| type |
string |
是 |
无 |
HTML 为直接正文,URL 为公开网页地址;保留现有大小写兼容。 |
| content |
string |
是 |
无 |
与 type 对应的完整 HTML 或公开 HTTP/HTTPS URL。 |
| filename |
string |
否 |
无 |
可选输出文件名称,不含扩展名;实际输出为 DOCX,不接受服务器路径。 |
| storage |
string |
否 |
public |
public 返回下载地址;private 返回当前应用所属的私有文件引用。 |
| 参数名 |
参数类型 |
备注 |
| DataStatus.RequestParameter |
string |
真实、可读的业务参数,不包含凭据。 |
| DataStatus.StatusCode |
integer |
成功 100;参数错误 501;处理、依赖失败或超时 901。 |
| DataStatus.StatusDescription |
string |
业务状态说明。 |
| DataStatus.ResponseDateTime |
string |
接口返回时间。 |
| DataStatus.DataTotalCount |
integer |
实际结果数量。 |
| Data |
string|object |
public 为下载地址字符串,private 为六字段文件引用。 |
| Data.storage |
string |
private。 |
| Data.file_id |
string |
所属应用的文件标识。 |
| Data.file_name |
string |
输出 DOCX 文件名。 |
| Data.content_type |
string |
Word 文档媒体类型。 |
| Data.size_bytes |
integer |
文件字节数。 |
| Data.index |
int|null |
文件序号;单文件时可为空。 |
仅展示部分示例数据,数组最多展示 3 项,长内容已省略;完整数据请调用接口获取。
{
"DataStatus": {
"RequestParameter": "{\"content\":\"<!doctype html><html lang=\\\"zh-CN\\\"><head><meta charset=\\\"utf-8\\\"><title>GuGuData 月度交付简报</title><style>body{font-family:Arial,\\\"Microsoft YaHei\\\",sans-serif;font-size:18px;line-height:1.5;padding:24px;color:#172d42}h1{font-size:28px}table{border-collapse:collapse;width:640px;margin:20px 0}th,td{border:2px solid #1b2733;padding:10px 14px;text-align:left}th{background:#eaf2ff}img{display:block;width:640px;height:260px}figure{margin:24px 0}</style></head><body><h1>GuGuData 月度交付简报</h1><p…",
"StatusCode": 100,
"StatusDescription": "请求成功。",
"ResponseDateTime": "2026-10-24 15:04:17.111",
"DataTotalCount": 1
},
"Data": "https://cdn.gugudata.com/word/436569c054de4842b0bd168d2d3922c3/gugudata-example.docx"
}