Skip to main content

DNS Lookup

Query DNS records for a domain with email security analysis (SPF, DKIM, DMARC). Supports common record types including A, AAAA, MX, TXT, CNAME, NS, and SOA.

Endpoint​

GET /api/v1/dns/{domain}?type={recordTypes}

Authentication​

All requests require an API key passed via the X-Api-Key header.

Parameters​

ParameterTypeInRequiredDescription
domainstringpathYesDomain name to query
typestringqueryNoComma-separated record types (defaults to A)

Supported Record Types​

TypeDescription
AIPv4 address
AAAAIPv6 address
MXMail exchange server
TXTText records (SPF, DKIM, etc.)
CNAMECanonical name (alias)
NSName server
SOAStart of authority

Response​

{
"domain": "example.com",
"records": [
{
"type": "A",
"name": "example.com",
"value": "93.184.216.34",
"ttl": 3600,
"priority": null
},
{
"type": "MX",
"name": "example.com",
"value": "mail.example.com",
"ttl": 3600,
"priority": 10
},
{
"type": "TXT",
"name": "example.com",
"value": "v=spf1 include:_spf.google.com ~all",
"ttl": 3600,
"priority": null
}
],
"queryTimeMs": 42,
"security": {
"spf": {
"present": true,
"rawRecord": "v=spf1 include:_spf.google.com ~all",
"qualifier": "~all",
"mechanisms": ["include:_spf.google.com"]
},
"dkimFound": false,
"dmarc": {
"present": true,
"rawRecord": "v=DMARC1; p=reject; rua=mailto:dmarc@example.com",
"policy": "reject",
"subdomainPolicy": "",
"reportingEmail": "dmarc@example.com"
}
}
}

Response Fields​

FieldTypeDescription
domainstringThe queried domain name
recordsarrayArray of DNS record objects
queryTimeMsintegerQuery execution time in milliseconds
securityobjectEmail security analysis (SPF, DKIM, DMARC) — see below

Record Object​

FieldTypeDescription
typestringRecord type (A, AAAA, MX, TXT, CNAME, NS, SOA)
namestringRecord name (typically the queried domain)
valuestringRecord value (IP address, hostname, text, etc.)
ttlintegerTime to live in seconds
priorityintegerPriority value (only for MX records, null otherwise)

Security Analysis​

The security object contains email authentication analysis for the domain.

SPF Result​

FieldTypeDescription
presentbooleanWhether an SPF record was found
rawRecordstringThe raw SPF TXT record value
qualifierstringDefault qualifier (+all, -all, ~all, ?all)
mechanismsarrayList of SPF mechanisms (includes, IPs, etc.)

DKIM​

FieldTypeDescription
dkimFoundbooleanWhether a DKIM record was found for common selectors

DMARC Result​

FieldTypeDescription
presentbooleanWhether a DMARC record was found
rawRecordstringThe raw DMARC TXT record value
policystringDMARC policy (none, quarantine, reject)
subdomainPolicystringSubdomain policy (empty string if not set)
reportingEmailstringEmail address for aggregate reports

Example​

# Query A records (default)
curl -H "X-Api-Key: YOUR_API_KEY" \
"https://api.iqxlookup.neivi.es/api/v1/dns/example.com"

# Query multiple record types
curl -H "X-Api-Key: YOUR_API_KEY" \
"https://api.iqxlookup.neivi.es/api/v1/dns/example.com?type=A,MX,TXT"