Skip to main content

Nameservers

free
GET/v1/dns/ns

Retrieves nameserver records and identifies the DNS hosting provider. Returns nameserver hostnames, IP addresses, and provider detection for major DNS services.

What It Does

Queries NS records for a domain, resolves nameserver IP addresses (both A and AAAA for IPv4/IPv6), and identifies the DNS provider by matching nameserver patterns against 33+ known providers including Cloudflare, AWS Route 53, Google Cloud DNS, Namecheap, GoDaddy, and others.

Why It's Useful

Essential for DNS migration planning, competitive infrastructure analysis, and identifying provider-specific performance or security characteristics. Understanding which DNS provider a domain uses reveals whether it has access to enterprise features like DDoS protection, DNSSEC automation, and anycast routing.

Use Cases

Solutions Architect

Competitive Infrastructure Analysis

Analyze which DNS providers competitors use to understand their infrastructure choices, detect lame delegations, and assess DNS resilience.

Inform architecture decisions based on industry patterns and competitor choices.

DevOps Engineer

DNS Migration Planning

Document current nameserver configuration before migrating DNS to a new provider.

Ensure complete DNS migration with no orphaned records or misconfigurations.

Security Analyst

Vendor Assessment

Evaluate third-party vendor DNS infrastructure as part of security due diligence.

Identify vendors using consumer-grade DNS that may lack enterprise security features.

Parameters

NameTypeRequiredDescription
domainstringRequiredThe domain to query nameservers forExample: example.com

Response Fields

FieldTypeDescription
domainstringThe queried domain
nameserversarrayNameserver hostnames and IP addresses
providerobjectDetected DNS provider name and confidence
countnumberNumber of nameservers configured
recommendationsarrayWarnings for RFC 1034 compliance (e.g. fewer than 2 nameservers) and lame delegation detection

Code Examples

cURL
curl "https://api.edgedns.dev/v1/dns/ns" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "domain=example.com"
JavaScript
const response = await fetch(
  'https://api.edgedns.dev/v1/dns/ns?domain=example.com',
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  }
);

const data = await response.json();
console.log(data);
Python
import requests

response = requests.get(
    'https://api.edgedns.dev/v1/dns/ns',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    params={
    'domain': 'example.com'
    }
)

data = response.json()
print(data)

Read the full Nameservers guide

Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.

Read the guide →

Related Endpoints

External References

Learn more about the standards and protocols behind this endpoint.

Try This Endpoint

Test the Nameservers endpoint live in the playground.