DNSSOR REST API
版本 1.0 — 基本 URL: https://dnssor.com/api/v1
快速、可靠的 JSON API,用于 DNS 查找、WHOIS 查询、SSL 证书分析和 IP 地理定位。专为开发人员和系统管理员设计。
🔐 🔐 认证
所有请求都需要 API 密钥。通过 Google 进行身份验证即可立即获取 — 无需注册表格。
选项 1 — 标头(推荐)
X-API-Key: demo-key-dnssor-2026
选项 2 — 查询字符串
?api_key=demo-key-dnssor-2026
🧪 用于测试的演示密钥:
demo-key-dnssor-2026(100 个请求/小时限制) ⚡ ⚡ 速率限制
| Plan | 请求/小时 | 缓存生存时间 |
|---|---|---|
| 演示(无需授权) | — | — |
| 免费(谷歌登录) | 100 | 不可用 |
| 专业版(联系我们) | 10,000 | 不可用 |
超出限制将返回 HTTP 429。标头:X-RateLimit-Remaining
📡 📡 端点
| 方法 | 端点 | 描述 | 缓存 |
|---|---|---|---|
| GET | /api/v1/dns | DNS 查找(A、AAAA、MX、NS、TXT、CNAME、SOA) | 5 min |
| GET | /api/v1/whois | WHOIS解析+原始数据 | 1 hr |
| GET | /api/v1/ssl | SSL 证书详细信息 + SAN + 剩余天数 | 1 hr |
| GET | /api/v1/ip | IP地理定位+ISP+ASN+反向DNS | 1 hr |
| GET | /api/v1/ping | TCP ping 测试(通过端口 80 的 4 个数据包) | 不可用 |
| GET | /api/v1/status | API运行状态 | 不可用 |
GET /api/v1/dns
查询域的 DNS 记录。
| 范围 | 类型 | 必需的 | 描述 |
|---|---|---|---|
| domain | string | ✅ | Domain |
| type | string | — | 记录类型:A、AAAA、MX、NS、TXT、CNAME、SOA、ALL(默认:ALL) |
| server | string | — | DNS服务器IP(默认:1.1.1.1) |
curl "https://dnssor.com/api/v1/dns?domain=google.com&type=MX" \
-H "X-API-Key: demo-key-dnssor-2026"
回复:
{
"success": true,
"data": {
"domain": "google.com",
"server": "1.1.1.1",
"records": [
{ "type": "MX", "name": "google.com", "value": "smtp.google.com", "ttl": 3600, "extras": { "pref": 10 } }
],
"count": 1
},
"timestamp": 1783836175}
GET /api/v1/whois
| 范围 | 必需的 | 描述 |
|---|---|---|
| domain | ✅ | Domain |
| raw | — | 原始 WHOIS |
curl "https://dnssor.com/api/v1/whois?domain=google.com&raw=1" \
-H "X-API-Key: demo-key-dnssor-2026"
GET /api/v1/ssl
curl "https://dnssor.com/api/v1/ssl?domain=google.com" \
-H "X-API-Key: demo-key-dnssor-2026"
GET /api/v1/ip
| 范围 | 必需的 | 描述 |
|---|---|---|
| ip | ✅ | IP地址 |
curl "https://dnssor.com/api/v1/ip?ip=8.8.8.8" \
-H "X-API-Key: demo-key-dnssor-2026"
📦 📦 库和 SDK
JavaScript / Node.js
const res = await fetch(
'https://dnssor.com/api/v1/dns?domain=google.com',
{ headers: { 'X-API-Key': 'demo-key-dnssor-2026' } }
);
const data = await res.json();
Python
import requests
r = requests.get(
'https://dnssor.com/api/v1/dns',
params={'domain': 'google.com'},
headers={'X-API-Key': 'demo-key-dnssor-2026'}
)