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.
Try it
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| value | string | Yes | Domain 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
| Field | Type | Description |
|---|---|---|
| valid | boolean | Whether the value is a syntactically valid domain name |
| domain | string | Normalised domain name (lowercase, no trailing dot) |
| tld | string | Top-level domain (e.g. com, org, dev) |
| sld | string | null | Second-level domain (e.g. example in example.com) |
| isIDN | boolean | Whether any label is an Internationalized Domain Name (Punycode xn-- prefix) |
| dnsValid | boolean | Whether DNS A or AAAA records exist for the domain |
| hasA | boolean | Whether a DNS A record (IPv4) exists |
| hasAAAA | boolean | Whether 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
}