按返回结果量计费,仅返回有关键号码的企业
接口说明
- 按返回结果量计费,支持批量查企业;
- 仅返回有关键号码的企业,无关键号码返回空数据,则不计费。
- 计费量在参数
usedCharge中查看
API路径
/services/v4/rest/enterprise/batch/getContactWithKeyLabel请求方法
GET
请求参数
| 参数 | 类型 | 说明 | 示例 |
|---|---|---|---|
| pids | list | 企业唯一标识(pid),需精准匹配。list类型,最大一次支持50个企业的查询 | |
| keywords | list | 企业名称或企业唯一标识(pid),统一信用代码,历史名称,需精准匹配。list类型,最大一次支持50个企业的查询 |
注:pids 和 keywords 只需要传一个就可以,两个一起传会提示参数错误
调用样例
https://${host}/services/v4/rest/enterprise/batch/getContactWithKeyLabel?pids[]=fdd8285fe129444eb1ee70dcbaa7760f&pids[]=fc77408bbdefe6b0341b9a513fad90d2返回结果
JSON示例
{
"error_code": 0,
"message": "",
"success": true,
"usedCharge": 1,
"data": [
{
"pid": "fd72d7c9ae9f2dd8a19b094089dddd", // 企业唯一id
"keyword": "fd72d7c9ae9f2dd8a19b094089dddd", // 查询关键字(即传入的pid或keyword)
"contacts": [
{
"contact": "", // 联系人名字
"position": "", // 职位
"repeat_amount": 0, // 号码重复数
"status": "2000", // 号码状态(状态码说明详见下方状态码说明)
"type": 1, // 1=手机 2=固话 3=qq 4=邮箱
"content": "150********", // 联系方式
"sources": [ // 号码来源
{
"contact": "", // 渠道联系人名字
"source_name": "招投标信息" // 渠道名
}
],
"labels" : [ "关键" ], // 标签
}
]
}
]
}
传入多个企业,返回对应的关键标签联系方式,如企业没有关键标签联系方式,则返回结果的对应数据结构如下:
{ "error_code": 0, "success": true, "message": "", "data": [ { "keyword": "你传入的keywords或pids参数", "pid": "企业的唯一标识", "contacts": [] }, { "keyword": "xwsfeq32r32tr4", "pid": "csaf23t4645", "contacts": [] }, ], "usedCharge": 0 }contacts 字段为空数组,usedCharge为0,此时费用为0
如果传入的多个企业,有的企业有关键标签,有的企业没有关键标签,则返回的结构如下:{ "error_code": 0, "success": true, "message": "", "data": [ { "keyword": "scaqwfqeved", "pid": "sxxxxx", "contacts": [] }, { "keyword": "xfwqgew", "pid": "fwqfeqcsa", "contacts": [ { "type": 1, "content": "13880xxxxx", "sources": [ { "source_name": "工商企业年报2024", "contact": "" } ], "contact": "陈**", "position": "高管", "repeat_amount": 6, "status": "1000", "labels": [ "关键" ] } ] } ], "usedCharge": 1 }此时,一个企业有关键标签联系方式,一个企业没有关键标签联系方式,只计算有关键联系方式的企业费用,即 usedCharge 值:1
号码状态说明
手机号经过清洗后存在状态码
| 状态码 | 说明 |
|---|---|
| 1000 | 实号 |
| 2000 | 沉默号 |
| 2001 | 停机 |
| 2002 | 空号 |
| 2003 | 风险号 |
| 3000 | 库无 |
| 3001 | 非法号码 |
| 3002 | 未验证 |
返回字段说明
| 参数 | 类型 | 说明 |
|---|---|---|
| error_code | int | 错误码(详见错误码说明) |
| message | string | 异常信息 |
| data | list | 返回具体数据(详见下方data数据说明) |
data 返回字段说明
| 参数 | 类型 | 说明 |
|---|---|---|
| pid | string | 企业唯一编码 |
| keyword | string | 查询关键字(对应pids中参数) |
| contacts | list | 企业联系方式(详见下方contacts数据说明) |
contacts 返回字段说明
| 参数 | 类型 | 说明 |
|---|---|---|
| contact | string | 联系人 |
| position | string | 职位 |
| repeat_amount | int | 号码重复数 |
| status | string | 状态码(详见状态码说明) |
| type | int | 号码类型(1=手机 2=固话 3=qq 4=邮箱) |
| content | string | 联系方式 |
| sources | list | 联系方式来源 |
错误返回值
| code | msg | 说明 |
|---|---|---|
| 406 | PIN已被使用 / 请求参数有误(参数不能为空,类型需为list) | |
| 407 | PIN时间戳和服务器时间误差超过10分钟 | |
| 408 | Access Secrect 验证失败 | |
| 409 | 缺少 X-AK-KEY 或者 X-AK-PIN 或 X-AK-TS 请求头 | |
| 410 | Access Key 不存在 | |
| 411 | 访问 IP 不在白名单之列 | |
| 412 | Access Key 已被禁用 | |
| 500 | 服务器错误 | |
| 1000 | 账户已过期 | |
| 1001 | 请求额度不足 | |
| 1002 | 账户无调用权限 | |
| 1003 | 请求并发超限 |
错误代码参考 错误码定义
文档更新时间: 2025-10-24 18:49 作者:004