DNS Lookup API
A · MX · TXT
Reverse PTR
Batch domains

What records point here?Forward and reverse DNS, resolved.

Resolve A, AAAA, MX, TXT, NS, CNAME, and SOA records for any domain — or reverse-lookup an IP to its PTR hostname. Batch multiple domains in one call with inline per-record errors.

domain · forwardip · reverse PTRtype · A, MX, ALL…batch · multi-domain

Why DNS Lookup API

Domain records, structured.

Forward DNS
Resolve A, AAAA, MX, TXT, NS, CNAME, and SOA records for any domain with a single GET request.
Reverse PTR
Pass an ip parameter to map an address back to hostnames — useful for network diagnostics and logging.
type=ALL Expansion
Request every supported record type at once instead of querying one type per call.
Batch Domains
Repeat the domain query parameter or pass an array to resolve multiple domains in one response.
Inline Record Errors
Missing record types return error objects inside records without failing the whole HTTP response.
Real-Time Resolution
Live Node.js DNS lookups with no caching layer — always current authoritative results.

/api/v1/dns

Endpoints, at a glance.

GET-only lookup. Combine domain and ip in one request when you need both forward and reverse results.

GET/dns
DNS resolution
Forward lookup via `domain` (repeat for batch) or reverse lookup via `ip`. Optional `type` selects record types (default A).
PRIMARY
GET/dns/health
Service health
Service status and uptime.
GET/dns/metrics
Prometheus metrics
Lookup counters and resolution timing metrics.
ParameterTypeRequiredDescription
domainstring | arrayone of twoDomain(s) to resolve. Repeat parameter for batch queries.
ipstringone of twoIP address for reverse PTR lookup, e.g. 8.8.8.8.
typestring | arraynoRecord type: A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, or ALL. Default A.

Requests & responses.

Batch MX lookups across domains, or reverse-resolve an IP to its PTR hostnames.

Batch MX lookup
Multiple domains, one record type.
GET https://datpaq.com/api/v1/dns?domain=example.com&domain=google.com&type=MX
Reverse PTR
IP to hostname mapping.
GET https://datpaq.com/api/v1/dns?ip=8.8.8.8
Health
https://datpaq.com/api/v1/dns/health
Metrics
https://datpaq.com/api/v1/dns/metrics

Error reference

Predictable errors, always structured.

Per-record DNS failures appear inline — the rest of a batch response still returns successfully.

400Missing domain or ip
At least one of domain or ip must be provided for a lookup request.
400Invalid Record Type
type must be one of A, AAAA, MX, TXT, NS, CNAME, SOA, PTR, or ALL.
401Unauthorized
API key missing or invalid. Pass as x-api-key header or api_key query parameter.
429Rate Limited
Too many requests. Retry after the indicated period.
500Resolution Failure
DNS resolver error at the request level. Per-record failures stay inline in HTTP 200 responses.
Example inline record error (HTTP 200)
{
  "domain": "example.invalid",
  "records": {
    "A": { "error": "ENOTFOUND" }
  }
}

FAQ

API questions developers ask first.

Can I resolve multiple domains in one request?

Yes. Repeat the domain query parameter for each domain, or pass domain as an array. Each domain returns its own result object in the response array.

What happens when a record type does not exist?

The API returns HTTP 200 with an inline error object inside records for that type, e.g. { "error": "ENOTFOUND" }, without failing the entire request.

How do I authenticate with this API?

Create an API key in your Datpaq dashboard and send it with each request as a bearer token in the Authorization header.

Is there a free tier?

Yes. Datpaq APIs include a free tier for building, testing, and small production workloads before you move to a paid plan.

What format do requests and responses use?

Datpaq APIs use REST over HTTPS and return JSON by default. Endpoint docs show the supported methods, query parameters, request bodies, and response fields.

Where can I see limits and errors?

Each API documents rate limits, validation rules, and error responses in the landing page and API docs so integrations can retry and fail cleanly.

DNS records, ready for your pipeline.

Forward and reverse DNS resolution with batch support and inline error handling — built for security tools and infrastructure monitoring.