@extends('layouts.app') @section('pagetitle') Docs @endsection @section('content')
Be advised
The free tier of 100 API requests per day is for both WHOIS and DIG API requests combined. If you require more requests per day, please upgrade.

 

Response codes

HTTP response Explanation
200 Command has been processed and a valid JSON response is available on success.
401 User ID in combination with Key is incorrect or the domain name the API is used on is not registered.
403 Daily free tier has been exceeded. You will need to upgrade for a one time fee of US$ 10,=

 

Sample jQuery AJAX Requests

WHOIS info
                
$.ajax({
    type: "POST",
    url: 'https://domaintools.contika.net/api/whois',
    data: {
        id: '15607745951561281017',
        key: 'C6F3FC5D78DDC8DE400CC2025A2E5765D8C21A027B3F35C81AA2C3E2A8EC57F4',
        // Set to false if no DNS info is required
        dig: true,
        domain: 'domain.com'
        },
    success: function(data) {
        console.log($.parseJSON(data));
    },
    error: function(jqXHR, error, errorThrown) {
        console.log(jqXHR.responseText);
    }
});
            
DIG info
                
$.ajax({
    type: "POST",
    url: 'https://domaintools.contika.net/api/dig',
    data: {
        id: '15607745951561281017',
        key: 'C6F3FC5D78DDC8DE400CC2025A2E5765D8C21A027B3F35C81AA2C3E2A8EC57F4',
        domain: 'domain.com'
        },
    success: function(data) {
        console.log($.parseJSON(data));
    },
    error: function(jqXHR, error, errorThrown) {
        console.log(jqXHR.responseText);
    }
});
            

 

Sample PHP/cURL Requests

WHOIS info
                
$post = [
    'id' => '15607745951561281017',
    'key' => 'C6F3FC5D78DDC8DE400CC2025A2E5765D8C21A027B3F35C81AA2C3E2A8EC57F4',
    # Set to false if no DNS info is required
    'dig' => true,
    'domain' => 'domain.com',
];

$ch = curl_init('https://domaintools.contika.net/api/whois');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
            
DIG info
                
$post = [
    'id' => '15607745951561281017',
    'key' => 'C6F3FC5D78DDC8DE400CC2025A2E5765D8C21A027B3F35C81AA2C3E2A8EC57F4',
    'domain' => 'domain.com',
];

$ch = curl_init('https://domaintools.contika.net/api/dig');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
$response = curl_exec($ch);
curl_close($ch);
var_dump($response);
            
@endsection