[AI72]离线历史记录获取-批量
该接口作为AI类API的增值功能,支持用户批量查询同一公司下多个账号的历史记录。
startTime和endTime为可选参数,不传则查询全部历史记录;page默认为1;user_accounts列表最多20个,每个账号的email和phone至少有一个不为空;返回结果按用户分组
请求参数
此 API 接口支持的参数列表
| 名称 | 类型 | 示例 | 描述 |
|---|---|---|---|
必填 | string | abc123 | 公司ID |
| integer<int64> | 1761580799999 | 结束时间戳(毫秒) |
| integer<int32> | 1 | 页码,从1开始 |
| integer<int64> | 1758902400000 | 开始时间戳(毫秒) |
必填 | array | [
{
"email": "user1@example.com",
"phone": "12345678900"
},
{
"email": "user2@example.com",
"phone": "12345678901"
}
] | 用户账号列表,最多20个,每个账号包含email和phone |
| string | user@example.com | 用户邮箱 |
| string | 12345678900 | 用户手机号 |
响应结构
API 响应数据的结构说明
| 字段名 | 类型 | 示例 | 描述 |
|---|---|---|---|
data | object | - | 响应数据 |
user_histories | array | [
{
"email": "user@example.com",
"phone": "12345678900",
"history": {
"page": 1,
"limit": 20,
"total": 100,
"history_maps": [
{
"data": [
{
"id": "2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"link": "/ai/agent-flow/2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"time": "13:58",
"source": "AI_GENERATE",
"message": "如何提高锂电池能量密度到260瓦时/千克(Wh/kg)且体积没有变大",
"rawType": "ai_generate",
"icon_url": "https://qa-patsnap-import-workspace.cdn.zhihuiya.com/agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg",
"icon_path": "agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg",
"created_at": "23 Oct 2025 13:58",
"business_id": "2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"business_name": "Technical Solution Exploration"
}
],
"date": "2025-10-23"
}
]
}
}
] | 用户历史记录列表 |
email | string | user@example.com | 用户邮箱 |
phone | string | 12345678900 | 用户手机号 |
history | object | {
"page": 1,
"limit": 20,
"total": 100,
"history_maps": [
{
"data": [
{
"id": "2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"link": "/ai/agent-flow/2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"time": "13:58",
"source": "AI_GENERATE",
"message": "如何提高锂电池能量密度到260瓦时/千克(Wh/kg)且体积没有变大",
"rawType": "ai_generate",
"icon_url": "https://qa-patsnap-import-workspace.cdn.zhihuiya.com/agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg",
"icon_path": "agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg",
"created_at": "23 Oct 2025 13:58",
"business_id": "2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"business_name": "Technical Solution Exploration"
}
],
"date": "2025-10-23"
}
]
} | 历史记录详情 |
page | integer<int32> | 1 | 当前页码 |
limit | integer<int32> | 20 | 每页记录数 |
total | integer<int64> | 100 | 总记录数 |
history_maps | array | [
{
"data": [
{
"id": "2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"link": "/ai/agent-flow/2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"time": "13:58",
"source": "AI_GENERATE",
"message": "如何提高锂电池能量密度到260瓦时/千克(Wh/kg)且体积没有变大 热管理安全阈值\n,材料成本上限\n,生产工艺兼容性 ",
"rawType": "ai_generate",
"icon_url": "https://qa-patsnap-import-workspace.cdn.zhihuiya.com/agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg",
"icon_path": "agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg",
"created_at": "23 Oct 2025 13:58",
"business_id": "2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"business_name": "Technical Solution Exploration"
},
{
"id": "2570aeaf-7999-430b-9bef-c43fcda4d928",
"link": "/ai/agent-flow/2570aeaf-7999-430b-9bef-c43fcda4d928",
"time": "13:39",
"source": "AI_GENERATE",
"message": "如何提高锂电池能量密度到260瓦时/千克(Wh/kg)且体积没有变大 热管理安全阈值\n,材料成本上限\n,生产工艺兼容性 ",
"rawType": "ai_generate",
"icon_url": "https://qa-patsnap-import-workspace.cdn.zhihuiya.com/agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg",
"icon_path": "agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg",
"created_at": "23 Oct 2025 13:39",
"business_id": "2570aeaf-7999-430b-9bef-c43fcda4d928",
"business_name": "Technical Solution Exploration"
}
],
"date": "2025-10-23"
}
] | 按日期分组的历史记录列表 |
data | array | [
{
"id": "2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"link": "/ai/agent-flow/2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"time": "13:58",
"source": "AI_GENERATE",
"message": "如何提高锂电池能量密度到260瓦时/千克(Wh/kg)且体积没有变大 热管理安全阈值\n,材料成本上限\n,生产工艺兼容性 ",
"rawType": "ai_generate",
"icon_url": "https://qa-patsnap-import-workspace.cdn.zhihuiya.com/agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg",
"icon_path": "agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg",
"created_at": "23 Oct 2025 13:58",
"business_id": "2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"business_name": "Technical Solution Exploration"
}
] | 该日期下的历史记录列表 |
q | string | quantum computing AND artificial intelligence | 查询关键词或查询字符串 |
id | string | 2a7a4ddd-7f5d-4266-a96e-13a57095db79 | 历史记录ID |
efq | string | APD:[20230101 TO 20231231] | 扩展字段查询 |
link | string | /ai/agent-flow/2a7a4ddd-7f5d-4266-a96e-13a57095db79 | 历史记录对应的链接地址 |
time | string | 13:58 | 创建时间(仅时分),格式:HH:mm |
count | object | {
"total": 1500,
"granted": 800,
"application": 700
} | 搜索结果统计数据(专利数等) |
source | string | AI_GENERATE | 历史记录来源 |
message | string | 如何提高锂电池能量密度到260瓦时/千克(Wh/kg)且体积没有变大 热管理安全阈值\n,材料成本上限\n,生产工艺兼容性 | 历史记录的消息或描述信息 |
icon_url | string | https://qa-patsnap-import-workspace.cdn.zhihuiya.com/agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg | 图标完整URL地址 |
raw_type | string | ai_generate | 历史记录类型 |
icon_path | string | agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg | 图标路径 |
patent_id | string | US20240123456A1 | 专利ID |
created_at | string | 23 Oct 2025 13:58 | 创建时间,格式:yyyy-MM-dd HH:mm 或 dd MMM yyyy HH:mm |
extra_info | object | {
"region": "US",
"category": "technology"
} | 额外信息 |
business_id | string | 2a7a4ddd-7f5d-4266-a96e-13a57095db79 | 业务ID(如:seekId、mindId、researchId等) |
business_name | string | Technical Solution Exploration | 业务名称 |
date | string | 2025-10-23 | 日期,格式:yyyy-MM-dd |
status必填 | boolean | false | 状态 |
error_msg | string | The request parameter format is incorrect! | 错误信息 |
error_code必填 | integer | 0 | 错误代码 |
成功响应示例
成功调用 API 的响应示例
JSON
{
"data": {
"user_histories": [
{
"email": "user@example.com",
"phone": 12345678900,
"history": {
"page": 1,
"limit": 20,
"total": 100,
"history_maps": [
{
"data": [
{
"q": "quantum computing AND artificial intelligence",
"id": "2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"efq": "APD:[20230101 TO 20231231]",
"link": "/ai/agent-flow/2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"time": "13:58",
"count": {
"total": 1500,
"granted": 800,
"application": 700
},
"source": "AI_GENERATE",
"message": "如何提高锂电池能量密度到260瓦时/千克(Wh/kg)且体积没有变大 热管理安全阈值\\n,材料成本上限\\n,生产工艺兼容性",
"icon_url": "https://qa-patsnap-import-workspace.cdn.zhihuiya.com/agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg",
"raw_type": "ai_generate",
"icon_path": "agent/9b6135cd012c425e84edf84e6b03e366-image.jpeg",
"patent_id": "US20240123456A1",
"created_at": "23 Oct 2025 13:58",
"extra_info": {
"region": "US",
"category": "technology"
},
"business_id": "2a7a4ddd-7f5d-4266-a96e-13a57095db79",
"business_name": "Technical Solution Exploration"
}
],
"date": "2025-10-23"
}
]
}
}
]
},
"status": true,
"error_code": 0
}错误码
此接口可能返回的错误码列表
业务错误码
| 错误码 | 描述 |
|---|---|
68300004 | 请求参数异常! |
68300005 | 查询Api失败! |
68300006 | 解析基本存取错误! |
68300007 | 存在错误的请求! |
68300008 | 服务中断异常,请稍后再试! |
68300010 | 文件不符合上传规范! |
平台错误码
| 错误码 | 描述 |
|---|---|
67200000 | API整体限流错误! |
67200001 | API整体限流错误! |
67200002 | 当前调用速率过快,超过当前配置限制QPS! |
67200003 | 申请token的key和secret传参不正确或者客户端已被禁用! |
67200004 | 请求的接口无权限请联系我们的支持人员! |
67200005 | 账户余额/调用次数不足! |
67200006 | 客户端超过开通有效期! |
67200007 | 当前调用超过当天配置使用额度! |
67200008 | 请检查query参数中必填的apikey是否传输! |
67200009 | apikey与所传的bearerToken不匹配,请检查是否使用在有效期内的token! |
67200012 | 请求不合法! |
67200100 | 当前服务器状态正忙,请求响应超时! |
67200101 | 当前请求的Api不存在请检查请求Path! |
HTTP 状态码
| 状态码 | 描述 |
|---|---|
0 | 请求成功 |
201 | Created |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
性能指标
此接口的预期性能特征
正常响应时间
5000 ms
最大响应时间
10000 ms