API
API 参考文档
身份验证
需要额度:有效的 Pro 账户每月包含的20个额度,或在账户页面购买的额度。两者都没有的账户会收到 403 pro_required。
此密钥仅显示一次。请将其安全保存在服务器上。
在账户中创建 API 密钥并复制仅显示一次的值。将 NOCALL_API_KEY 配置为服务器秘密。使用 HTTPS,不要在浏览器代码、仓库、截图或日志中放入密钥。
在 Authorization: Bearer 中发送完整密钥,Bearer 后留一个空格。不要使用 X-API-Key,也不要把密钥放入 URL。
在 /v1/data/* + /v2/* 中,有效密钥代替浏览器的 ByteGuard 证明。仍会检查过期、撤销、订阅、额度和频率限制,不会授权其他路由。openapi.json 和 products 是公开的。
Authorization: Bearer <NOCALL_API_KEY>首次查询
全部 46 个 tools 均可通过 API 使用:调用 POST /v2/<tool-id>,或调用 POST /v2/tools 并在请求体中加入 tool 字段。每个 tool 都有自己的 JSON 请求体,详见其指南。data.result 包含 tool 的结果。请使用表中的标识符。
每个新操作都应生成新的 Idempotency-Key。只有使用相同输入重试同一操作时才保留该标识。
REQUEST_ID="$(uuidgen)" && [ -n "$REQUEST_ID" ] &&
curl --request POST 'https://api.nocall.io/v2/tools' \
--header "Authorization: Bearer $NOCALL_API_KEY" \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"tool":"who-calls","phone":"+12025550123","country":"US"}'import json
import os
import urllib.request
import uuid
api_key = os.environ.get('NOCALL_API_KEY')
if not api_key:
raise SystemExit('Set NOCALL_API_KEY')
request = urllib.request.Request(
'https://api.nocall.io/v2/tools',
method='POST',
data=json.dumps({'tool': 'who-calls', 'phone': '+12025550123', 'country': 'US'}).encode(),
headers={
'Authorization': 'Bearer ' + api_key,
'Content-Type': 'application/json',
'Idempotency-Key': str(uuid.uuid4()),
},
)
with urllib.request.urlopen(request, timeout=30) as response:
result = json.load(response)
print(result['data']['result'], result['meta']['unitsCharged'])import { randomUUID } from 'node:crypto';
const requestId = randomUUID();
const apiKey = process.env.NOCALL_API_KEY;
if (!apiKey) throw new Error('Set NOCALL_API_KEY');
const response = await fetch('https://api.nocall.io/v2/tools', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + apiKey,
'Content-Type': 'application/json',
'Idempotency-Key': requestId,
},
body: JSON.stringify({ tool: 'who-calls', phone: '+12025550123', country: 'US' }),
});
const result = await response.json();
if (!response.ok) throw new Error(result.error?.code ?? 'request_failed');
console.log(result.data.result, result.meta.unitsCharged);API v2 · tools
全部 46 个 tools 均可通过 API 使用:调用 POST /v2/<tool-id>,或调用 POST /v2/tools 并在请求体中加入 tool 字段。每个 tool 都有自己的 JSON 请求体,详见其指南。data.result 包含 tool 的结果。请使用表中的标识符。
| tool | 用途 | POST | 虚构示例 |
|---|---|---|---|
| who-calls | 谁在给我打电话? | /v2/who-calls | {"phone":"+12025550123","country":"US"} |
| phone-exposure | 我的号码泄露了吗? | /v2/phone-exposure | {"phone":"+12025550123","country":"US"} |
| phone-intelligence | 电话情报 | /v2/phone-intelligence | {"phone":"+12025550123","country":"US"} |
| phone-risk | 电话风险 | /v2/phone-risk | {"phone":"+12025550123","country":"US"} |
| carrier-lookup | 查询运营商 | /v2/carrier-lookup | {"phone":"+12025550123","country":"US"} |
| verified-business | 反查已验证企业 | /v2/verified-business | {"phone":"+12025550123","country":"US"} |
| phone-formats | 电话号码格式 | /v2/phone-formats | {"phone":"+34912345678","country":"ES"} |
| callback-cost | 回拨要花多少钱? | /v2/callback-cost | {"phone":"806123456","country":"ES"} |
| prefix-origin | 这个区号是哪里的? | /v2/prefix-origin | {"phone":"910","country":"ES"} |
| number-validator | 电话号码验证与格式化 | /v2/number-validator | {"phone":"+12025550123","country":"US"} |
| line-type | 是手机还是固话? | /v2/line-type | {"phone":"+34600111222","country":"ES"} |
| premium-rate | 这是增值付费号码吗? | /v2/premium-rate | {"phone":"806","country":"ES"} |
| wangiri | wangiri检查:这个未接来电是诈骗吗? | /v2/wangiri | {"phone":"+216","country":"ES"} |
| commercial-400 | 这通推销电话合法吗? | /v2/commercial-400 | {"phone":"+34400000000","country":"ES"} |
| number-research | 用 AI 调查号码 | /v2/number-research | {"phone":"+12025550123","country":"US","language":"en"} |
| dial-code | 有人让你拨一串代码? | /v2/dial-code | {"code":"**21*+34600000000#","country":"ES"} |
| call-scam-check | 这个电话是诈骗吗? | /v2/call-scam-check | {"answers":{"impersonation":true,"sms_code":true,"pressure":true},"country":"ES"} |
| sms-check | 检查短信是否为诈骗 | /v2/sms-check | {"message":"Your parcel is held. Pay the fee at https://example.invalid/pay","sender":"Correos","language":"en","country":"GB"} |
| sms-brand | 这条品牌短信是真的吗? | /v2/sms-brand | {"brand":"correos","link":"https://correos-envio.example.invalid/pago","country":"ES"} |
| sms-sender | 这条短信是谁发的? | /v2/sms-sender | {"sender":"Correos","country":"ES"} |
| sms-code | 有人向你索要短信验证码? | /v2/sms-code | {"unrequested":true,"asked":true,"sensitive":true,"shared":false} |
| sms-report | 诈骗短信去哪里举报 | /v2/sms-report | {"sender":"Correos","tapped":false,"gaveData":false,"country":"ES"} |
| sms-campaigns | 短信诈骗活动 | /v2/sms-campaigns | {} |
| sms-redact | 删除短信中的个人信息 | /v2/sms-redact | {"message":"BBVA: su tarjeta 4111 1111 1111 1111 ha sido bloqueada. Llame al +34 612 34 56 78 o entre en https://bbva-seguro.com/login"} |
| callback-number | 要拨打这条消息里的号码吗? | /v2/callback-number | {"text":"Your account is locked. Call us now on 0909 879 0000 or +216 71 123 456","country":"GB"} |
| prefix-directory | 区号 | /v2/prefix-directory | {"country":"ES","serviceClass":"premium","page":1,"limit":3} |
| operator-directory | 运营商 | /v2/operator-directory | {"country":"ES","operator":"Movistar"} |
| calling-codes | 国际区号 | /v2/calling-codes | {"query":"216","language":"en"} |
| spam-directory | 骚扰号码 | /v2/spam-directory | {"country":"US","category":"SCAM","page":1,"limit":20} |
| trends | 数据洞察 | /v2/trends | {"country":"ES"} |
| smishing | 什么是短信钓鱼? | /v2/smishing | {"message":"CORREOS: su paquete está retenido. Pague urgente las tasas en https://correos-entrega.info/pago","country":"ES"} |
| link-check | 检查链接 | /v2/link-check | {"url":"http://192.168.1.1/login","country":"ES"} |
| safety-tools | 安全工具 | /v2/safety-tools | {"text":"URGENTE: su cuenta BBVA ha sido bloqueada, verifique en https://bbva-seguro.com/login","mode":"email","country":"ES"} |
| sms-filter | 垃圾短信过滤 | /v2/sms-filter | {"country":"ES"} |
| qr-check | 这个二维码安全吗? | /v2/qr-check | {"payload":"BCD\n002\n1\nSCT\n\nAparcamientos Ejemplo SL\nES9121000418450200051332\nEUR49.90\n\n\nMulta de aparcamiento 4471","country":"ES"} |
| email-headers | 这封邮件是真的吗? | /v2/email-headers | {"headers":"Delivered-To: [email protected]\nReceived: from mail.bank.example (mail.bank.example [192.0.2.10]) by mx.google.com with ESMTPS id x1 for <[email protected]>; Tue, 27 Oct 2026 09:00:00 -0700\nAuthentication-Results: mx.google.com; dkim=pass [email protected] header.s=s1; spf=pass (google.com: domain of [email protected] designates 192.0.2.10 as permitted sender) [email protected]; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bank.example\nFrom: \"Bank Alerts\" <[email protected]>\nReply-To: [email protected]\nSubject: Your statement is ready\nMessage-ID: <[email protected]>","country":"ES"} |
| mx-lookup | 查询 MX 记录 | /v2/mx-lookup | {"domain":"example.com"} |
| spf-check | 检查 SPF | /v2/spf-check | {"domain":"example.com"} |
| dmarc-check | 检查 DMARC | /v2/dmarc-check | {"domain":"example.com"} |
| dkim-check | 检查 DKIM | /v2/dkim-check | {"domain":"example.com","selector":"s1"} |
| email-verify | 检查邮箱地址 | /v2/email-verify | {"email":"[email protected]"} |
| website-age | 这个网站是什么时候建的? | /v2/website-age | {"url":"https://www.example.com/login","country":"ES"} |
| domain-popularity | 域名知名度 | /v2/domain-popularity | {"url":"https://shop.example.com/cart","country":"ES"} |
| website-legit | 这个网站靠谱吗? | /v2/website-legit | {"url":"https://[email protected]/login","country":"ES"} |
| ip-lookup | IP 地址查询 | /v2/ip-lookup | {"ip":"193.0.6.139"} |
| ssl-check | SSL 证书检查 | /v2/ssl-check | {"url":"https://www.example.com/login","country":"ES"} |
可用端点
仅显示经审核或公开的技术信息,不显示私人身份和防护信号。
API v1 · phone 必填,最多64个字符,建议使用 E.164。country 是受支持的双字母国家代码,可选,默认为 ES。Content-Type 必须为 application/json。
| HTTP | URL | 用途 | 使用要求 |
|---|---|---|---|
| POST | /v2/tools | 通过 API 使用 | Authorization: Bearer · Pro |
| GET | /v2/tools | NoCall 产品目录 | Authorization: Bearer · Pro |
| GET | /v2/openapi.json | OpenAPI 3.1 | — |
| POST | /v2/who-calls | 谁在给我打电话? | Authorization: Bearer · Pro |
| POST | /v2/phone-exposure | 我的号码泄露了吗? | Authorization: Bearer · Pro |
| POST | /v2/phone-intelligence | 电话情报 | Authorization: Bearer · Pro |
| POST | /v2/phone-risk | 电话风险 | Authorization: Bearer · Pro |
| POST | /v2/carrier-lookup | 查询运营商 | Authorization: Bearer · Pro |
| POST | /v2/verified-business | 反查已验证企业 | Authorization: Bearer · Pro |
| POST | /v2/phone-formats | 电话号码格式 | Authorization: Bearer · Pro |
| POST | /v2/callback-cost | 回拨要花多少钱? | Authorization: Bearer · Pro |
| POST | /v2/prefix-origin | 这个区号是哪里的? | Authorization: Bearer · Pro |
| POST | /v2/number-validator | 电话号码验证与格式化 | Authorization: Bearer · Pro |
| POST | /v2/line-type | 是手机还是固话? | Authorization: Bearer · Pro |
| POST | /v2/premium-rate | 这是增值付费号码吗? | Authorization: Bearer · Pro |
| POST | /v2/wangiri | wangiri检查:这个未接来电是诈骗吗? | Authorization: Bearer · Pro |
| POST | /v2/commercial-400 | 这通推销电话合法吗? | Authorization: Bearer · Pro |
| POST | /v2/number-research | 用 AI 调查号码 | Authorization: Bearer · Pro |
| POST | /v2/dial-code | 有人让你拨一串代码? | Authorization: Bearer · Pro |
| POST | /v2/call-scam-check | 这个电话是诈骗吗? | Authorization: Bearer · Pro |
| POST | /v2/sms-check | 检查短信是否为诈骗 | Authorization: Bearer · Pro |
| POST | /v2/sms-brand | 这条品牌短信是真的吗? | Authorization: Bearer · Pro |
| POST | /v2/sms-sender | 这条短信是谁发的? | Authorization: Bearer · Pro |
| POST | /v2/sms-code | 有人向你索要短信验证码? | Authorization: Bearer · Pro |
| POST | /v2/sms-report | 诈骗短信去哪里举报 | Authorization: Bearer · Pro |
| POST | /v2/sms-campaigns | 短信诈骗活动 | Authorization: Bearer · Pro |
| POST | /v2/sms-redact | 删除短信中的个人信息 | Authorization: Bearer · Pro |
| POST | /v2/callback-number | 要拨打这条消息里的号码吗? | Authorization: Bearer · Pro |
| POST | /v2/prefix-directory | 区号 | Authorization: Bearer · Pro |
| POST | /v2/operator-directory | 运营商 | Authorization: Bearer · Pro |
| POST | /v2/calling-codes | 国际区号 | Authorization: Bearer · Pro |
| POST | /v2/spam-directory | 骚扰号码 | Authorization: Bearer · Pro |
| POST | /v2/trends | 数据洞察 | Authorization: Bearer · Pro |
| POST | /v2/smishing | 什么是短信钓鱼? | Authorization: Bearer · Pro |
| POST | /v2/link-check | 检查链接 | Authorization: Bearer · Pro |
| POST | /v2/safety-tools | 安全工具 | Authorization: Bearer · Pro |
| POST | /v2/sms-filter | 垃圾短信过滤 | Authorization: Bearer · Pro |
| POST | /v2/qr-check | 这个二维码安全吗? | Authorization: Bearer · Pro |
| POST | /v2/email-headers | 这封邮件是真的吗? | Authorization: Bearer · Pro |
| POST | /v2/mx-lookup | 查询 MX 记录 | Authorization: Bearer · Pro |
| POST | /v2/spf-check | 检查 SPF | Authorization: Bearer · Pro |
| POST | /v2/dmarc-check | 检查 DMARC | Authorization: Bearer · Pro |
| POST | /v2/dkim-check | 检查 DKIM | Authorization: Bearer · Pro |
| POST | /v2/email-verify | 检查邮箱地址 | Authorization: Bearer · Pro |
| POST | /v2/website-age | 这个网站是什么时候建的? | Authorization: Bearer · Pro |
| POST | /v2/domain-popularity | 域名知名度 | Authorization: Bearer · Pro |
| POST | /v2/website-legit | 这个网站靠谱吗? | Authorization: Bearer · Pro |
| POST | /v2/ip-lookup | IP 地址查询 | Authorization: Bearer · Pro |
| POST | /v2/ssl-check | SSL 证书检查 | Authorization: Bearer · Pro |
| GET | /v1/data/account | API 密钥与额度 | Authorization: Bearer |
| POST | /v1/data/phone-lookups | 电话情报 | Authorization: Bearer · Pro |
| POST | /v1/data/phone-risk-checks | 电话风险 | Authorization: Bearer · Pro |
| POST | /v1/data/carrier-lookups | 查询运营商 | Authorization: Bearer · Pro |
| POST | /v1/data/reverse-phone-lookups | 反查已验证企业 | Authorization: Bearer |
| POST | /v1/data/phone-exposure-checks | 我的号码泄露了吗? | Authorization: Bearer · Pro |
| POST | /v1/data/bulk-lookups | 批量电话查询 | Authorization: Bearer |
| GET | /v1/data/products | NoCall 产品目录 | — |
| GET | /v1/data/openapi.json | OpenAPI 3.1 | — |
响应
此示例为虚构内容,并非真实查询。请勿拨打电话或打开其中的链接。
data 包含结果,meta 包含 requestId、unitsCharged 和用量。虚构片段显示一次查询后的余额。有效但未找到数据的结果也消耗1额度;验证错误、提供方错误和余额读取不收费。没有数据不代表号码安全。完整约定见 OpenAPI。
{
"data": {
"tool": "who-calls",
"result": {
"phoneNumber": "+12025550123",
"found": true,
"updatedAt": "2026-10-01T09:30:00.000Z",
"risk": {
"score": 72,
"level": "high"
},
"reportCount": 14,
"categories": [
"TELEMARKETING"
],
"verified": false,
"carrier": null,
"verifiedBusiness": null
}
},
"meta": {
"requestId": "req_example",
"unitsCharged": 1,
"usage": {
"periodStart": "2026-10-01",
"unitLimit": 20,
"unitsUsed": 3,
"unitsRemaining": 17
}
}
}| tool | data.result |
|---|---|
| who-calls | phoneNumber, found, updatedAt, risk, reportCount, categories, verified, carrier, verifiedBusiness |
| phone-exposure | atRisk |
| phone-intelligence | phoneNumber, found, updatedAt, risk, reportCount, categories, verified, carrier, verifiedBusiness, commentCount, aiRiskLevel, prefixRisk |
| phone-risk | phoneNumber, found, updatedAt, risk, signals |
| carrier-lookup | phoneNumber, found, updatedAt, carrier |
| verified-business | phoneNumber, found, updatedAt, verifiedBusiness |
| phone-formats | e164, national, international, callingCode, country, valid |
| callback-cost | tier, scope, callingCode, registry |
| prefix-origin | kind, planLoaded, numberType, foreignCode, national, row, complete, rows, factsType |
| number-validator | valid, possible, country, callingCode, type, e164 |
| line-type | e164, valid, type, lineKind |
| premium-rate | category, callbackRisk, prefix, callingCode, source |
| wangiri | verdict, code, nanpArea, entry |
| commercial-400 | verdict, prefix |
| number-research | answer, sources, countryCode, language, cached |
| dial-code | code, kind, action, service, forwardsTo, calls, risk, undo, operator |
| call-scam-check | verdict, signals, actions, reportChannel |
| sms-check | verdict, confidence, reason |
| sms-brand | verdict, host, brand, officialDomains, sightings |
| sms-sender | kind, tooLong, brand, lookalike, digits, code |
| sms-code | verdict, severity, serviceRecoverySteps, stepCodes |
| sms-report | channel, verified, stepCodes, reportFields |
| sms-campaigns | totalCampaigns, totalSightings, topBrands, topDomains |
| sms-redact | text, counts, total |
| callback-number | numbers, signals, attention |
| prefix-directory | countryCode, callingCode, planVersion, total, page, limit, hasMore, rows |
| operator-directory | operators, specialPrefixes |
| calling-codes | rows, total |
| spam-directory | view, totals, categories, topReported, category, total, page, limit, hasMore, rows |
| trends | totals, activity24h, verification, freshness, categoryDistribution, phoneTypes, topOperators, growthTimeline, topPrefixes, searchTrends, communityDistribution, impersonationRanking, aiBreakdown |
| smishing | verdict, score, attention, signals, hosts, linkFlags, brand, brandSlug |
| link-check | host, hostAscii, official, brand, hosts, linkFlags, signals, attention |
| safety-tools | attention, signals, hosts, linkFlags |
| sms-filter | country, version, updatedAt, source, counts |
| qr-check | payload, signals, attention, hosts, linkFlags, link, numbers |
| email-headers | fromDomain, fromDomainAscii, displayName, replyToDomain, returnPathDomain, senderDomain, subject, auth, authenticated, brand, official, freeMail, signals, attention |
| mx-lookup | domain, domainAscii, found, records, nullMx, implicitMx, acceptsMail, provider, signals, attention |
| spf-check | domain, domainAscii, found, record, recordCount, terms, allResult, lookups, includes, signals, valid, attention |
| dmarc-check | domain, domainAscii, found, record, foundAt, inherited, policy, subdomainPolicy, effectivePolicy, percentage, alignment, reports, signals, valid, attention |
| dkim-check | domain, domainAscii, selectorGiven, selectorsTried, keys, signals, attention |
| email-verify | domain, domainAscii, status, syntaxValid, acceptsMail, mx, disposable, role, freeMail, suggestion, signals, attention |
| website-age | domain, domainAscii, rdapAvailable, found, registeredDomain, registered, updated, expires, ageDays, registrar, status, campaigns, signals, attention |
| domain-popularity | domain, domainAscii, ranked, rank, rankedDomain, refSubnets, refIps, listSize, updated, source |
| website-legit | domain, domainAscii, verdict, official, brand, ageDays, registered, ranked, rank, campaigns, signals, linkFlags, attention, checks |
| ip-lookup | ip, version, public, reverseDns, country, network, tor, hosting, hint, signals, attention, checks |
| ssl-check | domain, domainAscii, reachable, unreachableReason, ip, protocol, valid, authorizationError, hostnameMatch, selfSigned, subject, san, sanCount, issuerOrganization, issuerCommonName, validFrom, validTo, ageDays, daysLeft, signals, attention |
额度和限制
开通 Pro 每月免费获得 20 个点数
每次 API 调用消耗 1 个点数,优先使用每月点数。
重新生成会停用之前的密钥。额度余额保持不变。
curl 'https://api.nocall.io/v1/data/account' \
--header "Authorization: Bearer $NOCALL_API_KEY"重试与批量查询
每个新操作都应生成新的 Idempotency-Key。只有使用相同输入重试同一操作时才保留该标识。
Idempotency-Key 在单次查询中可选,批量查询中必填:8至128个字母、数字、点、连字符、下划线或冒号。重试时保持相同的标识、路径、API 密钥和请求体。重放响应不重复收费。响应不明确时先检查余额。
批量请求最多50项。product 选择操作。开始前余额必须足以覆盖所有有效输入;仅对已完成的有效结果收费。并发请求共享余额,若最终扣费前余额耗尽,会返回429且不收本次费用。
8–128 ASCII: A–Z a–z 0–9 . _ : -
TTL: 24 hphone-lookup
phone-risk
carrier-lookup
reverse-phone-lookup
phone-exposureREQUEST_ID="$(uuidgen)" && [ -n "$REQUEST_ID" ] &&
curl --request POST 'https://api.nocall.io/v1/data/bulk-lookups' \
--header "Authorization: Bearer $NOCALL_API_KEY" \
--header 'Content-Type: application/json' \
--header "Idempotency-Key: $REQUEST_ID" \
--data '{"product":"phone-risk","inputs":[{"phone":"+12025550123","country":"US"}]}'故障排查
| HTTP | 理解结果 |
|---|---|
| 401 | 缺少密钥、Bearer 格式错误,或密钥已过期、撤销。检查请求头或创建新密钥。 |
| 403 | 需要额度:有效的 Pro 账户每月包含的20个额度,或在账户页面购买的额度。两者都没有的账户会收到 403 pro_required。 |
| 400 / 422 | 检查 JSON、phone、country 和 Idempotency-Key。验证错误不消耗额度。 |
| 409 | 幂等标识已用于不同请求体,或请求仍在处理中。重试相同操作时保持请求体并等待。 |
| 429 | 额度耗尽或达到请求频率限制。查看 /account 和 X-RateLimit-Remaining;如有 Retry-After,请遵守。ai_busy 表示 AI 繁忙:该请求不计费,请在 Retry-After 后重试。 |
| 500 / 503 | 服务或提供方不可用,或测试版已关闭。稍后用相同 Idempotency-Key 重试,避免连续立即重试。tool_warming 表示 tool 仍在启动:该请求不计费,请在 Retry-After 后重试。 |
