Extract Domain, Subdomain & TLD from URL Online
Split a URL, e-mail or hostname into subdomain, registrable domain and public suffix (.com.vn, github.io) from the Public Suffix List; IDN, batch of 1000.
Result
Press “Run” to see the result.
Give a URL, a hostname or an e-mail address as domain and get its parts according to the Public Suffix List: public_suffix (com.vn, edu.vn, co.uk), the registrable domain (domain, eTLD+1, the level at which cookies and sites are scoped), subdomain, domain_without_suffix and tld. Private suffixes run by companies (github.io, workers.dev, blogspot.com…) are recognised: suffix_type is icann, private or unlisted, and for private suffixes domain_icann gives the domain under the ICANN rules only.
Internationalised domain names are converted both ways (hostname in punycode xn--…, hostname_unicode and domain_unicode), hostnames are checked against the length and character rules, IP addresses are detected, and localhost or internal names are flagged. POST domains (array or one per line, up to 1000) for a batch; group=true also groups the inputs by registrable domain, for example to count leads per company website.
The list is the Public Suffix List (publicsuffix.org, MPL-2.0) compiled in the tldts library; a weekly check compares it with the published list. Purely local: no DNS or WHOIS request. For homoglyph and phishing checks of IDNs use /v1/unicode-check.
Use this in your code
curl "https://apibox.io.vn/v1/domain-parse?domain=https://shop.abc.com.vn/san-pham?id=1" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/domain-parse?domain=https://shop.abc.com.vn/san-pham?id=1', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/domain-parse?domain=https://shop.abc.com.vn/san-pham?id=1",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/domain-parse?domain=https://shop.abc.com.vn/san-pham?id=1');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
Why is the domain of my-app.github.io not github.io?
github.io is a private public suffix: each user site is its own registrable domain. domain_icann shows github.io, the answer under ICANN rules only.
Does it check that the domain exists?
No. It only parses the name; use /v1/dns or /v1/whois to check registration and records.
How fresh is the suffix list?
It is the list shipped with the tldts library, checked weekly against publicsuffix.org and updated with it.