API Integration Guide
Integrate our fast, free WHOIS and DNS lookup tools into your applications or automation scripts using our JSON API endpoint.
Endpoint & Parameters
Send a standard HTTP GET request to the endpoint below:
GET https://whoistrackr.com/assets/api.php?domain={domain}&type={type}
| Parameter | Type | Required | Description |
|---|---|---|---|
domain |
String | Yes | The domain name (e.g. google.com) or IP address to lookup. |
type |
String | No | The query type. Options: whois (default), dns, headers, or status. |
Integration Examples
curl -s "https://whoistrackr.com/assets/api.php?domain=example.com&type=whois"
<?php
$domain = "example.com";
$url = "https://whoistrackr.com/assets/api.php?domain=" . urlencode($domain) . "&type=whois";
$response = file_get_contents($url);
$data = json_decode($response, true);
if (isset($data['error'])) {
echo "Error: " . $data['error'];
} else {
echo "Raw WHOIS Data:\n" . $data['raw'];
}
?>
const domain = 'example.com';
const url = `https://whoistrackr.com/assets/api.php?domain=${encodeURIComponent(domain)}&type=whois`;
fetch(url)
.then(res => res.json())
.then(data => {
if (data.error) {
console.error('Error:', data.error);
} else {
console.log('WHOIS raw output:', data.raw);
}
})
.catch(err => console.error('Request failed:', err));
JSON Response Sample (WHOIS)
{
"domain": "example.com",
"type": "whois",
"raw": "Domain Name: EXAMPLE.COM\nRegistry Domain ID: 2336799_DOMAIN_COM-VRSN\nRegistrar WHOIS Server: whois.iana.org\n..."
}