Super Whois API
簡單易用的 JSON 格式 WHOIS 查詢介面,支援域名、IP 及 ASN。
v2.0基礎 URL
GEThttps://w.ppee.eu.org/api.php
認證
該 API 無需金鑰即可公開存取。使用 API Key 的請求可繞過速率限制。
GEThttps://w.ppee.eu.org/api.php?q=google.com&key=YOUR_API_KEY
如需建立 API Key,請在相同目錄下新增 api_keys.php 檔案:
<?php
$apiKeys = [
'sk_live_your_secret_key_here',
];
速率限制
未認證請求每小時每個 IP 最多 60 次。
| 回應標頭 | 說明 |
|---|---|
X-RateLimit-Limit | 每個時間視窗的最大請求數 |
X-RateLimit-Remaining | 當前視窗剩餘請求數 |
X-RateLimit-Reset | 時間視窗重置的 Unix 時間戳 |
請求參數
| 參數 | 必填 | 說明 |
|---|---|---|
q |
必填 | 查詢目標。支援域名(如 google.com)、IPv4/IPv6 位址,或 ASN(如 AS15169)。 |
key |
可選 | API Key,有效時可繞過速率限制。 |
dns |
可選 | 設為 true 時在域名查詢結果中附加 DNS 記錄(A、AAAA、MX、TXT、NS) |
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
回應欄位說明
| 欄位 | 類型 | 說明 |
|---|---|---|
query | string | 經過處理的查詢輸入 |
query_type | string | domain | ipv4 | ipv6 | asn |
status | string | registered | available | found | unsupported_tld | error |
whois_server | string | 實際提供資料的 WHOIS 伺服器 |
timestamp | ISO 8601 | 本次 API 回應的 UTC 時間 |
query_ms | integer | 查詢耗時(毫秒) |
api_version | string | API 版本號 |
data | object | 結構化解析欄位(僅域名查詢且已註冊時回傳) |
data.creation_date | ISO 8601 | 域名註冊日期 |
data.expiration_date | ISO 8601 | 域名到期日期 |
data.updated_date | ISO 8601 | 最後更新日期 |
data.registrar | string | 註冊商名稱 |
data.registrar_iana_id | string | 註冊商 IANA 編號 |
data.nameservers | array | 域名伺服器列表(小寫,已排序) |
data.status | array | 域名 EPP 狀態碼 |
data.dnssec | string | signed(已簽署)或 unsigned(未簽署) |
subdomain_suggestion | string? | 若查詢的是子域名,建議查詢的頂級域名 |
raw | string | 完整原始 WHOIS 回應(IP 已脫敏) |
回應範例 — api.php?q=google.com
{
"query": "google.com",
"query_type": "domain",
"whois_server": "whois.markmonitor.com",
"status": "registered",
"timestamp": "2025-01-15T10:23:45Z",
"query_ms": 320,
"api_version": "2.0",
"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"
},
"raw": "Domain Name: GOOGLE.COM\r\n..."
}
錯誤碼
| HTTP | 含義 |
|---|---|
400 | 請求錯誤 — q 參數無效或缺失 |
401 | 未授權 — 需要 API Key 但未提供或無效 |
429 | 請求過頻 — 超出速率限制 |
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 "https://w.ppee.eu.org/api.php?q=google.com" | python3 -m json.tool