域名综合信息查询
包含whois+dns检测+icp备案查询
接口信息
GET / POST
api.xunjinlu.fun/api/dnspod/index
Method
GET / POST
分类
网络服务
Calls
0
KEY
KEY 必填
计费
免费
QPM
60/MIN
鉴权方式
Query 参数、Header(X-API-Key)、Bearer Token
作者
请求参数
| 参数名 | 类型 | 必填 | 说明 | 示例 |
|---|---|---|---|---|
| key | string | 是 | 接口调用密钥 | |
| domain | string | 是 | 需要查询的域名 | |
| module | string | 否 | ||
| refresh | string | 否 | 跳过缓存,强制重新查询 | |
| raw | string | 否 | ||
| health | string | 否 |
[
{
"name": "key",
"type": "string",
"required": true,
"description": "接口调用密钥",
"example": ""
},
{
"name": "domain",
"type": "string",
"required": true,
"description": "需要查询的域名",
"example": ""
},
{
"name": "module",
"type": "string",
"required": false,
"description": "",
"example": ""
},
{
"name": "refresh",
"type": "string",
"required": false,
"description": "跳过缓存,强制重新查询",
"example": ""
},
{
"name": "raw",
"type": "string",
"required": false,
"description": "",
"example": ""
},
{
"name": "health",
"type": "string",
"required": false,
"description": "",
"example": ""
}
]
接口反馈
域名综合信息查询
接口说明
提供域名综合信息查询服务,集合 Whois 注册信息、DNS 解析检测与 ICP 备案查询能力,适用于需要快速了解域名注册状态、解析记录及备案情况的调用场景。该接口免费开放,调用时需携带密钥进行身份验证。
调用地址
GET /api/dnspod/index
请求方式
支持 GET 请求方式。
鉴权说明
本接口需要密钥认证。请在请求的查询参数中携带您的接口调用密钥:
key(必填):您的接口调用密钥,通过 Query 方式传递,例如?key=your_api_key。
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 是 | 接口调用密钥,通过 Query 参数传递 |
| domain | string | 是 | 需要查询的域名 |
| module | string | 否 | 可选参数,可留空 |
| refresh | string | 否 | 跳过缓存,强制重新查询 |
| raw | string | 否 | 可选参数,可留空 |
| health | string | 否 | 可选参数,可留空 |
成功响应示例
{
"code": 0,
"msg": "success",
"data": {
"domain": "example.com",
"whois": {
"registrar": "Example Registrar, Inc.",
"creation_date": "2000-01-01",
"expiration_date": "2030-01-01",
"updated_date": "2024-06-01",
"status": "clientTransferProhibited",
"name_servers": [
"ns1.example.com",
"ns2.example.com"
]
},
"dns": {
"a": ["93.184.216.34"],
"aaaa": ["2606:2800:220:1:248:1893:25c8:1946"],
"mx": [
{
"host": "mx.example.com",
"priority": 10
}
],
"cname": null,
"txt": ["v=spf1 include:_spf.example.com ~all"],
"ns": ["ns1.example.com", "ns2.example.com"],
"soa": {
"primary_ns": "ns1.example.com",
"hostmaster": "hostmaster.example.com",
"serial": 2024010101
}
},
"icp": {
"status": "active",
"company_name": "示例科技有限公司",
"license_number": "京ICP备00000000号",
"site_name": "示例网站",
"domain": "example.com",
"approved_date": "2023-05-12"
},
"cache": false,
"query_time": "2025-01-20T10:30:00+08:00"
}
}
响应字段说明
顶层字段
| 字段 | 类型 | 说明 |
|---|---|---|
| code | integer | 返回码,0 表示成功 |
| msg | string | 返回信息描述 |
| data | object | 查询结果数据对象 |
data 对象
| 字段 | 类型 | 说明 |
|---|---|---|
| domain | string | 查询的域名 |
| whois | object | WHOIS 注册信息 |
| dns | object | DNS 解析记录集合 |
| icp | object | ICP 备案信息 |
| cache | boolean | 是否命中缓存,true 表示返回的是缓存数据 |
| query_time | string | 查询完成时间(ISO 8601 格式) |
whois 对象
| 字段 | 类型 | 说明 |
|---|---|---|
| registrar | string | 注册商名称 |
| creation_date | string | 注册日期(YYYY-MM-DD) |
| expiration_date | string | 到期日期(YYYY-MM-DD) |
| updated_date | string | 最近更新时间(YYYY-MM-DD) |
| status | string | 域名状态代码 |
| name_servers | array | 域名服务器列表 |
dns 对象
| 字段 | 类型 | 说明 |
|---|---|---|
| a | array | IPv4 地址记录列表 |
| aaaa | array | IPv6 地址记录列表 |
| mx | array | 邮件交换记录列表,每项包含 host(服务器地址)和 priority(优先级) |
| cname | array/null | 别名记录列表,无记录时返回 null |
| txt | array | 文本记录列表 |
| ns | array | 域名服务器记录列表 |
| soa | object | SOA 记录,包含 primary_ns(主域名服务器)、hostmaster(管理员邮箱)、serial(序列号) |
icp 对象
| 字段 | 类型 | 说明 |
|---|---|---|
| status | string | 备案状态(如 active 表示已备案) |
| company_name | string | 备案主体名称 |
| license_number | string | 备案许可证号 |
| site_name | string | 网站名称 |
| domain | string | 备案域名 |
| approved_date | string | 备案通过日期(YYYY-MM-DD) |
错误响应示例
当接口调用发生业务异常时,返回 HTTP 200 状态码,响应体为以下 JSON 结构:
{
"code": 0,
"msg": "密钥错误",
"errcode": 11002
}
其中 msg 字段为人类可读的错误描述,errcode 为业务错误码,用于程序化判断具体错误类型。
业务错误码说明
| errcode | 含义 |
|---|---|
| 11001 | 未提供调用密钥 |
| 11002 | 密钥错误 |
| 11003 | 密钥已禁用 |
| 11004 | 积分余额不足 |
| 11005 | 请求过于频繁(QPM 限制) |
| 11006 | 接口维护中 |
| 11007 | 接口已禁用 |
| 11008 | 接口不可用 |
| 11009 | 密钥校验暂不可用 |
| 11010 | 积分系统暂不可用 |
| 11011 | 收费接口须提供有效密钥 |
| 11012 | 鉴权方式错误 |
| 11013 | 接口不存在 |
| 11014 | ***地址无效 |
| 11015 | ***地址不允许 |
| 11016 | ***请求失败 |
| 11017 | 服务暂不可用 |
| 11018 | 请求方式不允许 |
| 11019 | 当前IP不在白名单内 |
| 11020 | 启用出口代理须提供有效密钥 |
| 11021 | 未配置可用出口代理 |
| 11022 | 出口代理不可用 |
调用示例
终端 curl(bash)
# 查询域名 example.com 的综合信息
curl -X GET "https://api.example.com/api/dnspod/index?key=YOUR_API_KEY&domain=example.com"
# 强制刷新缓存后重新查询
curl -X POST "https://api.example.com/api/dnspod/index" \
-d "key=YOUR_API_KEY" \
-d "domain=example.com" \
-d "refresh=1"
PHP
注意事项
- 本接口通过 HTTPS + Query 方式传递密钥,请务必在服务端调用,切勿将密钥写入前端页面、App 包或公开代码仓库,防止泄露。
- 接口频率限制约为每分钟 60 次,超过限制可能返回失败或临时封禁,请根据自身业务合理控制调用间隔。
domain仅需传入标准域名(如example.com),不要携带http://、https://、路径或端口等附加内容。module、raw、health等参数仅在明确需要对应数据时使用,日常查询请保持默认,避免产生非预期开销。refresh用于强制跳过缓存、发起新的实时查询,该操作可能明显增加响应耗时,请仅在数据确需更新时使用。- 本接口为免费服务,不保证返回速度,若遇瞬时超时可稍后重试,避免高频连续请求加重服务压力。
快速上手
curl "https://YOUR_API_HOST/api/dnspod/index?key=YOUR_API_KEY&domain=example.com"
免责声明
使用本平台接口即表示同意本声明。
- 数据来源:接口数据来自第三方公开网络或用户上传,本平台不保证准确性、完整性、实时性,请以官方信息为准。
- 合法性与安全性:本平台无法核实每个接口的安全性、合法性,使用者自行承担相关风险。
- 用途限制:标注“学习专用”的接口禁止商用;严禁用于违法违规行为(如诈骗、赌博、侵权等)。违规后果由使用者自行承担。
- 损害免责:使用本接口产生的任何直接或间接损失,本平台不承担责任。
- 第三方上传:用户/商户上传的接口若侵权或违法,由上传者承担全部责任。
- 监督配合:本平台依法记录访问日志,如发现违法活动将配合执法部门处理,并有权随时限制或封禁服务。
注:本平台保留最终解释权,并可能随时更新本声明。
在线测试
请求地址
api.xunjinlu.fun/api/dnspod/index
Method
参数
Response
等待中
// 结果将在此处显示