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>首次查詢
全部 44 個 tools 都可透過 API 使用:呼叫 POST /v2/<tool-id>,或在主體中加上 tool 欄位並呼叫 POST /v2/tools。每個 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
全部 44 個 tools 都可透過 API 使用:呼叫 POST /v2/<tool-id>,或在主體中加上 tool 欄位並呼叫 POST /v2/tools。每個 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 | 這個 QR 碼安全嗎? | /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"} |
可用端點
僅顯示經審核或公開的技術資料,不顯示私人身分和防護訊號。
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 | 這個 QR 碼安全嗎? | 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 |
| 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 |
額度和限制
開通 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 後重試。 |
