This API allows you to check the availability of any domain name. The API supports both GET and POST methods for making requests. Below is the documentation, including endpoints, parameters, and code examples in PHP and Python. Note: the apikey in this document is for testing only. Replace the key with key found on your profile.
Base URL
- GET Method:
https://v2-api.domainduck.io/get/ - POST Method:
https://v2-api.domainduck.io/post/
Examples
Visit this URL to see availability status for the domain "example.com":
https://v2-api.domainduck.io/get/?domain=example.com&apikey=VH2PS6QZ5FYD
Visit this URL to see the WHOIS info as JSON instead:
https://v2-api.domainduck.io/get/?domain=example.com&apikey=VH2PS6QZ5FYD&whois=1
Or this if you want to see the raw WHOIS (without base64 encoding):
https://v2-api.domainduck.io/get/?domain=example.com&apikey=VH2PS6QZ5FYD&whois=1&raw=1
Response Values
The API will return one of the following responses.
Availability status responses
true: The domain is available, e.g. available-domain-123.com.false: The domain is not available, e.g. google.com.premium: This means the domain name is reserved by the registry but is available for registration at a premium price, or it can be bought directly from a domain marketplace, e.g. flights.site.blocked: This means the domain name has been blocked/reserved by the domain registry, and the domain is not available for the general public, e.g. nic.kr.
| Example domain | JSON response |
|---|---|
| available-domain-123.com | {"domain":"available-domain-123.com","availability":"true"} |
| google.com | {"domain":"google.com","availability":"false"} |
| flights.site | {"domain":"flights.site","availability":"premium","price":1625,"url":"namecheap.com/domains/registration/results/?domain=flights.site","type":"buy now","currency":"USD"} |
| nic.kr | {"domain":"nic.kr","availability":"blocked"} |
Errors
| Error | Description | HTTP code |
|---|---|---|
rate limit exceeded |
The number of allowed API requests has been exceeded. | 429 |
bad tld |
The TLD is invalid or not supported. | 400 |
key invalid |
The API key is invalid. | 400 |
no permissions |
You are trying to access some functionality that your current plan does not support. | 400 |
out of credits |
You've used up all your available API requests. | 400 |
unknown error |
Unknown error. | 400 |
warning, estimated answer |
We got no answer from the registry or WHOIS server, so you got an estimated answer based on DNS and premium data. | 200 |
Error example response:
{"error":"key invalid"}
Http code = 400
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
domain |
string | Yes | The domain name to check (e.g., example.com). |
apikey |
string | Yes | Your unique API key. |
whois |
bool | No | Include this parameter if you want to see WHOIS instead of availability. |
raw |
bool | No | Include this parameter if you want to only see the raw whois/rdap data. |
rdap |
bool | No | Include this parameter if you want to see RDAP data. |
use_cache |
bool | No | Include this parameter to activate cache mode. With cache mode requests become cheaper & faster but less accurate (read cache section below for more info). |
Usage
1. Using the GET Method
<?php
// PHP Example: GET Method
$domain = 'example.com';
$apikey = 'VH2PS6QZ5FYD';
$url = "https://v2-api.domainduck.io/get/?domain=$domain&apikey=$apikey";
$response = file_get_contents($url);
if ($response === false) {
die('Error occurred');
}
echo "API Response: " . $response;
# Python Example: GET Method
import requests
domain = 'example.com'
apikey = 'VH2PS6QZ5FYD'
url = f"https://v2-api.domainduck.io/get/?domain={domain}&apikey={apikey}"
response = requests.get(url)
if response.status_code == 200:
print(f"API Response: {response.text}")
else:
print(f"Error: {response.status_code}")
2. Using the POST Method (recommended)
<?php
$domain = 'example.com';
$apikey = 'VH2PS6QZ5FYD';
$url = 'https://v2-api.domainduck.io/post/';
$data = [
'domain' => $domain,
'rand' => rand(1000000000, 9999999999),
];
// Init curl
$ch = curl_init();
// Set curl options
curl_setopt_array($ch, [
CURLOPT_URL => $url,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/x-www-form-urlencoded',
'apikey: ' . $apikey,
],
]);
// Execute and fetch response
$response = curl_exec($ch);
// Check for errors
if ($response === false) {
die('Curl error: ' . curl_error($ch));
}
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo "HTTP Status: " . $status . "\n";
echo "API Response: " . $response;
Notes
- Ensure your API key (
apikey) is valid and active. - Random values like
randin the POST example are not required but can avoid caching issues. - If you encounter
"rate limit exceeded", consider reducing your request frequency.
For further questions or issues, contact support at [email protected].
Cache mode & API costs
With the "use_cache" parameter, requests will become faster and cheaper, great for checking multiple domains! With cache mode requests will become 10x cheaper, meaning they will only waste 0.1 credit. Most results will be cached up to 3 days, so the downside is that results may become outdated/estimated. Cache mode only works for checking availability, not WHOIS. This setting was previously called bulk mode.
Checking WHOIS/RDAP will cost 1 credit for all TLD:s except .com which costs 0.1 credit.
WHOIS data
Include the GET/POST parameter "whois" to see the whois data. RawWhois is the raw whois encoded with base64. Example:
$url = "https://v2-api.domainduck.io/get/?domain=$domain&apikey=$apikey&whois=1";
Example response:
{
"DomainName": "DN.COM",
"UpdatedDate": "2026-05-06T03:59:50+00:00",
"CreationDate": "1997-05-30T04:00:00+00:00",
"ExpiryDate": "2034-05-29T04:00:00+00:00",
"Registrar": "Alibaba Cloud Computing Ltd. d/b/a HiChina (www.net.cn)",
"RegistrarAbuseEmail": "[email protected]",
"RegistrarAbusePhone": "+86.95187",
"NameServer": [
"BED.DNSPOD.NET",
"HAMILTION.DNSPOD.NET"
],
"Contacts": [],
"RawWhois": "CiAgIERvbWFpbiBOYW1lOiBETi5DT00KICAgUmVnaXN0cnkgRG9tYWluIElEOiAyNzU5MDNfRE9NQUlOX0NPTS1WUlNOCiAgIFJlZ2lzdHJhciBXSE9JUyBTZXJ2ZXI6IGdycy13aG9pcy5oaWNoaW5hLmNvbQogICBSZWdpc3RyYXIgVVJMOiBodHRwOi8vd2Fud2FuZy5hbGl5dW4uY29tCiAgIFVwZGF0ZWQgRGF0ZTogMjAyNi0wNS0wNlQwMzo1OTo1MFoKICAgQ3JlYXRpb24gRGF0ZTogMTk5Ny0wNS0zMFQwNDowMDowMFoKICAgUmVnaXN0cnkgRXhwaXJ5IERhdGU6IDIwMzQtMDUtMjlUMDQ6MDA6MDBaCiAgIFJlZ2lzdHJhcjogQWxpYmFiYSBDbG91ZCBDb21wdXRpbmcgTHRkLiBkL2IvYSBIaUNoaW5hICh3d3cubmV0LmNuKQogICBSZWdpc3RyYXIgSUFOQSBJRDogMTU5OQogICBSZWdpc3RyYXIgQWJ1c2UgQ29udGFjdCBFbWFpbDogRG9tYWluQWJ1c2VAc2VydmljZS5hbGl5dW4uY29tCiAgIFJlZ2lzdHJhciBBYnVzZSBDb250YWN0IFBob25lOiArODYuOTUxODcKICAgRG9tYWluIFN0YXR1czogb2sgaHR0cHM6Ly9pY2Fubi5vcmcvZXBwI29rCiAgIE5hbWUgU2VydmVyOiBCRUQuRE5TUE9ELk5FVAogICBOYW1lIFNlcnZlcjogSEFNSUxUSU9OLkROU1BPRC5ORVQKICAgRE5TU0VDOiB1bnNpZ25lZAogICBVUkwgb2YgdGhlIElDQU5OIFdob2lzIEluYWNjdXJhY3kgQ29tcGxhaW50IEZvcm06IGh0dHBzOi8vd3d3LmljYW5uLm9yZy93aWNmLwo+Pj4gTGFzdCB1cGRhdGUgb2Ygd2hvaXMgZGF0YWJhc2U6IDIwMjYtMDYtMThUMDg6NDc6MDBaIA==",
"QueryResult": "Record found"
}
QueryResult
The QueryResult JSON key will return "Record found" if a WHOIS-record can be found. If no record can be found it will instead return "No record ([message])", where the message sometimes would show as "-" (nothing), "blocked" or "premium".
RDAP data
For TLDs that have discontinued WHOIS support and transitioned to RDAP, this API will return RDAP data in the standard format (see example above). In such cases, the key "RawWhois" will be replaced by "RawRdap". If you instead want the RDAP data per default, replace the "&whois" parameter with "&rdap".
Edge Cases
If there is no functioning WHOIS server for the TLD you are trying to look up, you will still receive a record based on the data we could found. For example .CG (congo) has no public WHOIS server at all. In these cases the top line will be "% Heuristic WHOIS proxy", and the record will show the name servers from a DNS lookup, and an estimated creation date from the WaybackMachine API or CRT.SH.
Additional endpoints
Domain Appraisals (Beta)
You can use the following endpoints to get an approximate USD valuation for a domain:
POST https://v2-api.domainduck.io/appraisal/post/
GET https://v2-api.domainduck.io/appraisal/get/
Args: domain, apikey
Cost: 1 credit / request
Domain Name Suggestions (Beta)
Use the following endpoints to get domain name suggestions. You will receive 1) premium domain names, 2) dropped domains and 3) general domain names that matches your search string. This endpoint can be used for searching in the premium inventory. See demo here.
POST https://v2-api.domainduck.io/suggest/post/
GET https://v2-api.domainduck.io/suggest/get/
Args: string, apikey
Cost: 0.1 credit / request
Example response:
{
"premium": [
{
"domain": "animal.team",
"price": 7800,
"url": "godaddy.com/en/domainsearch/find?domainToCheck=animal.team",
"score": 80
}],
"dropped": [
{
"domain": "animat.tech",
"score": 65
}],
"general": [
{
"domain": "animal.com",
"score": 100
}]
}
