数据补全 API
验证邮箱地址
不发信即可检查邮箱能否收信。按给出的结论计费。
POST https://api.won.dev/v1/enrich/email/verify
在不发送任何邮件的情况下,检查一个邮箱地址能否收信:verified(邮箱存在)、risky(该域名接收所有地址,无法确认这个地址是否存在)、invalid(不要发送)或 unknown。同时会说明它是否为免费邮箱,以及是否为 info@ 这类公共邮箱。给出结论时收取 $0.003,unknown 免费。对于从其他渠道获得的邮箱,请在发送活动前先检查一遍;其他接口返回的邮箱都已经验证过。
- 计费:
email_verification$0.003:对一个邮箱地址给出的一次结论:verified、risky或invalid。 - 数据模式:
proxy(各模式的含义)
参数
参数放在 JSON 请求体里。POST 请求还支持 Idempotency-Key 请求头,见幂等。
| 参数 | 类型 | 必填 | 说明(API 原文) |
|---|---|---|---|
email | string | 是 | The address to check, such as jane@example.com. |
max_cost | number | 否 | Spending cap for this call in US dollars. If the call could cost more, it fails with budget_exceeded before anything is charged. |
dry_run | boolean | 否 | If true, only return the maximum cost of this call. Nothing runs, nothing is charged. Default: false. |
响应
传入 dry_run: true 时不执行查询,data 中只返回本次调用的最高费用,见预估费用。错误说明见错误码。
| 字段 | 类型 | 说明(API 原文) |
|---|---|---|
data | object | The verdict on the address. |
data.email | string | The address, in lower case. |
data.status | verified | risky | invalid | unknown | verified: the mailbox exists. risky: the domain accepts every address, so this one cannot be confirmed. invalid: the mailbox does not exist; do not send. unknown: the mail server gave no answer; nothing is charged. |
data.webmail | boolean | The address is at a webmail provider such as gmail.com, not at a company. |
data.shared_mailbox | boolean | The address is a team's, such as info@ or sales@, not one person's. |
query | object | The request as it was understood: country names as codes, the default dates filled in. |
notice | string | null | A plain sentence when there is something to know about this result: why a part is missing, or what to try next. Null otherwise. |
usage | object | What this call was charged, and the balance left. |
usage.unit | person_record | person_profile | person_email | person_phone | email_verification | company_listing | company_record | company_channels | company_technologies | company_funding | company_news | company_lookalikes | job_posting | What is counted. |
usage.records | integer | How many were returned and charged. |
usage.already_paid | integer | How many more were returned for free, because this organization paid for them in the last 30 days. |
usage.cost | number | What this call cost, in US dollars. |
usage.balance | number | The balance left after this call, in US dollars. |
usage.replayed | boolean | True when this is a repeat of a request from the last 24 hours. Repeats are free. |
示例
curl https://api.won.dev/v1/enrich/email/verify \
-H "Authorization: Bearer $WON_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "jordan.lee@northfield-home.example"
}'{
"data": {
"email": "jordan.lee@northfield-home.example",
"status": "verified",
"webmail": false,
"shared_mailbox": false
},
"query": {
"email": "jordan.lee@northfield-home.example"
},
"notice": null,
"usage": {
"unit": "email_verification",
"records": 1,
"already_paid": 0,
"cost": 0.003,
"balance": 48.997,
"replayed": false
}
}用测试 key(won_test_...)发送这个请求,会返回同一家样例公司和同一批样例人员,不收费。