Skip to content

DNS Lookup

POST https://api.echovalue.dev/dns-lookup

Runs DNS lookup and enrichment through echoValue.

The request is authenticated with x-token, charged by echoValue, and logged.

Headers:

HeaderDescription
x-tokenYour API token
content-typeMust be application/json

Body:

FieldTypeRequiredDescription
domainsstring[]YesDomain names or IP addresses to inspect
recordTypesstring[]NoDNS record types to query: A, AAAA, MX, CNAME, TXT, NS, PTR, SOA, CAA, SRV
checkPropagationbooleanNoQuery multiple public resolvers to compare propagation
propagationServersstring[]NoOverride the resolver list used for propagation checks
performReverseLookupbooleanNoRun PTR lookups for returned IPs or direct IP input
enableEnrichmentbooleanNoEnable SPF, DMARC, DKIM, provider, and security analysis
enableSslInspectionbooleanNoInspect live TLS certificate metadata for HTTPS targets
timeoutintegerNoPer-query timeout in milliseconds. Min: 1000. Max: 60000. Default: 5000
maxRetriesintegerNoRetry attempts for failed lookups. Min: 0. Max: 10. Default: 3
retryDelayintegerNoDelay between retries in milliseconds. Min: 0. Max: 100000. Default: 1000
includeMetadatabooleanNoInclude additional lookup metadata

The service supports record types A, AAAA, MX, CNAME, TXT, NS, PTR, SOA, CAA, and SRV.

Examples:

Terminal window
curl 'https://api.echovalue.dev/dns-lookup' \
-H 'x-token: mytoken' \
-H 'Content-Type: application/json' \
-d '{
"domains": ["example.com"],
"recordTypes": ["A", "MX", "TXT"],
"checkPropagation": true,
"performReverseLookup": true,
"enableEnrichment": true,
"enableSslInspection": true
}'

200 OK returns the DNS lookup result as JSON.

{
"summary": {
"totalDomains": 1,
"successfulLookups": 1,
"failedLookups": 0,
"recordTypes": ["A", "MX", "TXT"],
"propagationCheckEnabled": false
},
"results": [
{
"domain": "example.com",
"lookupResult": {
"domain": "example.com",
"timestamp": "2026-04-22T09:15:00.000Z",
"records": {
"A": [
{
"type": "A",
"address": "93.184.216.34",
"ttl": 3600
}
],
"MX": [
{
"type": "MX",
"exchange": ".",
"priority": 0
}
],
"TXT": [
{
"type": "TXT",
"entries": ["v=spf1 -all"],
"ttl": 1800
}
]
},
"spf_valid": true,
"spf_strict": true,
"dmarc_policy": "reject",
"has_dkim": false,
"email_security_score": 85,
"ssl_certificate_expires_at": "2026-07-20T12:00:00.000Z",
"ssl_days_until_expiry": 89,
"warnings": ["No DKIM records detected"],
"recommendations": ["Configure DKIM signing for email authentication"],
"metadata": {
"queryTime": 124,
"totalRecords": 3
}
}
}
]
}

Top-level fields:

FieldTypeDescription
summaryobjectAggregate information about the whole request
resultsarrayOne item per requested domain or IP address

summary fields:

FieldTypeDescription
totalDomainsintegerNumber of requested domains or IPs
successfulLookupsintegerNumber of successful lookups
failedLookupsintegerNumber of failed lookups
recordTypesstring[]Record types requested for this run
propagationCheckEnabledbooleanWhether propagation checks were enabled

results[] fields:

FieldTypeDescription
domainstringRequested domain or IP address
lookupResultobjectMain DNS lookup result for that target
propagationResultsarrayPresent only when checkPropagation: true

Common lookupResult fields:

FieldTypeDescription
domainstringResolved target
timestampstring (ISO 8601)When the lookup completed
recordsobjectDNS records grouped by type
reverseLookupobjectPTR lookup result when reverse lookup is enabled and relevant
mx_providerstring or nullBest-effort provider inferred from MX records
spf_validbooleanWhether SPF parsing found a valid record
spf_strictbooleanWhether the SPF policy is strict
dmarc_policystringDMARC policy when detected
has_dkimbooleanWhether DKIM records were detected
email_security_scorenumberBest-effort enrichment score from 0 to 100
warningsstring[]Warnings from SSL or email-security analysis
recommendationsstring[]Suggested follow-up actions
metadataobjectRequest metadata such as query time and record count

Typed DNS records:

  • A and AAAA records include address and optional ttl
  • MX records include exchange, priority, and optional ttl
  • TXT records include entries[] and optional ttl
  • CNAME, NS, and PTR records include value and optional ttl
  • SOA, CAA, and SRV records expose their standard protocol-specific fields

The response is partially typed in the OpenAPI spec, but some nested enrichment data can vary by target and enabled options.

Response headers:

HeaderDescription
x-balanceWallet balance after this call
x-costCredits consumed for this request

See Response Headers for details.

StatusMeaning
200Lookup completed successfully
400Invalid request body or validation error
401Invalid token
402Wallet has insufficient credits
405Method not allowed
500Internal service error
502DNS lookup service unavailable
503DNS lookup service unavailable
  • 400 responses can still return a structured JSON body.
  • 5xx service responses consume 0 credits.
  • The endpoint accepts both domain names and IP addresses.
  • Propagation checks and enrichment can take noticeably longer than a basic DNS query.
  • The interactive service at lookup.echovalue.dev exposes the same analysis features in a browser UI.