<!-- 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 -->

# 邮箱地址检测

> 综合性邮箱质量评估接口，一次请求完成 6 项检测：
  ① RFC 5322 格式校验
  ② 临时/一次性邮箱检测（基于 72,345 条开源域名库，3 个数据源合并去重）
  ③ MX 记录验证（用 AliDNS DoH，避开 PHP getmxrr 不稳定）
  ④ 拼写纠正（gmial.com → 提示 gmail.com）
  ⑤ 服务商识别（QQ邮箱/Gmail/网易/Outlook 等 40+ 主流邮箱）
  ⑥ 综合风险评分 0-100，附详细原因清单

典型用例：用户注册时的反垃圾邮箱过滤、邮件营销列表清洗、KYC 风控辅助。

## 1. 基本信息

| 字段 | 值 |
| --- | --- |
| 接口标识 | `email-check` |
| 接口名称 | 邮箱地址检测 |
| 接口地址 | `https://v1.apizero.cn/api/email-check` |
| 请求方法 | `GET` |
| 分类 | kyc |
| 提供方 | 极数本源 |
| 计费模式 | 免费试用 |
| 单次消耗 | 0 积分 |
| 起步价 | — |
| QPS 限制 | 10 req/s |
| 每日免费额度 | 500 次（已认证用户） |
| 匿名每日额度 | 100 次（无 API Key） |
| VIP 免费 | 否 |
| 调用总次数 | undefined |

## 2. 认证

匿名 QPS=3、日 100 次；登录后 QPS=10、日 500 次。

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

## 3. 请求参数

| 参数 | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `email` | `string` | 是 | 要检测的邮箱地址，最长 254 字符（RFC 上限） | — |

## 4. 请求头

| Header | 类型 | 必填 | 说明 | 示例 |
| --- | --- | --- | --- | --- |
| `X-API-Key` | `string` | 否 | API Key（不传走匿名额度） | — |

## 5. 请求示例 (cURL)

```bash
curl "https://v1.apizero.cn/api/email-check?email=%3Cemail%3E&key=YOUR_API_KEY"
```

## 6. 响应字段

| 字段 | 类型 | 说明 | 示例 |
| --- | --- | --- | --- |
| `email` | `string` | 小写规范化后的邮箱 | — |
| `input` | `string` | 原始输入回显 | — |
| `valid_format` | `boolean` | 是否符合 RFC 5322 格式 | — |
| `local` | `string` | 本地部分（@ 前面，格式无效时为 null） | — |
| `domain` | `string` | 域名部分（@ 后面，格式无效时为 null） | — |
| `is_disposable` | `boolean` | 是否临时/一次性邮箱 | — |
| `disposable_match` | `string\|null` | 匹配上的具体临时邮箱域名（可能是上级域名） | — |
| `is_trusted` | `boolean` | 是否知名邮箱服务商 | — |
| `provider` | `string\|null` | 服务商中文名（如「QQ 邮箱」「Gmail」） | — |
| `has_mx` | `boolean` | 域名是否配置了 MX 记录 | — |
| `mx_records` | `array` | MX 记录列表（按 priority 升序） | — |
| `mx_records[].priority` | `integer` | 优先级（数字越小越优先） | — |
| `mx_records[].exchange` | `string` | 邮件服务器主机名 | — |
| `mx_records[].ttl` | `integer` | TTL 秒 | — |
| `spelling_suggestion` | `string\|null` | 拼写错误建议（疑似拼错知名域名时返回，如 "gmial.com" → "gmail.com"） | — |
| `risk_score` | `integer` | ★ 综合风险评分 0~100（越高越可信） | — |
| `risk_level` | `string` | 风险等级：invalid / high / medium / low | — |
| `reasons` | `string[]` | 判定原因列表（含 ✅/⚠️ 前缀） | — |

## 7. 响应示例

```json
{
    "code": 0,
    "msg": "成功",
    "data": {
        "email": "test@gmial.com",
        "input": "test@gmial.com",
        "valid_format": true,
        "local": "test",
        "domain": "gmial.com",
        "is_disposable": false,
        "disposable_match": null,
        "is_trusted": false,
        "provider": null,
        "has_mx": false,
        "mx_records": [],
        "spelling_suggestion": "gmail.com",
        "risk_score": 5,
        "risk_level": "invalid",
        "reasons": [
            "⚠️ 域名无 MX 记录，无法接收邮件",
            "⚠️ 域名疑似拼写错误，建议用 gmail.com",
            "⚠️ 本地部分含测试/系统类关键词"
        ]
    },
    "request_id": "mota..."
}
```

## 8. 错误码

| code | status | 说明 |
| --- | --- | --- |
| `0` | `OK` | 成功（即使格式错误也返回 200，valid_format=false） |
| `4000` | `Bad Request` | 参数错误：email 缺失 / 长度超过 254 |
| `4011` | `Unauthorized` | API Key 无效 |
| `4013` | `Forbidden` | API Key 已暂停 |
| `4014` | `Forbidden` | 当前 IP 不在 API Key 白名单内 |
| `4029` | `Too Many Requests` | QPS 限流 |
| `4030` | `Too Many Requests` | 今日免费额度已用完 |

## 9. 变更日志

- **1.0.0** (2026-05-06)
  - 首次发布：6 项综合检测（格式 / 临时邮箱 / MX / 拼写纠正 / 服务商 / 风险评分）
  - 临时邮箱域名库 72,345 条，融合 3 个开源数据源
  - MX 验证用 AliDNS DoH，避开服务器 getmxrr 不可用
  - 拼写纠正基于 levenshtein 距离 + 首字母 + 长度差三重过滤
  - 内置 40+ 中外主流邮箱服务商识别

---

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

Source: `https://apizero.cn/aidocs/email-check/raw.md`
Last updated: 2026-05-11T16:16:07+08:00
