DNS
Updated Sep 8, 2026
DNS Lookup API
Query DNS records for a domain through the RequestGuard API.
Use DNS lookup when you need raw record data for investigations, enrichment, or domain posture checks.
An active workspace API key and any Suite or Lookups plan are required. Each request consumes one shared lookup unit. See Authorization for limits and errors.
Endpoint
GET /dns/lookup
Query Parameters
| Parameter | Required | Description |
|---|---|---|
domain | Yes | Domain name to query. |
type | No | DNS record type. Defaults to A. |
Example
curl "https://api.requestguard.com/v1/dns/lookup?domain=example.com&type=TXT" \
-H "Authorization: Bearer rg_sk_live_..."
Response
{
"domain": "example.com",
"type": "TXT",
"records": [
{
"name": "example.com",
"type": "TXT",
"value": "v=spf1 -all",
"ttl": 3600
}
],
"sources": [
{
"name": "DNS record lookup",
"type": "dataset",
"matched": true,
"category": "dns"
}
]
}
Supported record types depend on the resolver and upstream response, but common values include A, AAAA, MX, NS, TXT, CAA, CNAME, and SOA.