GET /v1/dns/{domain}
DNS Record Lookup
Look up DNS records for any domain, including A, AAAA, MX, NS, TXT, CNAME, and SOA records, plus DNSSEC validation status.
Free endpoint — no authentication or payment required.
Endpoint
GET https://api.robotdomainsearch.com/v1/dns/{domain}
Parameters
| Parameter |
Type |
In |
Required |
Description |
domain |
string |
path |
Yes |
Full domain name to look up (e.g., google.com) |
Request
curl "https://api.robotdomainsearch.com/v1/dns/robotdomainsearch.com"
Response
{
"domain": "robotdomainsearch.com",
"records": {
"a": [
"216.150.1.1"
],
"aaaa": [],
"mx": [],
"ns": [
{
"host": "launch1.spaceship.net",
"ip": "162.159.26.38"
},
{
"host": "launch2.spaceship.net",
"ip": "162.159.27.32"
}
],
"txt": [
"google-site-verification=E5nrURwjmYL57yn2DoP-OQzaA-tDGBuNc1IaST8DFAg"
],
"cname": null,
"soa": {
"primary_ns": "launch1.spaceship.net",
"admin_email": "support@spaceship.com",
"serial": 1772047740,
"refresh": 43200,
"retry": 3600,
"expire": 604800,
"min_ttl": 3600
}
},
"dnssec": true,
"query_time_ms": 138,
"queried_at": "2026-03-28T17:30:07Z"
}
Response Fields
Top-Level Fields
| Field |
Type |
Description |
domain |
string |
The domain that was looked up |
records |
object |
DNS records grouped by type |
dnssec |
boolean |
true if the domain has DNSSEC enabled |
query_time_ms |
number |
Time taken to resolve DNS records, in milliseconds |
queried_at |
string |
ISO 8601 timestamp of the query |
Records Fields
| Field |
Type |
Description |
a |
array |
IPv4 address records (A records) |
aaaa |
array |
IPv6 address records (AAAA records) |
mx |
array |
Mail exchange records |
ns |
array |
Nameserver records |
txt |
array |
Text records (SPF, DKIM, domain verification, etc.) |
cname |
string | null |
Canonical name record, or null if not set |
soa |
object |
Start of Authority record |
MX Record Fields
| Field |
Type |
Description |
host |
string |
Mail server hostname |
priority |
number |
MX priority (lower values indicate higher priority) |
NS Record Fields
| Field |
Type |
Description |
host |
string |
Nameserver hostname |
ip |
string |
Nameserver IP address |
SOA Record Fields
| Field |
Type |
Description |
primary_ns |
string |
Primary nameserver for the zone |
admin_email |
string |
Email address of the domain administrator |
serial |
number |
Zone serial number (incremented on changes) |
refresh |
number |
Seconds between zone refresh checks by secondary nameservers |
retry |
number |
Seconds before retrying a failed zone refresh |
expire |
number |
Seconds before secondary nameservers stop serving the zone after losing contact |
min_ttl |
number |
Minimum TTL (time to live) in seconds for records in the zone |
DNSSEC
The dnssec field indicates whether the domain has DNSSEC (Domain Name System Security Extensions) enabled.
| Value |
Meaning |
true |
The domain has DNSSEC enabled. DNS responses are cryptographically signed, protecting against spoofing and cache poisoning attacks. |
false |
The domain does not have DNSSEC enabled. DNS responses are not cryptographically validated. |
DNSSEC adds a layer of trust by allowing resolvers to verify that DNS data has not been tampered with in transit. It does not encrypt DNS queries — it only provides authentication and integrity.
Errors
| Code |
Error |
Description |
| 400 |
missing_domain |
The domain path parameter is required |
| 400 |
invalid_domain |
Domain format is invalid |
| 404 |
domain_not_found |
Domain not found or has no DNS records |
| 405 |
method_not_allowed |
Only GET method is allowed |
| 429 |
rate_limited |
Rate limit exceeded |
| 500 |
internal_error |
An unexpected error occurred |
Code Examples
curl
curl "https://api.robotdomainsearch.com/v1/dns/google.com"
Python
import requests
response = requests.get(
"https://api.robotdomainsearch.com/v1/dns/google.com"
)
data = response.json()
print(f"Domain: {data['domain']}")
print(f"DNSSEC: {data['dnssec']}")
records = data["records"]
print(f"A Records: {', '.join(records.get('a', []))}")
print(f"AAAA Records: {', '.join(records.get('aaaa', []))}")
for mx in records.get("mx", []):
print(f"MX: {mx['host']} (priority {mx['priority']})")
for ns in records.get("ns", []):
print(f"NS: {ns['host']} ({ns['ip']})")
soa = records.get("soa", {})
print(f"SOA: {soa.get('primary_ns', 'Unknown')} (admin: {soa.get('admin_email', 'Unknown')})")
JavaScript
const response = await fetch(
"https://api.robotdomainsearch.com/v1/dns/google.com"
);
const data = await response.json();
console.log(`Domain: ${data.domain}`);
console.log(`DNSSEC: ${data.dnssec}`);
const { records } = data;
console.log(`A Records: ${records.a?.join(", ") ?? "None"}`);
console.log(`AAAA Records: ${records.aaaa?.join(", ") ?? "None"}`);
records.mx?.forEach((mx) => {
console.log(`MX: ${mx.host} (priority ${mx.priority})`);
});
records.ns?.forEach((ns) => {
console.log(`NS: ${ns.host} (${ns.ip})`);
});
Go
resp, err := http.Get("https://api.robotdomainsearch.com/v1/dns/google.com")
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
var data struct {
Domain string `json:"domain"`
Records struct {
A []string `json:"a"`
AAAA []string `json:"aaaa"`
MX []struct {
Host string `json:"host"`
Priority int `json:"priority"`
} `json:"mx"`
NS []struct {
Host string `json:"host"`
IP string `json:"ip"`
} `json:"ns"`
TXT []string `json:"txt"`
SOA *struct {
PrimaryNS string `json:"primary_ns"`
AdminEmail string `json:"admin_email"`
Serial int `json:"serial"`
} `json:"soa"`
} `json:"records"`
DNSSEC bool `json:"dnssec"`
QueryTime int `json:"query_time_ms"`
QueriedAt string `json:"queried_at"`
}
if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
log.Fatal(err)
}
fmt.Printf("Domain: %s (DNSSEC: %t)\n", data.Domain, data.DNSSEC)
for _, a := range data.Records.A {
fmt.Printf("A: %s\n", a)
}
for _, ns := range data.Records.NS {
fmt.Printf("NS: %s (%s)\n", ns.Host, ns.IP)
}
Notes
- This is a free endpoint — no authentication or payment required
- All standard DNS record types are returned in a single request
- Empty arrays indicate no records of that type exist for the domain
- A
null value for cname means no CNAME record is set (typical for apex domains)
- The
query_time_ms field shows actual DNS resolution time for performance monitoring
See Also
- WHOIS Lookup — Look up WHOIS registration data for any domain