Domain

GET/v0/domain

Validates a domain name and performs a DNS lookup. Returns the top-level domain (TLD), second-level domain (SLD), whether it is an Internationalized Domain Name (IDN), and whether DNS A/AAAA records exist.

Guides: Node.js · Python

Try it

Query Parameters

ParameterTypeRequiredDescription
valuestringYesDomain name to validate (e.g. example.com, sub.example.co.uk)

Example Requests

curl -H "Authorization: Bearer YOUR_API_KEY" \
  "https://api.isvalid.dev/v0/domain?value=example.com"

Response Fields

FieldTypeDescription
validbooleanWhether the value is a syntactically valid domain name
domainstringNormalised domain name (lowercase, no trailing dot)
tldstringTop-level domain (e.g. com, org, dev)
sldstring | nullSecond-level domain (e.g. example in example.com)
isIDNbooleanWhether any label is an Internationalized Domain Name (Punycode xn-- prefix)
dnsValidbooleanWhether DNS A or AAAA records exist for the domain
hasAbooleanWhether a DNS A record (IPv4) exists
hasAAAAbooleanWhether a DNS AAAA record (IPv6) exists

Example Response

{
  "valid": true,
  "domain": "example.com",
  "tld": "com",
  "sld": "example",
  "isIDN": false,
  "dnsValid": true,
  "hasA": true,
  "hasAAAA": true
}

Example Response — invalid

{
  "valid": false
}