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
| Parameter | Type | In | Required | Description |
|---|---|---|---|---|
domain | string | path | Yes | Domain name to query |
type | string | query | No | Comma-separated record types (defaults to A) |
Supported Record Types
| Type | Description |
|---|---|
A | IPv4 address |
AAAA | IPv6 address |
MX | Mail exchange server |
TXT | Text records (SPF, DKIM, etc.) |
CNAME | Canonical name (alias) |
NS | Name server |
SOA | Start 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
| Field | Type | Description |
|---|---|---|
domain | string | The queried domain name |
records | array | Array of DNS record objects |
queryTimeMs | integer | Query execution time in milliseconds |
security | object | Email security analysis (SPF, DKIM, DMARC) — see below |
Record Object
| Field | Type | Description |
|---|---|---|
type | string | Record type (A, AAAA, MX, TXT, CNAME, NS, SOA) |
name | string | Record name (typically the queried domain) |
value | string | Record value (IP address, hostname, text, etc.) |
ttl | integer | Time to live in seconds |
priority | integer | Priority value (only for MX records, null otherwise) |
Security Analysis
The security object contains email authentication analysis for the domain.
SPF Result
| Field | Type | Description |
|---|---|---|
present | boolean | Whether an SPF record was found |
rawRecord | string | The raw SPF TXT record value |
qualifier | string | Default qualifier (+all, -all, ~all, ?all) |
mechanisms | array | List of SPF mechanisms (includes, IPs, etc.) |
DKIM
| Field | Type | Description |
|---|---|---|
dkimFound | boolean | Whether a DKIM record was found for common selectors |
DMARC Result
| Field | Type | Description |
|---|---|---|
present | boolean | Whether a DMARC record was found |
rawRecord | string | The raw DMARC TXT record value |
policy | string | DMARC policy (none, quarantine, reject) |
subdomainPolicy | string | Subdomain policy (empty string if not set) |
reportingEmail | string | Email 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"