Fast, Reliable WHOIS & Domain Availability API
Bulk check domain availability and access WHOIS data.
Example
A simple example of how the API can be used in an application for checking domain availability & WHOIS data.
Note: This form is limited to just 20 requests / hour.
Key Features
Fast Response Times
1,000+ supported TLDs
Price data for 10 million+ domains
Built for production — 99.9%+ uptime
Free Plan Available
Pricing Plans
Select the pricing plan below which fits your needs best. Payments are handled by paddle.com.
Please note that this service is for developers only. You will need to know code to utilize this service.
Free Plan
$0 / mo
- 2500 requests*
- WHOIS & Availability data
- No credit card info needed
- 500 requests / hour
Beginner Plan
$19 / mo
- 30,000 requests per month*
- WHOIS, Premium, Appraisal & Availability data
- Ideal for small projects
- 3000 requests / hour
Pro Plan
$59 / mo
- 300,000 requests per month*
- WHOIS, Premium, Appraisal & Availability data
- Best for growing businesses
- 30,000 requests / hour
Enterprise Plan
$190 / mo
- 1.2 million requests per month*
- All features
- 30,000 requests / hour
- Perfect for web hosting companies
By continuing you are accepting our terms of service.
* = Assuming the user is the enabling cache feature, which makes requests 10x cheaper.
Supported TLDs:
TLD Browser
Code examples - How to send requests
const domain = 'google.com';
const apikey = 'enter-api-key-here';
const url = `https://v2-api.domainduck.io/get/?domain=${domain}&apikey=${apikey}`;
async function checkDomain() {
try {
const response = await fetch(url);
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
const data = await response.json();
console.log('Status:', data.availability);
} catch (error) {
console.error('Error:', error.message);
}
}
checkDomain();
const domain = 'google.com';
const apikey = 'enter-api-key-here';
const url = 'https://v2-api.domainduck.io/post/';
async function checkDomain() {
try {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'User-Agent': 'Script'
},
body: JSON.stringify({ domain, apikey })
});
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
const data = await response.json();
console.log('Status:', data.availability);
} catch (error) {
console.error('Error:', error.message);
}
}
checkDomain();
const domain = 'google.com';
const apikey = 'enter-api-key-here';
const url = `https://v2-api.domainduck.io/get/?domain=${domain}&apikey=${apikey}&whois=1`;
async function getWhois() {
try {
const response = await fetch(url);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
const whois = Buffer.from(data.RawWhois, 'base64').toString('utf8');
console.log(whois);
} catch (error) {
console.error('Error:', error.message);
}
}
getWhois();
const domain = 'google.com';
const apikey = 'enter-api-key-here';
const url = 'https://v2-api.domainduck.io/post/';
async function getWhois() {
try {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'User-Agent': 'Script'
},
body: JSON.stringify({ domain, apikey, whois: 1 })
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
const whois = data.RawWhois
? Buffer.from(data.RawWhois, 'base64').toString('utf8')
: '';
console.log(whois);
} catch (error) {
console.error('Error:', error.message);
}
}
getWhois();
const domain = 'google.com';
const apikey = 'enter-api-key-here';
const url = `https://v2-api.domainduck.io/get/?domain=${domain}&apikey=${apikey}&whois=1`;
async function getDomainAge() {
try {
const response = await fetch(url);
if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
const data = await response.json();
if (!data.CreationDate) throw new Error('Creation date not available');
const creationDate = new Date(data.CreationDate);
const now = new Date();
const seconds = (now - creationDate) / 1000;
const years = seconds / (365.25 * 24 * 60 * 60);
console.log(years.toFixed(2));
} catch (error) {
console.error('Error:', error.message);
}
}
getDomainAge();
const fetch = require('node-fetch');
const moment = require('moment');
const domain = 'google.com';
const apikey = 'enter-api-key-here';
const url = 'https://v2-api.domainduck.io/post/';
const postData = {
domain: domain,
apikey: apikey,
whois: '1'
};
fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'Script'
},
body: new URLSearchParams(postData)
})
.then(res => res.json())
.then(data => {
if (!data.CreationDate) {
console.log("Creation date not available");
return;
}
const creation = moment(data.CreationDate);
const now = moment();
const years = now.diff(creation, 'years', true);
console.log(years.toFixed(2));
})
.catch(err => console.error('Error:', err));
import requests
domain = 'google.com'
apikey = 'enter-api-key-here'
url = f"https://v2-api.domainduck.io/get/?domain={domain}&apikey={apikey}"
response = requests.get(url)
response.raise_for_status()
data = response.json()
print("Status:", data['availability'])
import requests
domain = 'google.com'
apikey = 'enter-api-key-here'
url = "https://v2-api.domainduck.io/post/"
payload = {'domain': domain, 'apikey': apikey}
headers = {
'User-Agent': 'Script'
}
response = requests.post(url, data=payload, headers=headers)
response.raise_for_status()
data = response.json()
print("Status:", data['availability'])
import requests
import base64
domain = 'google.com'
apikey = 'enter-api-key-here'
url = f"https://v2-api.domainduck.io/get/?domain={domain}&apikey={apikey}&whois=1"
response = requests.get(url)
response.raise_for_status()
data = response.json()
raw_whois = base64.b64decode(data["RawWhois"]).decode("utf-8", errors="replace")
print(raw_whois)
import requests
import base64
domain = 'google.com'
apikey = 'enter-api-key-here'
url = "https://v2-api.domainduck.io/post/"
payload = {'domain': domain, 'apikey': apikey, 'whois': '1'}
headers = {
'User-Agent': 'Script'
}
response = requests.post(url, data=payload, headers=headers)
response.raise_for_status()
data = response.json()
raw_whois_b64 = data.get("RawWhois")
if raw_whois_b64:
# Decode base64
try:
decoded_bytes = base64.b64decode(raw_whois_b64)
decoded_whois = decoded_bytes.decode('utf-8', errors='replace')
print(decoded_whois)
except Exception as e:
print("Decoding error:", e)
print("Raw base64:", raw_whois_b64)
else:
print("No RawWhois in response")
print(data)
from datetime import datetime
import requests
domain = 'google.com'
apikey = 'enter-api-key-here'
url = f"https://v2-api.domainduck.io/get/?domain={domain}&apikey={apikey}&whois=1"
response = requests.get(url)
response.raise_for_status()
data = response.json()
if 'CreationDate' not in data or not data['CreationDate']:
print("Creation date not available")
exit()
creation = datetime.fromisoformat(data['CreationDate'].replace('Z', '+00:00'))
now = datetime.utcnow()
seconds = (now - creation).total_seconds()
years = seconds / (365.25 * 24 * 3600)
print(f"{years:.2f}")
import requests
from datetime import datetime
domain = 'google.com'
apikey = 'enter-api-key-here'
url = 'https://v2-api.domainduck.io/post/'
data = {
'domain': domain,
'apikey': apikey,
'whois': '1'
}
response = requests.post(url, data=data, headers={'User-Agent': 'Script'})
if response.status_code != 200:
print("Error fetching data")
exit()
result = response.json()
if 'CreationDate' not in result or not result['CreationDate']:
print("Creation date not available")
exit()
creation = datetime.fromisoformat(result['CreationDate'].replace('Z', '+00:00'))
now = datetime.utcnow()
seconds = (now - creation).total_seconds()
years = seconds / (365.25 * 24 * 60 * 60)
print(f"{years:.2f}")
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
public class DomainCheck {
public static void main(String[] args) throws Exception {
String domain = "google.com";
String apikey = "enter-api-key-here";
String url = "https://v2-api.domainduck.io/get/?domain=" + domain + "&apikey=" + apikey;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
JsonObject json = JsonParser.parseString(response.body()).getAsJsonObject();
System.out.println("Status: " + json.get("availability").getAsString());
}
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
public class DomainCheckPost {
public static void main(String[] args) throws Exception {
String domain = "google.com";
String apikey = "enter-api-key-here";
String body = "domain=" + domain + "&apikey=" + apikey;
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://v2-api.domainduck.io/post/"))
.header("Content-Type", "application/x-www-form-urlencoded")
.header("User-Agent", "Script")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
JsonObject json = JsonParser.parseString(response.body()).getAsJsonObject();
System.out.println("Status: " + json.get("availability").getAsString());
}
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
public class WhoisGet {
public static void main(String[] args) throws Exception {
String domain = "google.com";
String apikey = "enter-api-key-here";
String url = "https://v2-api.domainduck.io/get/?domain=" + domain + "&apikey=" + apikey + "&whois=1";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
JsonObject json = JsonParser.parseString(response.body()).getAsJsonObject();
System.out.println(json.get("RawWhois").getAsString());
}
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
public class WhoisPost {
public static void main(String[] args) throws Exception {
String domain = "google.com";
String apikey = "enter-api-key-here";
String body = "domain=" + domain + "&apikey=" + apikey + "&whois=1";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://v2-api.domainduck.io/post/"))
.header("Content-Type", "application/x-www-form-urlencoded")
.header("User-Agent", "Script")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
JsonObject json = JsonParser.parseString(response.body()).getAsJsonObject();
System.out.println(json.get("RawWhois").getAsString());
}
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit;
public class DomainAge {
public static void main(String[] args) throws Exception {
String domain = "google.com";
String apikey = "enter-api-key-here";
String url = "https://v2-api.domainduck.io/get/?domain=" + domain + "&apikey=" + apikey + "&whois=1";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.build();
HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
JsonObject json = JsonParser.parseString(response.body()).getAsJsonObject();
if (!json.has("CreationDate")) {
System.out.println("Creation date not available");
return;
}
ZonedDateTime creation = ZonedDateTime.parse(json.get("CreationDate").getAsString());
ZonedDateTime now = ZonedDateTime.now();
long seconds = ChronoUnit.SECONDS.between(creation, now);
double years = seconds / (365.25 * 24 * 60 * 60);
System.out.printf("%.2f%n", years);
}
}
import java.net.*;
import java.io.*;
import java.time.*;
import java.time.format.DateTimeFormatter;
import org.json.JSONObject;
public class DomainAgePost {
public static void main(String[] args) throws Exception {
String domain = "google.com";
String apikey = "enter-api-key-here";
String url = "https://v2-api.domainduck.io/post/";
String postData = "domain=" + URLEncoder.encode(domain, "UTF-8") +
"&apikey=" + URLEncoder.encode(apikey, "UTF-8") +
"&whois=1";
URL obj = new URL(url);
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
con.setRequestProperty("User-Agent", "Script");
con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
con.setDoOutput(true);
try (OutputStream os = con.getOutputStream()) {
os.write(postData.getBytes("UTF-8"));
}
int responseCode = con.getResponseCode();
if (responseCode != 200) {
System.out.println("Error: HTTP " + responseCode);
return;
}
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuilder response = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
JSONObject json = new JSONObject(response.toString());
if (!json.has("CreationDate") || json.isNull("CreationDate")) {
System.out.println("Creation date not available");
return;
}
String creationStr = json.getString("CreationDate");
Instant creation = Instant.parse(creationStr);
Instant now = Instant.now();
long seconds = Duration.between(creation, now).getSeconds();
double years = seconds / (365.25 * 24 * 60 * 60);
System.out.printf("%.2f%n", years);
}
}
$domain = 'google.com';
$apikey = 'enter-api-key-here';
$url = "https://v2-api.domainduck.io/get/?domain=$domain&apikey=$apikey";
$response = file_get_contents($url);
$data = json_decode($response, true);
echo "Status: " . $data['availability'];
$domain = 'google.com';
$apikey = 'enter-api-key-here';
$url = "https://v2-api.domainduck.io/post/";
$post_data = array(
'domain' => $domain,
'apikey' => $apikey
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n" .
"User-Agent: Script\r\n",
'method' => 'POST',
'content' => http_build_query($post_data)
)
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
$data = json_decode($response, true);
echo "Status: " . $data['availability'];
$domain = 'google.com';
$apikey = 'enter-api-key-here';
$url = "https://v2-api.domainduck.io/get/?domain=$domain&apikey=$apikey&whois=1";
$response = file_get_contents($url);
$data = json_decode($response, true);
echo base64_decode($data['RawWhois']);
$domain = 'google.com';
$apikey = 'enter-api-key-here';
$url = "https://v2-api.domainduck.io/post/";
$post_data = array(
'domain' => $domain,
'apikey' => $apikey,
'whois' => '1'
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n" .
"User-Agent: Script\r\n",
'method' => 'POST',
'content' => http_build_query($post_data)
)
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
$data = json_decode($response, true);
echo base64_decode($data['RawWhois']);
$domain = 'google.com';
$apikey = 'enter-api-key-here';
$url = "https://v2-api.domainduck.io/get/?domain=$domain&apikey=$apikey&whois=1";
$response = @file_get_contents($url);
if ($response === false || !$data = json_decode($response, true)) {
die("Error fetching data");
}
if (empty($data['CreationDate'])) {
die("Creation date not available");
}
$creation = new DateTime($data['CreationDate']);
$now = new DateTime();
$seconds = $now->getTimestamp() - $creation->getTimestamp();
$years = $seconds / (365.25 * 24 * 60 * 60);
echo number_format($years, 2);
$domain = 'google.com';
$apikey = 'enter-api-key-here';
$url = "https://v2-api.domainduck.io/post/";
$post_data = array(
'domain' => $domain,
'apikey' => $apikey,
'whois' => '1'
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n" .
"User-Agent: Script\r\n",
'method' => 'POST',
'content' => http_build_query($post_data)
)
);
$context = stream_context_create($options);
$response = @file_get_contents($url, false, $context);
if ($response === false || !$data = json_decode($response, true)) {
die("Error fetching data from API");
}
if (empty($data['CreationDate'])) {
die("Creation date not available in WHOIS response");
}
$creation = new DateTime($data['CreationDate']);
$now = new DateTime();
$seconds = $now->getTimestamp() - $creation->getTimestamp();
$years = $seconds / (365.25 * 24 * 60 * 60);
echo number_format($years, 2) . " years";
// Get domain market value in USD
$domain = 'google.com';
$apikey = 'enter-api-key-here';
$url = "https://v2-api.domainduck.io/appraisal/get/?domain=$domain&apikey=$apikey";
$response = file_get_contents($url);
$data = json_decode($response, true);
echo "Domain value: " . $data['value'] . " USD";
// Get domain market value in USD
$domain = 'google.com';
$apikey = 'enter-api-key-here';
$url = "https://v2-api.domainduck.io/appraisal/post/";
$post_data = array(
'domain' => $domain,
'apikey' => $apikey
);
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n" .
"User-Agent: Script\r\n",
'method' => 'POST',
'content' => http_build_query($post_data)
)
);
$context = stream_context_create($options);
$response = file_get_contents($url, false, $context);
$data = json_decode($response, true);
echo "Domain value: " . ($data['value'] ?? '–') . " USD\n";
FAQ
What is DomainDuck.io about?
This is a service for looking up domain data programmatically. This data includes availability status (available, unavailable, blocked & premium), creation date, renew date, registry, nameservers, marketplace prices etc. Other features of the API includes domain name appraisals, and domain name suggestions, which allows for search of the premium domain inventory.
Why use DomainDuck?
Choose DomainDuck for domain data that actually outperforms the rest: unmatched accuracy, broader TLD coverage than any competitor, and the richest marketplace intelligence on the market.
How do you handle payments?
All payments are handled by Paddle.com, we don't handle any payments. You can also use our service using RapidAPI, and in that case they will handle the payments.
Is this service free?
Yes, you can use the free plan for free, but this comes with stricter rate limits, no premium data and no domain appraisals. This means that when a domain is for sale, it will just be displayed as unavailable with the free plan, without any price details.
How is availability determined?
This service relies on multiple methods for checking availability including EPP checks, WHOIS, RDAP and marketplace data.
What is WHOIS?
WHOIS is a protocol and database that reveals who owns (or registered) a domain name — usually showing the registrant’s contact info, registrar, creation/expiration dates, and name servers (though personal details are often hidden nowadays for privacy). DomainDuck serves WHOIS in a structured JSON format and also in a raw format.
What are premium domains?
Premium domains are domains that can be bought from a domain marketplace (or from the registry operator). This service will show if a domain name is a premium domain name and fetch marketplace data for that domain.
Does this service support RDAP?
Yes. Some TLD:s are moving from WHOIS over to RDAP, which is a more modern variant of WHOIS. If WHOIS data is not availabile, this service will give you RDAP data instead. Read more about this under the RDAP section here.
What marketplaces are supported?
For now this service supports GoDaddy, Sedo and Namecheap. Auctioned domains are not included, only "Buy now" domains. Domains listed under 9 dollars will not show up as premium.
What are the API responses?
Please see the documentation for any technical questions.
If you have any more questions, you can contact us at support@domainduck.io
