DNS查询API文档

本API提供简单高效的DNS记录查询服务,支持多种DNS记录类型的查询。

API端点

https://api.u-eptm.top/DNSrq/api/

API参考

请求参数

参数名 类型 必需 描述
domain string 要查询的域名(如:example.com)
type string DNS记录类型(默认:所有类型)

支持的DNS记录类型

  • A - IPv4地址记录
  • CNAME - 别名记录
  • MX - 邮件交换记录
  • NS - 域名服务器记录
  • TXT - 文本记录
  • SOA - 起始授权机构记录
  • PTR - 指针记录
  • HINFO - 主机信息记录
  • SRV - 服务定位记录

示例

GET请求示例

https://api.u-eptm.top/DNSrq/api/?domain=example.com&type=A

POST请求示例

POST https://api.u-eptm.top/DNSrq/api/
Content-Type: application/x-www-form-urlencoded

domain=example.com&type=MX

响应示例

{
    "domain": "example.com",
    "type": "ALL",
    "records": [
        {
            "type": "A",
            "data": [
                {
                    "host": "example.com",
                    "class": "IN",
                    "ttl": 71,
                    "type": "A",
                    "ip": "23.192.228.80"
                },
                {
                    "host": "example.com",
                    "class": "IN",
                    "ttl": 71,
                    "type": "A",
                    "ip": "23.192.228.84"
                },
                {
                    "host": "example.com",
                    "class": "IN",
                    "ttl": 71,
                    "type": "A",
                    "ip": "23.215.0.136"
                },
                {
                    "host": "example.com",
                    "class": "IN",
                    "ttl": 71,
                    "type": "A",
                    "ip": "23.215.0.138"
                },
                {
                    "host": "example.com",
                    "class": "IN",
                    "ttl": 71,
                    "type": "A",
                    "ip": "96.7.128.175"
                },
                {
                    "host": "example.com",
                    "class": "IN",
                    "ttl": 71,
                    "type": "A",
                    "ip": "96.7.128.198"
                }
            ]
        },
        {
            "type": "MX",
            "data": [
                {
                    "host": "example.com",
                    "class": "IN",
                    "ttl": 68567,
                    "type": "MX",
                    "pri": 0,
                    "target": "."
                }
            ]
        },
        {
            "type": "NS",
            "data": [
                {
                    "host": "example.com",
                    "class": "IN",
                    "ttl": 86400,
                    "type": "NS",
                    "target": "a.iana-servers.net"
                },
                {
                    "host": "example.com",
                    "class": "IN",
                    "ttl": 86400,
                    "type": "NS",
                    "target": "b.iana-servers.net"
                }
            ]
        },
        {
            "type": "SOA",
            "data": [
                {
                    "host": "example.com",
                    "class": "IN",
                    "ttl": 60,
                    "type": "SOA",
                    "mname": "ns.icann.org",
                    "rname": "noc.dns.icann.org",
                    "serial": 2025011613,
                    "refresh": 7200,
                    "retry": 3600,
                    "expire": 1209600,
                    "minimum-ttl": 3600
                }
            ]
        },
        {
            "type": "TXT",
            "data": [
                {
                    "host": "example.com",
                    "class": "IN",
                    "ttl": 86400,
                    "type": "TXT",
                    "txt": "v=spf1 -all",
                    "entries": [
                        "v=spf1 -all"
                    ]
                },
                {
                    "host": "example.com",
                    "class": "IN",
                    "ttl": 86400,
                    "type": "TXT",
                    "txt": "_k2n1y4vw3qtb4skdx9e7dxt97qrmmq9",
                    "entries": [
                        "_k2n1y4vw3qtb4skdx9e7dxt97qrmmq9"
                    ]
                }
            ]
        }
    ],
    "time": "2025-04-17 17:34:52",
    "Facilitator": "U-EPTM|API"
}