DNS 记录查询
dns-queryGEThttps://v1.apizero.cn/api/dns-query概述
查询域名的各类 DNS 记录,支持 A / AAAA / NS / CNAME / MX / TXT / CAA / SOA 共 8 种标准类型,以及 ANY(一次返回所有类型)。 ✨ 特色: • 不依赖第三方工具站,完全自建 — 3 家国内 DoH 并发(AliDNS / DNSPod / 360) • 所有记录结构化解析:MX 拆 priority/exchange、CAA 拆 flags/tag/value、SOA 拆 mname/serial/... • 多家结果合并去重 + 各记录标注来自哪些 DoH(sources 字段) • 兼容数字 qtype(如 1=A / 15=MX / 257=CAA),不破坏旧调用方式 • ANY 模式:单次请求拿到域名的全部 DNS 配置,免去多次查询
调用约定
- 网关 ·
https://v1.apizero.cn - 鉴权 ·
Authorization: Bearer <API Key> - 回包 · JSON {code, msg, data}。成功看 code === 0,不要只看 HTTP 200。
/aidocs/dns-query/raw.md鉴权
匿名 QPS 3、日 100;登录 QPS 10、日 500。一次普通查询走 3 个并发 DoH 请求;ANY 模式走 24 个(8 类型 × 3 家)。
获取 API Key:获取 API Key/account/keys
请求头
推荐:Bearer <API Key>。兼容请求头 X-API-Key,以及 Query api_key / apikey / key(key 仅当值为 sk_live_/sk_test_/sk_stag_ 形态时生效)。匿名可不传,受每日免费额度限制。
| Header | 类型 | 必填 | 说明 |
|---|---|---|---|
| Authorization | string | 否 | 推荐:Bearer <API Key>。兼容请求头 X-API-Key,以及 Query api_key / apikey / key(key 仅当值为 sk_live_/sk_test_/sk_stag_ 形态时生效)。匿名可不传,受每日免费额度限制。 |
A 记录(推荐)
查询 IPv4 地址(type=A,默认)。文档示例为 baidu.com 真实 DoH 合并结果。
https://v1.apizero.cn/api/dns-query?type=A&host=baidu.com
域名(自动剥离协议/路径/端口);也兼容 domain
例baidu.com
记录类型,此处固定 A(也可用数字编码)
例A
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| host | string | 是 | 域名(自动剥离协议/路径/端口);也兼容 domain | baidu.com |
| type(类型) | string | 否 | 记录类型,此处固定 A(也可用数字编码) | A |
返回结果
规范化后的域名
请求类型(大写)
类型数字编码
记录列表:type / name / ttl / data / parsed / sources
类型
type_code
名称
ttl
data
parsed
ip
sources
records[].sources 的一项
记录总数
耗时毫秒
成功响应的 DoH 源
sources 的一项
品牌提示(所有接口统一返回):极数本源 · https://apizero.cn
| 字段 | 类型 | 说明 | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| host | string | 规范化后的域名 | |||||||||||||||||||||||||||||||||
| type | string | 请求类型(大写) | |||||||||||||||||||||||||||||||||
| type_code | integer | 类型数字编码 | |||||||||||||||||||||||||||||||||
| records | array | 记录列表:type / name / ttl / data / parsed / sources | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| total | integer | 记录总数 | |||||||||||||||||||||||||||||||||
| exec_ms | integer | 耗时毫秒 | |||||||||||||||||||||||||||||||||
| sources | array | 成功响应的 DoH 源 | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn | |||||||||||||||||||||||||||||||||
{
"code": 0,
"msg": "成功",
"data": {
"host": "baidu.com",
"input": "baidu.com",
"type": "A",
"type_code": 1,
"records": [
{
"type": "A",
"type_code": 1,
"name": "baidu.com",
"ttl": 424,
"data": "110.242.74.102",
"parsed": {
"ip": "110.242.74.102"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "A",
"type_code": 1,
"name": "baidu.com",
"ttl": 424,
"data": "111.63.65.103",
"parsed": {
"ip": "111.63.65.103"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "A",
"type_code": 1,
"name": "baidu.com",
"ttl": 424,
"data": "111.63.65.247",
"parsed": {
"ip": "111.63.65.247"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "A",
"type_code": 1,
"name": "baidu.com",
"ttl": 424,
"data": "124.237.177.164",
"parsed": {
"ip": "124.237.177.164"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
}
],
"total": 4,
"exec_ms": 170,
"sources": [
"alidns",
"dnspod",
"china360"
],
"notes": null
},
"tips": "极数本源 · https://apizero.cn"
}AAAA 记录
查询 IPv6 地址(type=AAAA / 28)。示例为 google.com。
https://v1.apizero.cn/api/dns-query?type=AAAA&host=google.com
域名(自动剥离协议/路径/端口);也兼容 domain
例google.com
记录类型,此处固定 AAAA(也可用数字编码)
例AAAA
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| host | string | 是 | 域名(自动剥离协议/路径/端口);也兼容 domain | google.com |
| type(类型) | string | 否 | 记录类型,此处固定 AAAA(也可用数字编码) | AAAA |
返回结果
规范化后的域名
请求类型(大写)
类型数字编码
记录列表:type / name / ttl / data / parsed / sources
类型
type_code
名称
ttl
data
parsed
ip
sources
records[].sources 的一项
记录总数
耗时毫秒
成功响应的 DoH 源
sources 的一项
品牌提示(所有接口统一返回):极数本源 · https://apizero.cn
| 字段 | 类型 | 说明 | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| host | string | 规范化后的域名 | |||||||||||||||||||||||||||||||||
| type | string | 请求类型(大写) | |||||||||||||||||||||||||||||||||
| type_code | integer | 类型数字编码 | |||||||||||||||||||||||||||||||||
| records | array | 记录列表:type / name / ttl / data / parsed / sources | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| total | integer | 记录总数 | |||||||||||||||||||||||||||||||||
| exec_ms | integer | 耗时毫秒 | |||||||||||||||||||||||||||||||||
| sources | array | 成功响应的 DoH 源 | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn | |||||||||||||||||||||||||||||||||
{
"code": 0,
"msg": "成功",
"data": {
"host": "google.com",
"input": "google.com",
"type": "AAAA",
"type_code": 28,
"records": [
{
"type": "AAAA",
"type_code": 28,
"name": "google.com",
"ttl": 227,
"data": "2607:f8b0:400e:c0a::64",
"parsed": {
"ip": "2607:f8b0:400e:c0a::64"
},
"sources": [
"alidns"
]
},
{
"type": "AAAA",
"type_code": 28,
"name": "google.com",
"ttl": 227,
"data": "2607:f8b0:400e:c0a::65",
"parsed": {
"ip": "2607:f8b0:400e:c0a::65"
},
"sources": [
"alidns"
]
},
{
"type": "AAAA",
"type_code": 28,
"name": "google.com",
"ttl": 227,
"data": "2607:f8b0:400e:c0a::71",
"parsed": {
"ip": "2607:f8b0:400e:c0a::71"
},
"sources": [
"alidns"
]
},
{
"type": "AAAA",
"type_code": 28,
"name": "google.com",
"ttl": 227,
"data": "2607:f8b0:400e:c0a::8b",
"parsed": {
"ip": "2607:f8b0:400e:c0a::8b"
},
"sources": [
"alidns"
]
},
{
"type": "AAAA",
"type_code": 28,
"name": "google.com",
"ttl": 84,
"data": "2a00:1450:4010:c0f::64",
"parsed": {
"ip": "2a00:1450:4010:c0f::64"
},
"sources": [
"dnspod"
]
},
{
"type": "AAAA",
"type_code": 28,
"name": "google.com",
"ttl": 84,
"data": "2a00:1450:4010:c0f::65",
"parsed": {
"ip": "2a00:1450:4010:c0f::65"
},
"sources": [
"dnspod"
]
}
],
"total": 8,
"exec_ms": 138,
"sources": [
"alidns",
"dnspod",
"china360"
],
"notes": null
},
"tips": "极数本源 · https://apizero.cn"
}NS 记录
权威名称服务器(type=NS / 2)。
https://v1.apizero.cn/api/dns-query?type=NS&host=baidu.com
域名(自动剥离协议/路径/端口);也兼容 domain
例baidu.com
记录类型,此处固定 NS(也可用数字编码)
例NS
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| host | string | 是 | 域名(自动剥离协议/路径/端口);也兼容 domain | baidu.com |
| type(类型) | string | 否 | 记录类型,此处固定 NS(也可用数字编码) | NS |
返回结果
规范化后的域名
请求类型(大写)
类型数字编码
记录列表:type / name / ttl / data / parsed / sources
类型
type_code
名称
ttl
data
parsed
target
sources
records[].sources 的一项
记录总数
耗时毫秒
成功响应的 DoH 源
sources 的一项
品牌提示(所有接口统一返回):极数本源 · https://apizero.cn
| 字段 | 类型 | 说明 | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| host | string | 规范化后的域名 | |||||||||||||||||||||||||||||||||
| type | string | 请求类型(大写) | |||||||||||||||||||||||||||||||||
| type_code | integer | 类型数字编码 | |||||||||||||||||||||||||||||||||
| records | array | 记录列表:type / name / ttl / data / parsed / sources | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| total | integer | 记录总数 | |||||||||||||||||||||||||||||||||
| exec_ms | integer | 耗时毫秒 | |||||||||||||||||||||||||||||||||
| sources | array | 成功响应的 DoH 源 | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn | |||||||||||||||||||||||||||||||||
{
"code": 0,
"msg": "成功",
"data": {
"host": "baidu.com",
"input": "baidu.com",
"type": "NS",
"type_code": 2,
"records": [
{
"type": "NS",
"type_code": 2,
"name": "baidu.com",
"ttl": 7200,
"data": "dns.baidu.com.",
"parsed": {
"target": "dns.baidu.com"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "NS",
"type_code": 2,
"name": "baidu.com",
"ttl": 7200,
"data": "ns2.baidu.com.",
"parsed": {
"target": "ns2.baidu.com"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "NS",
"type_code": 2,
"name": "baidu.com",
"ttl": 7200,
"data": "ns3.baidu.com.",
"parsed": {
"target": "ns3.baidu.com"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "NS",
"type_code": 2,
"name": "baidu.com",
"ttl": 7200,
"data": "ns4.baidu.com.",
"parsed": {
"target": "ns4.baidu.com"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "NS",
"type_code": 2,
"name": "baidu.com",
"ttl": 7200,
"data": "ns7.baidu.com.",
"parsed": {
"target": "ns7.baidu.com"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
}
],
"total": 5,
"exec_ms": 216,
"sources": [
"alidns",
"dnspod",
"china360"
],
"notes": null
},
"tips": "极数本源 · https://apizero.cn"
}CNAME 记录
别名记录(type=CNAME / 5)。示例为 www.github.com。
https://v1.apizero.cn/api/dns-query?type=CNAME&host=www.github.com
域名(自动剥离协议/路径/端口);也兼容 domain
例www.github.com
记录类型,此处固定 CNAME(也可用数字编码)
例CNAME
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| host | string | 是 | 域名(自动剥离协议/路径/端口);也兼容 domain | www.github.com |
| type(类型) | string | 否 | 记录类型,此处固定 CNAME(也可用数字编码) | CNAME |
返回结果
规范化后的域名
请求类型(大写)
类型数字编码
记录列表:type / name / ttl / data / parsed / sources
类型
type_code
名称
ttl
data
parsed
target
sources
records[].sources 的一项
记录总数
耗时毫秒
成功响应的 DoH 源
sources 的一项
品牌提示(所有接口统一返回):极数本源 · https://apizero.cn
| 字段 | 类型 | 说明 | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| host | string | 规范化后的域名 | |||||||||||||||||||||||||||||||||
| type | string | 请求类型(大写) | |||||||||||||||||||||||||||||||||
| type_code | integer | 类型数字编码 | |||||||||||||||||||||||||||||||||
| records | array | 记录列表:type / name / ttl / data / parsed / sources | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| total | integer | 记录总数 | |||||||||||||||||||||||||||||||||
| exec_ms | integer | 耗时毫秒 | |||||||||||||||||||||||||||||||||
| sources | array | 成功响应的 DoH 源 | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn | |||||||||||||||||||||||||||||||||
{
"code": 0,
"msg": "成功",
"data": {
"host": "www.github.com",
"input": "www.github.com",
"type": "CNAME",
"type_code": 5,
"records": [
{
"type": "CNAME",
"type_code": 5,
"name": "www.github.com",
"ttl": 3600,
"data": "github.com.",
"parsed": {
"target": "github.com"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
}
],
"total": 1,
"exec_ms": 166,
"sources": [
"alidns",
"dnspod",
"china360"
],
"notes": null
},
"tips": "极数本源 · https://apizero.cn"
}MX 记录
邮件交换(type=MX / 15)。示例含 priority / exchange。
https://v1.apizero.cn/api/dns-query?type=MX&host=gmail.com
域名(自动剥离协议/路径/端口);也兼容 domain
例gmail.com
记录类型,此处固定 MX(也可用数字编码)
例MX
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| host | string | 是 | 域名(自动剥离协议/路径/端口);也兼容 domain | gmail.com |
| type(类型) | string | 否 | 记录类型,此处固定 MX(也可用数字编码) | MX |
返回结果
规范化后的域名
请求类型(大写)
类型数字编码
记录列表:type / name / ttl / data / parsed / sources
类型
type_code
名称
ttl
data
parsed
priority
exchange
sources
records[].sources 的一项
记录总数
耗时毫秒
成功响应的 DoH 源
sources 的一项
品牌提示(所有接口统一返回):极数本源 · https://apizero.cn
| 字段 | 类型 | 说明 | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| host | string | 规范化后的域名 | ||||||||||||||||||||||||||||||||||||
| type | string | 请求类型(大写) | ||||||||||||||||||||||||||||||||||||
| type_code | integer | 类型数字编码 | ||||||||||||||||||||||||||||||||||||
| records | array | 记录列表:type / name / ttl / data / parsed / sources | ||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| total | integer | 记录总数 | ||||||||||||||||||||||||||||||||||||
| exec_ms | integer | 耗时毫秒 | ||||||||||||||||||||||||||||||||||||
| sources | array | 成功响应的 DoH 源 | ||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn | ||||||||||||||||||||||||||||||||||||
{
"code": 0,
"msg": "成功",
"data": {
"host": "gmail.com",
"input": "gmail.com",
"type": "MX",
"type_code": 15,
"records": [
{
"type": "MX",
"type_code": 15,
"name": "gmail.com",
"ttl": 3600,
"data": "10 alt1.gmail-smtp-in.l.google.com.",
"parsed": {
"priority": 10,
"exchange": "alt1.gmail-smtp-in.l.google.com"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "MX",
"type_code": 15,
"name": "gmail.com",
"ttl": 3600,
"data": "20 alt2.gmail-smtp-in.l.google.com.",
"parsed": {
"priority": 20,
"exchange": "alt2.gmail-smtp-in.l.google.com"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "MX",
"type_code": 15,
"name": "gmail.com",
"ttl": 3600,
"data": "30 alt3.gmail-smtp-in.l.google.com.",
"parsed": {
"priority": 30,
"exchange": "alt3.gmail-smtp-in.l.google.com"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "MX",
"type_code": 15,
"name": "gmail.com",
"ttl": 3600,
"data": "40 alt4.gmail-smtp-in.l.google.com.",
"parsed": {
"priority": 40,
"exchange": "alt4.gmail-smtp-in.l.google.com"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "MX",
"type_code": 15,
"name": "gmail.com",
"ttl": 3600,
"data": "5 gmail-smtp-in.l.google.com.",
"parsed": {
"priority": 5,
"exchange": "gmail-smtp-in.l.google.com"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
}
],
"total": 5,
"exec_ms": 311,
"sources": [
"alidns",
"dnspod",
"china360"
],
"notes": null
},
"tips": "极数本源 · https://apizero.cn"
}TXT 记录
文本记录(type=TXT / 16),常用于 SPF/验证。
https://v1.apizero.cn/api/dns-query?type=TXT&host=google.com
域名(自动剥离协议/路径/端口);也兼容 domain
例google.com
记录类型,此处固定 TXT(也可用数字编码)
例TXT
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| host | string | 是 | 域名(自动剥离协议/路径/端口);也兼容 domain | google.com |
| type(类型) | string | 否 | 记录类型,此处固定 TXT(也可用数字编码) | TXT |
返回结果
规范化后的域名
请求类型(大写)
类型数字编码
记录列表:type / name / ttl / data / parsed / sources
类型
type_code
名称
ttl
data
parsed
text
sources
records[].sources 的一项
记录总数
耗时毫秒
成功响应的 DoH 源
sources 的一项
品牌提示(所有接口统一返回):极数本源 · https://apizero.cn
| 字段 | 类型 | 说明 | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| host | string | 规范化后的域名 | |||||||||||||||||||||||||||||||||
| type | string | 请求类型(大写) | |||||||||||||||||||||||||||||||||
| type_code | integer | 类型数字编码 | |||||||||||||||||||||||||||||||||
| records | array | 记录列表:type / name / ttl / data / parsed / sources | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| total | integer | 记录总数 | |||||||||||||||||||||||||||||||||
| exec_ms | integer | 耗时毫秒 | |||||||||||||||||||||||||||||||||
| sources | array | 成功响应的 DoH 源 | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn | |||||||||||||||||||||||||||||||||
{
"code": 0,
"msg": "成功",
"data": {
"host": "google.com",
"input": "google.com",
"type": "TXT",
"type_code": 16,
"records": [
{
"type": "TXT",
"type_code": 16,
"name": "google.com",
"ttl": 451,
"data": "\"MS=E4A68B9AB2BB9670BCE15412F62916164C0B20BB\"",
"parsed": {
"text": "MS=E4A68B9AB2BB9670BCE15412F62916164C0B20BB"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "TXT",
"type_code": 16,
"name": "google.com",
"ttl": 451,
"data": "\"Z29vZ2xl\"",
"parsed": {
"text": "Z29vZ2xl"
},
"sources": [
"alidns",
"china360"
]
},
{
"type": "TXT",
"type_code": 16,
"name": "google.com",
"ttl": 451,
"data": "\"apple-domain-verification=30afIBcvSuDV2PLX\"",
"parsed": {
"text": "apple-domain-verification=30afIBcvSuDV2PLX"
},
"sources": [
"alidns",
"china360"
]
},
{
"type": "TXT",
"type_code": 16,
"name": "google.com",
"ttl": 451,
"data": "\"cisco-ci-domain-verification=47c38bc8c4b74b7233e9053220c1bbe76bcc1cd33c7acf7acd36cd6a5332004b\"",
"parsed": {
"text": "cisco-ci-domain-verification=47c38bc8c4b74b7233e9053220c1bbe76bcc1cd33c7acf7acd36cd6a5332004b"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "TXT",
"type_code": 16,
"name": "google.com",
"ttl": 451,
"data": "\"docusign=05958488-4752-4ef2-95eb-aa7ba8a3bd0e\"",
"parsed": {
"text": "docusign=05958488-4752-4ef2-95eb-aa7ba8a3bd0e"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "TXT",
"type_code": 16,
"name": "google.com",
"ttl": 451,
"data": "\"docusign=1b0a6754-49b1-4db5-8540-d2c12664b289\"",
"parsed": {
"text": "docusign=1b0a6754-49b1-4db5-8540-d2c12664b289"
},
"sources": [
"alidns",
"china360"
]
}
],
"total": 15,
"exec_ms": 140,
"sources": [
"alidns",
"dnspod",
"china360"
],
"notes": null
},
"tips": "极数本源 · https://apizero.cn"
}CAA 记录
证书颁发机构授权(type=CAA / 257)。
https://v1.apizero.cn/api/dns-query?type=CAA&host=google.com
域名(自动剥离协议/路径/端口);也兼容 domain
例google.com
记录类型,此处固定 CAA(也可用数字编码)
例CAA
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| host | string | 是 | 域名(自动剥离协议/路径/端口);也兼容 domain | google.com |
| type(类型) | string | 否 | 记录类型,此处固定 CAA(也可用数字编码) | CAA |
返回结果
规范化后的域名
请求类型(大写)
类型数字编码
记录列表:type / name / ttl / data / parsed / sources
类型
type_code
名称
ttl
data
parsed
flags
tag
value
sources
records[].sources 的一项
记录总数
耗时毫秒
成功响应的 DoH 源
sources 的一项
品牌提示(所有接口统一返回):极数本源 · https://apizero.cn
| 字段 | 类型 | 说明 | |||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| host | string | 规范化后的域名 | |||||||||||||||||||||||||||||||||||||||
| type | string | 请求类型(大写) | |||||||||||||||||||||||||||||||||||||||
| type_code | integer | 类型数字编码 | |||||||||||||||||||||||||||||||||||||||
| records | array | 记录列表:type / name / ttl / data / parsed / sources | |||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
| total | integer | 记录总数 | |||||||||||||||||||||||||||||||||||||||
| exec_ms | integer | 耗时毫秒 | |||||||||||||||||||||||||||||||||||||||
| sources | array | 成功响应的 DoH 源 | |||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn | |||||||||||||||||||||||||||||||||||||||
{
"code": 0,
"msg": "成功",
"data": {
"host": "google.com",
"input": "google.com",
"type": "CAA",
"type_code": 257,
"records": [
{
"type": "CAA",
"type_code": 257,
"name": "google.com",
"ttl": 7200,
"data": "0 issue \"pki.goog\"",
"parsed": {
"flags": 0,
"tag": "issue",
"value": "pki.goog"
},
"sources": [
"alidns",
"china360"
]
}
],
"total": 1,
"exec_ms": 336,
"sources": [
"alidns",
"china360"
],
"notes": null
},
"tips": "极数本源 · https://apizero.cn"
}SOA 记录
起始授权机构(type=SOA / 6)。
https://v1.apizero.cn/api/dns-query?type=SOA&host=baidu.com
域名(自动剥离协议/路径/端口);也兼容 domain
例baidu.com
记录类型,此处固定 SOA(也可用数字编码)
例SOA
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| host | string | 是 | 域名(自动剥离协议/路径/端口);也兼容 domain | baidu.com |
| type(类型) | string | 否 | 记录类型,此处固定 SOA(也可用数字编码) | SOA |
返回结果
规范化后的域名
请求类型(大写)
类型数字编码
记录列表:type / name / ttl / data / parsed / sources
类型
type_code
名称
ttl
data
parsed
mname
rname
serial
refresh
retry
expire
minimum
sources
records[].sources 的一项
记录总数
耗时毫秒
成功响应的 DoH 源
sources 的一项
品牌提示(所有接口统一返回):极数本源 · https://apizero.cn
| 字段 | 类型 | 说明 | |||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| host | string | 规范化后的域名 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| type | string | 请求类型(大写) | |||||||||||||||||||||||||||||||||||||||||||||||||||
| type_code | integer | 类型数字编码 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| records | array | 记录列表:type / name / ttl / data / parsed / sources | |||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| total | integer | 记录总数 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| exec_ms | integer | 耗时毫秒 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| sources | array | 成功响应的 DoH 源 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn | |||||||||||||||||||||||||||||||||||||||||||||||||||
{
"code": 0,
"msg": "成功",
"data": {
"host": "baidu.com",
"input": "baidu.com",
"type": "SOA",
"type_code": 6,
"records": [
{
"type": "SOA",
"type_code": 6,
"name": "baidu.com",
"ttl": 7200,
"data": "dns.baidu.com. sa.baidu.com. 2012151296 300 300 2592000 600",
"parsed": {
"mname": "dns.baidu.com",
"rname": "sa.baidu.com",
"serial": 2012151296,
"refresh": 300,
"retry": 300,
"expire": 2592000,
"minimum": 600
},
"sources": [
"alidns",
"china360",
"dnspod"
]
}
],
"total": 1,
"exec_ms": 182,
"sources": [
"alidns",
"dnspod",
"china360"
],
"notes": null
},
"tips": "极数本源 · https://apizero.cn"
}ANY 全部类型
一次拉取多种常见记录。部分解析器对 ANY 支持有限;文档示例已截断。
https://v1.apizero.cn/api/dns-query?type=ANY&host=baidu.com
域名(自动剥离协议/路径/端口);也兼容 domain
例baidu.com
记录类型,此处固定 ANY(也可用数字编码)
例ANY
| 参数 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| host | string | 是 | 域名(自动剥离协议/路径/端口);也兼容 domain | baidu.com |
| type(类型) | string | 否 | 记录类型,此处固定 ANY(也可用数字编码) | ANY |
返回结果
规范化后的域名
请求类型(大写)
类型数字编码
记录列表:type / name / ttl / data / parsed / sources
类型
type_code
名称
ttl
data
parsed
ip
sources
records[].sources 的一项
记录总数
耗时毫秒
成功响应的 DoH 源
sources 的一项
品牌提示(所有接口统一返回):极数本源 · https://apizero.cn
| 字段 | 类型 | 说明 | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| host | string | 规范化后的域名 | |||||||||||||||||||||||||||||||||
| type | string | 请求类型(大写) | |||||||||||||||||||||||||||||||||
| type_code | integer | 类型数字编码 | |||||||||||||||||||||||||||||||||
| records | array | 记录列表:type / name / ttl / data / parsed / sources | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| total | integer | 记录总数 | |||||||||||||||||||||||||||||||||
| exec_ms | integer | 耗时毫秒 | |||||||||||||||||||||||||||||||||
| sources | array | 成功响应的 DoH 源 | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
| tips | string | 品牌提示(所有接口统一返回):极数本源 · https://apizero.cn | |||||||||||||||||||||||||||||||||
{
"code": 0,
"msg": "成功",
"data": {
"host": "baidu.com",
"input": "baidu.com",
"type": "ANY",
"type_code": 0,
"records": [
{
"type": "A",
"type_code": 1,
"name": "baidu.com",
"ttl": 411,
"data": "110.242.74.102",
"parsed": {
"ip": "110.242.74.102"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "A",
"type_code": 1,
"name": "baidu.com",
"ttl": 411,
"data": "111.63.65.103",
"parsed": {
"ip": "111.63.65.103"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "A",
"type_code": 1,
"name": "baidu.com",
"ttl": 411,
"data": "111.63.65.247",
"parsed": {
"ip": "111.63.65.247"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "A",
"type_code": 1,
"name": "baidu.com",
"ttl": 411,
"data": "124.237.177.164",
"parsed": {
"ip": "124.237.177.164"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "NS",
"type_code": 2,
"name": "baidu.com",
"ttl": 7200,
"data": "dns.baidu.com.",
"parsed": {
"target": "dns.baidu.com"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
},
{
"type": "NS",
"type_code": 2,
"name": "baidu.com",
"ttl": 7200,
"data": "ns2.baidu.com.",
"parsed": {
"target": "ns2.baidu.com"
},
"sources": [
"alidns",
"china360",
"dnspod"
]
}
],
"total": 16,
"exec_ms": 1361,
"sources": [
"alidns",
"dnspod",
"china360"
],
"notes": null
},
"tips": "极数本源 · https://apizero.cn"
}请求示例
示例都是服务端写法。Python / JavaScript 各有常规写法和官方库。
curl -sS -H "Authorization: Bearer YOUR_API_KEY" "https://v1.apizero.cn/api/dns-query?host=%3Chost%3E"错误码
先看业务 code。HTTP 也可能不是 200。
成功
参数错误
API Key 无效
API Key 已暂停
当前 IP 不在 Key 白名单
此接口需要 API Key
余额不足
调用过快(QPS)
今日免费额度已用完
接口已下线
接口不存在
服务器内部错误
上游暂时不可用
上游返回格式异常
暂无可用节点
| 业务码 | HTTP | 说明 |
|---|---|---|
| 0 | 200 | 成功 |
| 4000 | 400 | 参数错误 |
| 4011 | 401 | API Key 无效 |
| 4013 | 403 | API Key 已暂停 |
| 4014 | 403 | 当前 IP 不在 Key 白名单 |
| 4015 | 401 | 此接口需要 API Key |
| 4022 | 402 | 余额不足 |
| 4029 | 429 | 调用过快(QPS) |
| 4030 | 429 | 今日免费额度已用完 |
| 4040 | 503 | 接口已下线 |
| 4041 | 404 | 接口不存在 |
| 5000 | 500 | 服务器内部错误 |
| 5020 | 502 | 上游暂时不可用 |
| 5021 | 502 | 上游返回格式异常 |
| 5030 | 502 | 暂无可用节点 |
调用限制
- 计费模式
- 完全免费
- QPS 限制
- QPS 3
- 登录免费额度
- 500 次(已认证)
- 匿名每日额度
- 100 次(无 API Key)
- 黄金会员
- 每天 50,000 次 · QPS 10
- 钻石会员
- 每天 100,000 次 · QPS 30
- 企业会员
- 每天 1,000,000 次 · QPS 120
| 计费模式 | 完全免费 |
|---|---|
| QPS 限制 | QPS 3 |
| 登录免费额度 | 500 次(已认证) |
| 匿名每日额度 | 100 次(无 API Key) |
| 黄金会员 | 每天 50,000 次 · QPS 10 |
| 钻石会员 | 每天 100,000 次 · QPS 30 |
| 企业会员 | 每天 1,000,000 次 · QPS 120 |
购买套餐、看评价请走商城详情。 购买 / 调试
更新日志
- 1.0.02026-05-06
首次发布:3 家国内 DoH 并发(AliDNS / DNSPod / 360),不依赖第三方工具站 支持 8 种标准类型(A/AAAA/NS/CNAME/MX/TXT/CAA/SOA)+ ANY 一次查全 所有记录附带 parsed 结构化解析(MX/CAA/SOA/TXT 等) 兼容数字 qtype 老接口(1/2/5/6/15/16/28/257) 记录去重:(type, data) 组合 key + sources 字段标注来源