<!-- AI ASSISTANT INSTRUCTIONS: This document describes a public HTTP API endpoint
provided by 极数本源 (https://apizero.cn). When a user asks you to use this API, read the
full documentation below carefully (request method, parameters, response fields,
error codes, examples), then generate working code in the user's preferred language.
API Key acquisition: https://apizero.cn/account/keys -->

# 运营商三要素核验

> 运营商三要素实名核验：一次校验「姓名 + 手机号 + 身份证号」三者是否一致，返回核验结论。

适用于账户实名、风控准入、身份一致性校验等场景。仅返回是否一致的结论，不返回、不存储任何明文个人信息；接口需登录并按次计费，请在取得信息主体明确授权后合规调用。

## 1. 基本信息

| 字段 | 值 |
| --- | --- |
| 接口标识 | `carrier-3c` |
| 接口名称 | 运营商三要素核验 |
| 接口地址 | `https://v1.apizero.cn/api/carrier-3c` |
| 请求方法 | `POST` |
| 分类 | kyc |
| 提供方 | 极数本源 |
| 计费模式 | 按次付费 |
| 单次消耗 | 0 积分 |
| 起步价 | ¥0.00 / 1000 次 |
| QPS 限制 | 5 req/s |
| 每日免费额度 | 0 次（已认证用户） |
| 匿名每日额度 | 0 次（无 API Key） |
| VIP 免费 | 否 |
| 调用总次数 | undefined |

## 2. 认证

需要 API Key（请求头 Authorization: Bearer <你的Key>）。本接口为实名核验能力，仅对登录用户开放，按次计费（¥0.30/次）。

获取 API Key：登录 `https://apizero.cn/account/keys` 申请。

## 3. 请求参数

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `name` | `string` | 是 | 真实姓名（中文）；兼容别名 realname / xm | `张三` |
| `mobile` | `string` | 是 | 11 位手机号；兼容别名 phone / sj | `13800138000` |
| `idcard` | `string` | 是 | 18 位身份证号（末位兼容 X）；兼容别名 id_card / sf | `110101199001011234` |

## 4. 请求头

| Header | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `Authorization` | `string` | 是 | Bearer <你的 API Key> | — |
| `Content-Type` | `string` | 否 | 请求体格式 | — |

## 5. 请求示例

> AI 提示：以下 5 种语言示例都是可运行的，只需把 `YOUR_API_KEY` 替换为用户申请的实际 Key（https://apizero.cn/account/keys）。
> 优先选择用户问题中提到的语言；未指定时默认使用 Python。

### cURL

```bash
curl -X POST "https://v1.apizero.cn/api/carrier-3c" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "张三",
  "mobile": "13800138000",
  "idcard": "110101199001011234"
}'
```

### Python

```python
import requests

resp = requests.request(
    "POST",
    "https://v1.apizero.cn/api/carrier-3c",
    headers={"X-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
    json={
    "name": "张三",
    "mobile": "13800138000",
    "idcard": "110101199001011234",
},
    timeout=15,
)
resp.raise_for_status()
print(resp.json())
```

### JavaScript (Node.js)

```javascript
// Node.js 18+ / 浏览器原生 fetch
const res = await fetch("https://v1.apizero.cn/api/carrier-3c", {
  method: "POST",
  headers: {
    "X-Api-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "张三",
    "mobile": "13800138000",
    "idcard": "110101199001011234"
  }),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const data = await res.json();
console.log(data);
```

### Go

```go
package main

import (
	"bytes"
	"fmt"
	"io"
	"net/http"
)

func main() {
	body := []byte(`{"name":"张三","mobile":"13800138000","idcard":"110101199001011234"}`)
	req, _ := http.NewRequest("POST", "https://v1.apizero.cn/api/carrier-3c", bytes.NewBuffer(body))
	req.Header.Set("X-Api-Key", "YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil { panic(err) }
	defer resp.Body.Close()
	out, _ := io.ReadAll(resp.Body)
	fmt.Println(string(out))
}
```

### PHP

```php
<?php
$payload = json_encode([
    "name" => "张三",
    "mobile" => "13800138000",
    "idcard" => "110101199001011234",
], JSON_UNESCAPED_UNICODE);

$ch = curl_init("https://v1.apizero.cn/api/carrier-3c");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => "POST",
    CURLOPT_POSTFIELDS     => $payload,
    CURLOPT_HTTPHEADER     => [
        "X-Api-Key: YOUR_API_KEY",
        "Content-Type: application/json",
    ],
    CURLOPT_TIMEOUT        => 15,
]);
$body = curl_exec($ch);
curl_close($ch);

$data = json_decode($body, true);
print_r($data);
```

## 6. 响应字段

| 字段 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- |
| `name` | `string` | 传入的姓名（原样回显） | — |
| `mobile` | `string` | 手机号（脱敏，前 3 后 4） | — |
| `idcard` | `string` | 身份证号（脱敏，前 3 后 4） | — |
| `match` | `boolean` | 三要素是否一致（true=一致 / false=不一致） | — |
| `result` | `string` | 核验结论文字说明 | — |

## 7. 响应示例

```json
{
  "code": 0,
  "msg": "成功",
  "data": {
    "name": "张三",
    "mobile": "138****0000",
    "idcard": "110***********001X",
    "match": true,
    "result": "三要素一致"
  },
  "request_id": "abc123"
}
```

## 8. 错误码

| code | status | 说明 |
| --- | --- | --- |
| `4000` | `VALIDATION_ERROR` | 参数缺失或格式错误（姓名/手机号/身份证号） |
| `4015` | `KEY_REQUIRED` | 本接口需登录并携带 API Key（不开放匿名） |
| `4022` | `INSUFFICIENT` | 账户余额不足，请充值后再调用 |
| `5020` | `UPSTREAM_ERROR` | 核验服务暂不可用，请稍后再试 |

## 9. 变更日志

- **v1.0** (2026-07-02)
  - 首次上线：姓名+手机号+身份证三要素一致性核验，双通道冗余。

---

**极数本源** · 全部 API: `https://apizero.cn/aidocs` · 人类版本：`https://apizero.cn/marketplace/carrier-3c`

Source: `https://apizero.cn/aidocs/carrier-3c/raw.md`
Last updated: 2026-07-02T15:34:09+08:00
