GoodVerify CLI
Verify emails, phone numbers, and mailing addresses via the goodverify.dev API.
Prerequisites
The goodverify CLI must be installed and configured. Check with:
CODEBLOCK0
If not installed:
CODEBLOCK1
If not configured, ask the user for their API key and base URL, then:
CODEBLOCK2
Commands
Verify Email
Check deliverability, domain MX records, disposable/catch-all/role flags.
CODEBLOCK3
Key response fields:
- -
deliverability.status — deliverable, undeliverable, or INLINECODE4 - INLINECODE5 —
accepted_email, rejected_email, unknown, etc. - INLINECODE9 — temporary email service
- INLINECODE10 — domain accepts all addresses
- INLINECODE11 — generic address like info@, support@
- INLINECODE12 — domain can receive email
Verify Phone
Check carrier, phone type (mobile/landline/voip), compliance (DNC/TCPA), and formatting.
CODEBLOCK4
Key response fields:
- -
valid — whether the number is valid - INLINECODE14 —
mobile, landline, voip, INLINECODE18 - INLINECODE19 — carrier name
- INLINECODE20 — on Do Not Call list
- INLINECODE21 — TCPA consent required
- INLINECODE22 — standardized format
Verify Address
Standardize, geocode, check deliverability, and find property owners.
Single string:
CODEBLOCK5
Structured fields:
CODEBLOCK6
Key response fields:
- -
deliverability — deliverable, undeliverable, INLINECODE26 - INLINECODE27 — USPS-standardized components
- INLINECODE28 — latitude, longitude, accuracy
- INLINECODE29 — property owner information (name, other addresses, phones, emails)
- INLINECODE30 — residential, commercial, etc.
Batch Operations
CODEBLOCK7
Usage & Health
CODEBLOCK8
Global Options
All commands accept:
- -
--env <name> — use a specific configured environment - INLINECODE32 — override API key for this request
- INLINECODE33 — override base URL for this request
- INLINECODE34 — output raw JSON (default is pretty-printed)
Guidelines
- - Always use
--json when you need to parse the response programmatically - For bulk verification, prefer
batch commands over looping verify calls - Phone numbers should include country code or use
--country flag - Address verification works best with complete addresses (street, city, state, zip)
- Check
goodverify usage before large batch operations to confirm credit balance - INLINECODE40 keys are read-write (required for batch).
pk_* keys are read-only.
GoodVerify CLI
通过 goodverify.dev API 验证电子邮件、电话号码和邮寄地址。
前提条件
必须安装并配置 goodverify CLI。使用以下命令检查:
bash
goodverify --version
goodverify configure --show
如果未安装:
bash
curl -fsSL https://raw.githubusercontent.com/agoodway/goodverify_cli/main/install.sh | sh
如果未配置,请向用户询问其 API 密钥和基础 URL,然后执行:
bash
goodverify configure --env production --url https://goodverify.dev --key
命令
验证电子邮件
检查可送达性、域名 MX 记录、临时邮箱/通配邮箱/角色邮箱标志。
bash
goodverify verify email --email user@example.com
关键响应字段:
- - deliverability.status — deliverable(可送达)、undeliverable(不可送达)或 risky(有风险)
- deliverability.reason — acceptedemail(已接受)、rejectedemail(已拒绝)、unknown(未知)等
- flags.isdisposable — 临时邮箱服务
- flags.iscatchall — 域名接受所有地址
- flags.isroleaccount — 通用地址,如 info@、support@
- domain.hasmx_records — 域名可接收邮件
验证电话
检查运营商、电话类型(手机/座机/网络电话)、合规性(DNC/TCPA)和格式。
bash
goodverify verify phone --phone +15551234567
goodverify verify phone --phone 5551234567 --country US
关键响应字段:
- - valid — 号码是否有效
- phonetype — mobile(手机)、landline(座机)、voip(网络电话)、tollfree(免费电话)
- carrier.name — 运营商名称
- compliance.dnc — 是否在谢绝来电名单上
- compliance.tcpa — 是否需要 TCPA 同意
- formatted.e164 — 标准化格式
验证地址
标准化、地理编码、检查可送达性并查找产权人。
单字符串:
bash
goodverify verify address --address 123 Main St, Springfield, IL 62701
结构化字段:
bash
goodverify verify address --street 123 Main St --city Springfield --state IL --zip 62701
关键响应字段:
- - deliverability — deliverable(可送达)、undeliverable(不可送达)、missingunit(缺少单元号)
- standardizedaddress — USPS 标准化组件
- geo_location — 纬度、经度、精度
- owners — 产权人信息(姓名、其他地址、电话、电子邮件)
- property.type — 住宅、商业等
批量操作
bash
goodverify batch list # 列出所有批量任务
goodverify batch get --id # 获取批量任务详情
goodverify batch results --id # 下载结果
goodverify batch sample > template.csv # 获取 CSV 模板
用量与健康检查
bash
goodverify usage # 信用余额、套餐、速率限制
goodverify health # API 健康检查(无需认证)
全局选项
所有命令均支持:
- - --env — 使用特定配置环境
- --key — 为此请求覆盖 API 密钥
- --url — 为此请求覆盖基础 URL
- --json — 输出原始 JSON(默认为美化打印)
使用指南
- - 当需要以编程方式解析响应时,始终使用 --json
- 对于批量验证,优先使用 batch 命令而非循环调用 verify
- 电话号码应包含国家代码或使用 --country 标志
- 地址验证在提供完整地址(街道、城市、州、邮编)时效果最佳
- 在执行大型批量操作前,检查 goodverify usage 以确认信用余额
- sk 密钥为读写密钥(批量操作必需)。pk 密钥为只读密钥。