API Documentation: Domain Availability Checker

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.



# Domain availability API

This API allows you to check the availability of a domain name. The API supports both **GET** and **POST** requests.

> **Note:** The API key shown in this documentation is for testing purposes only. Replace it with the API key found in your profile.

## Base URLs

### GET endpoint

```text
https://v2-api.domainduck.io/api/get/
```

### POST endpoint

```text
https://v2-api.domainduck.io/api/post/
```

---

# Examples

## Check domain availability

Request:

```text
https://v2-api.domainduck.io/api/get/?domain=example.com&apikey=VH2PS6QZ5FYD&use_cache=1
```

## Get WHOIS data as JSON

Request:

```text
https://v2-api.domainduck.io/api/get/?domain=example.com&apikey=VH2PS6QZ5FYD&whois=1
```

## Get raw WHOIS data

Request:

```text
https://v2-api.domainduck.io/api/get/?domain=example.com&apikey=VH2PS6QZ5FYD&whois=1&raw=1
```

---

# Response values

The API returns JSON responses describing domain availability.

## Availability status responses

| Status    | Description                                                                                 |
| --------- | ------------------------------------------------------------------------------------------- |
| `true`    | The domain is available for registration.                                                   |
| `false`   | The domain is already registered and unavailable.                                           |
| `premium` | The domain is available but offered as a premium domain by a registry or marketplace.       |
| `blocked` | The domain has been reserved or blocked by the registry and is not available to the public. |

### Examples

#### Available domain

```json
{
  "domain": "available-domain-123.com",
  "availability": "true"
}
```

#### Registered domain

```json
{
  "domain": "google.com",
  "availability": "false"
}
```

#### Premium domain

```json
{
  "domain": "flights.site",
  "availability": "premium",
  "price": 1625,
  "url": "namecheap.com/domains/registration/results/?domain=flights.site",
  "type": "buy now"
}
```

#### Blocked domain

```json
{
  "domain": "nic.kr",
  "availability": "blocked"
}
```

---

# Error responses

The API may return one of the following errors:

# 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:**

```json 
{"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       | Return WHOIS information instead of availability data.                              |
| `raw`       | bool   | No       | Return only raw WHOIS/RDAP data.                                                    |
| `rdap`      | bool   | No       | Return RDAP information.                                                            |
| `use_cache` | bool   | No       | Enable cache mode. Cached requests are faster and cheaper but may be less accurate. |

---

# Usage

## PHP example (GET)

```php
 $domain,
    'apikey' => $apikey,
    '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',
    ],
]);

// Execute and fetch response
$response = curl_exec($ch);

// Check for errors
if ($response === false) {
    die('Curl error: ' . curl_error($ch));
}

curl_close($ch);

echo "API Response: " . $response;
```

---

# Notes

* Ensure your API key (`apikey`) is valid and active.
* Random values such as `rand` in the POST example are optional, but can help prevent caching issues.
* If you encounter `rate limit exceeded`, consider reducing your request frequency.
* For further assistance, contact support at `[email protected]`.

---

# Cache mode

Enable cache mode by adding the `use_cache` parameter.

## Benefits

* Faster response times
* Lower API costs
* Ideal for bulk domain availability checks

## Pricing

Cached requests are 10x cheaper than normal requests and consume only 0.1 API requests per lookup.

## Limitations

* Cached results may be up to 3 days old
* Results can occasionally be estimated or outdated
* Cache mode only works for availability checks
* Cache mode does not work with WHOIS lookups

---

# WHOIS data

Add the `whois` parameter to retrieve WHOIS information instead of availability data.

Example:

```php
$url = "https://v2-api.domainduck.io/api/get/?domain=$domain&apikey=$apikey&whois=1";
```

## Example response

```json
{
  "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": "[base64 encoded WHOIS data]",
  "QueryResult": "Record found"
}
```

## QueryResult

The `QueryResult` field indicates whether a WHOIS record was found.

| Value                 | Meaning                                       |
| --------------------- | --------------------------------------------- |
| `Record found`        | A WHOIS record exists for the domain.         |
| `No record (-)`       | No WHOIS record could be found.               |
| `No record (blocked)` | The domain is blocked by the registry.        |
| `No record (premium)` | The domain is classified as a premium domain. |

### RawWhois

The `RawWhois` field contains the original WHOIS response encoded as Base64.

To retrieve the raw WHOIS data without Base64 encoding, add the `raw=1` parameter:

```text
https://v2-api.domainduck.io/api/get/?domain=example.com&apikey=YOUR_API_KEY&whois=1&raw=1
```

---

# RDAP data

Some registries have discontinued WHOIS and migrated to RDAP.

For these TLDs:

* The API automatically returns RDAP data.
* The `RawWhois` key is replaced by `RawRdap`.
* The returned JSON follows the standard RDAP format.

If you always want RDAP data when available, use the `rdap` parameter instead of `whois`.

Example:

```text
https://v2-api.domainduck.io/api/get/?domain=example.com&apikey=YOUR_API_KEY&rdap=1
```

---

# Domain valuation / appraisals (Beta)

The API also supports approximate domain valuations in USD.

## Endpoints

### POST

```text
https://v2-api.domainduck.io/api/appraisal/post/
```

### GET

```text
https://v2-api.domainduck.io/api/appraisal/get/
```

> Returns an estimated market value for a domain name in USD.




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

  1. Ensure your API key (apikey) is valid and active.
  2. Random values like rand in the POST example are not required but can avoid caching issues.
  3. 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
        }]
}
5a6958eacba2b874