Super Whois

返回查詢頁

Super Whois API

簡單易用的 JSON 格式 WHOIS 查詢介面,支援域名、IP 及 ASN。

v2.2.2

基礎 URL

GEThttps://w.ppee.eu.org/api.php
POSThttps://w.ppee.eu.org/api.php

POST JSON 支援 {"q":"example.com"}{"queries":["example.com","example.org"]}

認證

該 API 預設可公開存取。認證請求可獲得較高但仍有限的配額。

curl -H "Authorization: Bearer YOUR_API_KEY" "https://w.ppee.eu.org/api.php?q=google.com"

請使用 Authorization: Bearer(首選)或 X-API-Key 請求標頭。本機可直接把 SK 碼填入 api_keys.php;生產環境建議使用環境變數。URL 參數中的金鑰已棄用。

本機簡單設定(編輯 api_keys.php)

$apiKeys = ['paste-your-sk-code-here'];
SUPER_WHOIS_API_KEYS=replace-with-a-long-random-secret

速率限制

未認證客戶端每小時每個 IP 有 60 個查詢單位;每個唯一查詢消耗一個單位,DNS 擴充再消耗一個。

回應標頭說明
RateLimit-Limit每個時間視窗的最大查詢單位
RateLimit-Remaining目前視窗剩餘查詢單位
RateLimit-Reset目前時間視窗重置前的秒數
Retry-After觸發限流後可再次請求前需等待的秒數

請求參數

參數必填說明
q / queries 必填 查詢目標。支援域名(如 google.com)、IPv4/IPv6 位址,或 ASN(如 AS15169)。逗號或換行分隔多個查詢可進入批次模式。 POST JSON 支援 {"q":"example.com"}{"queries":["example.com","example.org"]}。 公開/認證上限:10/50 個查詢。輸出位置會保留,重複查詢只執行一次上游工作。
key 可選 已棄用的 URL API Key 參數;請改用 AuthorizationX-API-Key 請求標頭。
dns 可選 設為 true 時在域名查詢結果中附加 DNS 記錄(A、AAAA、MX、TXT、NS)
raw 可選 單筆查詢預設包含原始資料,批次查詢預設省略;可明確設為 truefalse,原始資料有大小上限。
pretty 可選 設為 true 輸出格式化 JSON;預設回傳緊湊 JSON
lang 可選 文件語言:en(預設)、zh-cn(簡體)或 zh-tw(繁體)

介面與範例

域名查詢

GEThttps://w.ppee.eu.org/api.php?q=google.com

IP 查詢

GEThttps://w.ppee.eu.org/api.php?q=8.8.8.8

ASN 查詢

GEThttps://w.ppee.eu.org/api.php?q=AS15169

域名 + DNS 記錄查詢

GEThttps://w.ppee.eu.org/api.php?q=google.com&dns=true

批次查詢

GEThttps://w.ppee.eu.org/api.php?q=google.com,github.com,cloudflare.com&raw=false
POST{"queries":["google.com","github.com"],"raw":false}

回應欄位說明

HTTP 200 表示請求已處理;客戶端仍須檢查每個項目的 status。為相容 v2,上游查詢失敗會以應用層 status=error 表示。

欄位類型說明
querystring經過處理的查詢輸入
query_typestringdomain | ipv4 | ipv6 | asn
query_methodstringRDAP、WHOIS、後備方法或 none
lookup_domainstring|null域名查詢使用 PSL 計算出的可註冊域名
unicode_domainstring?輸入為 IDN A-label 時的可讀 Unicode 域名
is_subdomainboolean?輸入被規範化為可註冊 apex 時為 true
statusstringregistered | available | found | restricted | error;available 表示權威資料未找到,並非保證可購買
whois_serverstring|null實際提供資料的 RDAP 或 WHOIS 上游伺服器
attempted_serversarray?回傳結果前嘗試過的伺服器,用於傳輸與後備路由診斷
timestampISO 8601本次 API 回應的 UTC 時間
query_msinteger查詢耗時(毫秒)
cachedboolean規範化查詢是否來自伺服器快取
cache_age_sinteger快取值的存在時間(秒)
staleboolean?暫時刷新失敗後返回的已註冊最近可信快取
duration_msnumber查詢或批次請求耗時(毫秒)
availabilitystring?權威 RDAP 404 時為 not_found;不代表保證可購買
upstream_statusinteger?可用時記錄相關上游 HTTP 狀態
dns_recordsobject?dns=true 時返回原始輸入主機名的 DNS 資料
error_codestring?穩定的機器可讀應用錯誤碼
request_idstring關聯 ID,也會透過 X-Request-ID 返回
api_versionstringAPI 版本號
dataobject結構化解析欄位(僅域名查詢且已註冊時回傳)
data.creation_dateISO 8601域名註冊日期
data.expiration_dateISO 8601域名到期日期
data.updated_dateISO 8601最後更新日期
data.registrarstring註冊商名稱
data.registrar_iana_idstring註冊商 IANA 編號
data.registrant_address
data.registrant_city
data.registrant_region
data.registrant_postal_code
string?註冊局公開時提供的註冊人地址組成部分
data.nameserversarray域名伺服器列表(小寫、去重;順序不保證)
data.statusarray域名 EPP 狀態碼
data.dnssecstringsigned(已簽署)或 unsigned(未簽署)
subdomain_suggestionstring?若查詢的是子域名,建議查詢的頂級域名
rawstring?原始 RDAP/WHOIS 回應(IP 已脫敏);可用 raw=false 省略; 每項最多 131072 位元組
raw_truncatedboolean?原始上游資料被大小限制時為 true
batch/count/succeeded/failed批次封裝中繼資料批次封裝摘要;結果保持輸入順序

回應範例 — api.php?q=google.com

{ "query": "google.com", "query_type": "domain", "query_method": "rdap", "lookup_domain": "google.com", "whois_server": "rdap.verisign.com", "status": "registered", "cached": false, "cache_age_s": 0, "timestamp": "2026-08-08T10:23:45Z", "query_ms": 180, "api_version": "2.2.2", "data": { "creation_date": "1997-09-15T04:00:00Z", "expiration_date": "2028-09-14T04:00:00Z", "updated_date": "2019-09-09T15:39:04Z", "registrar": "MarkMonitor Inc.", "registrar_iana_id": "292", "registrar_whois": "whois.markmonitor.com", "nameservers": ["ns1.google.com","ns2.google.com","ns3.google.com","ns4.google.com"], "status": ["clientDeleteProhibited","clientTransferProhibited"], "dnssec": "unsigned" }, "request_id": "9c2e7f6f26a9d2c1", "raw": "RDAP 200 from rdap.verisign.com\n--- RDAP JSON ---\n{...}" }

批次回應 — api.php?q=google.com,github.com

{ "batch": true, "count": 2, "succeeded": 2, "failed": 0, "duration_ms": 420, "api_version": "2.2.2", "request_id": "9c2e7f6f26a9d2c1", "timestamp": "2026-08-08T10:23:45Z", "results": [ { "query": "google.com", "query_type": "domain", "status": "registered", "..." : "..." }, { "query": "github.com", "query_type": "domain", "status": "registered", "..." : "..." } ] }

錯誤碼

HTTP含義
400請求錯誤 — q 參數無效或缺失
401未授權 — 需要 API Key 但未提供或無效
405不允許的請求方法
413請求內容或產生的回應超過設定上限
422超過批次查詢上限
429請求過頻 — 超出速率限制
503限流儲存或其他必要執行服務不可用
500伺服器錯誤 — PHP 擴充套件缺失或設定錯誤

線上測試

程式碼範例

JavaScript (fetch)

fetch("https:\/\/w.ppee.eu.org\/api.php?q=google.com") .then(r => r.json()) .then(data => { console.log(data.status); // "registered" console.log(data.data.registrar); // "MarkMonitor Inc." console.log(data.data.expiration_date); // "2028-09-14T04:00:00Z" });

Python (requests)

import requests resp = requests.get("https:\/\/w.ppee.eu.org\/api.php", params={'q': 'google.com'}) data = resp.json() print(data['status']) print(data['data']['registrar'])

cURL

curl -H "Authorization: Bearer YOUR_API_KEY" "https://w.ppee.eu.org/api.php?q=google.com&raw=false" | python3 -m json.tool

批次查詢 (cURL)

curl "https://w.ppee.eu.org/api.php?q=google.com,github.com,cloudflare.com&raw=false" | python3 -m json.tool

POST JSON

curl -X POST -H "Content-Type: application/json" -d '{"queries":["google.com","github.com"],"raw":false}' "https://w.ppee.eu.org/api.php"