Whois API Documentation

Our Hosted Whois API Web Service provides registration details, also known as WHOIS Records, of a domain names.

Whoisjsonapi.com provides a RESTful API to get access to the whois data. It is designed for server-to-server communication between your system and the whoisjsonapi.com network using HTTPs protocol. Query responses are delivered in JSON format based on your requests which are made via GET method.

To begin, you must have a developer's account on whoisjsonapi.com, and an authentication token is necessary for each API usage.

The following data is included:

  • Important Dates (i.e. Expiration, Creation)
  • Owner and contact information if available
  • Nameservers
  • Registrar information
We store the WHOIS record in cache for a maximum of 24 hours. When you submit a query, we initially verify if the cached WHOIS record is older than 24 hours. If it is, we retrieve the most recent information in real time.

Single domain request

By making a single domain request, you can obtain only the whois information for the specific domain you are querying. This request operates swiftly as it doesn't necessitate additional resources.

API endpoint
GET https://whoisjsonapi.com/v1/{domain}
Input parameters: required
apiToken Get your personal API TOKEN on the Dashboard page.
domainName The domain for which WHOIS data is requested.
Example
curl --location 'https://whoisjsonapi.com/v1/twitter.com' \
--header 'Authorization: Bearer {your-api-token}'

Bulk request

Bulk WHOIS API gives you parsed domain WHOIS ownership information for a list of domains

The list of requested domains is limited. You can request a maximum of 20 domains at once
API endpoint
GET https://whoisjsonapi.com/v1/domains?d={domain1},{domain2},{domain3},...{domain20}
Input parameters: required
apiToken Get your personal API TOKEN on the Dashboard page.
domainNames Comma separated list of domain names. You must specify at least one domain.
Example
curl --location 'https://whoisjsonapi.com/v1/domains?d=facebook.com,twitter.com,bbc.com' \
--header 'Authorization: Bearer {your-api-token}'

Domain availability

The domain availability method checks the availability status of a single domain name. It accepts one argument: domain

The response will contain a JSON array of status objects with keys: domain and status*. The status key contains the status for the given domain.

There are two statuses provided by the API: active and inactive. INACTIVE domains indicate that they are available for purchase.

API endpoint
GET https://whoisjsonapi.com/v1/status/{domainName}
Input parameters: required
apiToken Get your personal API TOKEN on the Dashboard page.
domainName The domain for which status is requested.
Example
curl --location 'https://whoisjsonapi.com/v1/status/whois.com' \
--header 'Authorization: Bearer {your-api-token}'
Response
{
    "domain": "whois.com",
    "status": "active"
}

Authorization

When making a request to our REST API, the API token must be added either to the request Authorization header or as the GET parameter apiKey.

Example: API key in headers
curl --location 'https://whoisjsonapi.com/v1/whois.com' \
--header 'Authorization: Bearer {your-api-token}'
Example: API key in GET parameters
curl --location 'https://whoisjsonapi.com/v1/whois.com?apiKey={your-api-token}'

Response

Query responses are delivered in JSON format.

Note: some fields may be missing due to incomplete data provided by the whois providers.

Domain

Field Type Example value
id String 2320948_DOMAIN_COM-VRSN
domain String facebook.com
name String facebook
extension String com
whois_server String whois.registrarsafe.com
status Array ["clientdeleteprohibited", "clienttransferprohibited"]
name_servers Array ["a.ns.facebook.com", "b.ns.facebook.com"]
created_date String 1997-03-29T05:00:00Z
updated_date String 2022-01-26T16:45:06Z
expiration_date String 2031-03-30T04:00:00Z

Registrar

Field Type Example value
id String 3237
name String RegistrarSafe, LLC
phone String +1.6513097004
email String [email protected]

Registrant

Field Type Example value
name String Domain Admin
organization String Meta Platforms, Inc.
street String 1601 Willow Rd
city String Menlo Park
province String CA
postal_code String 94025
country String US
phone String +1.6515434890
email String [email protected]

Administrative

Field Type Example value
name String Domain Admin
organization String Meta Platforms, Inc.
street String 1601 Willow Rd
city String Menlo Park
province String CA
postal_code String 94025
country String US
phone String +1.6515434890
email String [email protected]

Technical

Field Type Example value
name String Domain Admin
organization String Meta Platforms, Inc.
street String 1601 Willow Rd
city String Menlo Park
province String CA
postal_code String 94025
country String US
phone String +1.6515434890
email String [email protected]
Response example
{
    "domain": {
        "id": "2320948_DOMAIN_COM-VRSN",
        "domain": "facebook.com",
        "punycode": "facebook.com",
        "name": "facebook.com",
        "extension": "com",
        "whois_server": "whois.registrarsafe.com",
        "status": [
            "clientdeleteprohibited",
            "clienttransferprohibited",
            "clientupdateprohibited",
            "serverdeleteprohibited",
            "servertransferprohibited",
            "serverupdateprohibited"
        ],
        "name_servers": [
            "d.ns.facebook.com",
            "a.ns.facebook.com",
            "b.ns.facebook.com",
            "c.ns.facebook.com"
        ],
        "created_date": "1997-03-29T05:00:00Z",
        "created_date_in_time": "1997-03-29T05:00:00Z",
        "updated_date": "2023-04-26T19:04:19Z",
        "updated_date_in_time": "2023-04-26T19:04:19Z",
        "expiration_date": "2032-03-30T04:00:00Z",
        "expiration_date_in_time": "2032-03-30T04:00:00Z"
    },
    "registrar": {
        "name": "RegistrarSafe, LLC",
        "phone": "+1.6503087004",
        "email": "[email protected]",
        "referral_url": "https://www.registrarsafe.com"
    },
    "registrant": {
        "name": "Domain Admin",
        "organization": "Meta Platforms, Inc.",
        "street": "1601 Willow Rd",
        "city": "Menlo Park",
        "province": "CA",
        "postal_code": "94025",
        "country": "US",
        "phone": "+1.6505434800",
        "email": "[email protected]"
    }
}

Rate limits

A rate limit is the number of API calls an app or user can make within a given time period. If this limit is exceeded or if CPU or total time limits are exceeded, the app or user may be throttled. API requests made by a throttled user or app will fail.

Platform rate limits

Each endpoint is subject to a rate limit of 50 requests per second. Once this limit is reached, the system will respond with a 429 status code.

Errors

When you request information about a domain, you may receive a message that the domain was not found. This means that the domain has not yet been registered and might be available for purchase.

Code Examples

curl --location \
--request GET 'https://whoisjsonapi.com/v1/youtube.com' \
--header 'Authorization: Bearer {your token}'
use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'https://whoisjsonapi.com/v1',
    'timeout'  => 2.0,
]);
$response = $client->request('GET', '/youtube.com', [
    'headers' => [
        'Accept'        => 'application/json',
        'Authorization' => 'Bearer {your token}'
    ]
]);

$response->getStatusCode();
$response->getBody();
const axios = require('axios');

const config = {
    headers: {
        "Content-type": "application/json",
        "Authorization": `Bearer {your token}`,
    },
};

axios
  .get('https://whoisjsonapi.com/v1/youtube.com', null, config)
  .then(res => {
    console.log(`statusCode: ${res.status}`);
    console.log(res);
  })
  .catch(error => {
    console.error(error);
  });
import (
    "fmt"
    "net/http"
    "time"
)

func main() {
    client := &http.Client{
        Timeout: time.Second * 5,
    }

    req, err := http.NewRequest("GET", "https://whoisjsonapi.com/v1/youtube.com", nil)
    if err != nil {
        return fmt.Errorf("Got error %s", err.Error())
    }

    req.Header.Set("Authorization", "Bearer {your token}")

    response, err := client.Do(req)
    if err != nil {
        return fmt.Errorf("Got error %s", err.Error())
    }
    defer response.Body.Close()
}