Overview
-
DNS Lookup API
The DNS Lookup API is the easiest and fastest way to get the latest details on A (IP address), AAAA (IPv6 address), MX (mail server), NS (name server), SOA (start of authority), SPF, TXT, and CNAME records.
Authorization
You can make authorized requests to our API by passing API key as a query parameter. To get your API key, login to our billing dashboard and get your API key! If your API key has been compromised, you can change it by clicking on reset button in billing dashboard.
DNS Lookup API
API



Input parameters: required
apiKey Get your API key from our billing dashboard.
domainName The domainName for requested dns data.
type Type of DNS record like all/comma separated list (A,AAAA,TXT,NS,MX,SOA,SPF)
Input parameters: optional
format Two formats are available JSON, XML. If you don't pass 'format' parameter, default format is JSON.
Code Snippets
http --follow --timeout 3600 GET 'https://api.whoisfreaks.com/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all'
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.whoisfreaks.com/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all',
'headers': {
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.whoisfreaks.com/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all")
.method("GET", body)
.build();
Response response = client.newCall(request).execute();
import http.client
conn = http.client.HTTPSConnection("api.whoisfreaks.com")
payload = ''
headers = {}
conn.request("GET", "/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.whoisfreaks.com/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
require "uri"
require "net/http"
url = URI("https://api.whoisfreaks.com/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all")
https = Net::HTTP.new(url.host, url.port)
https.use_dns = true
request = Net::HTTP::Get.new(url)
response = https.request(request)
puts response.read_body
var requestOptions = {
method: 'GET',
redirect: 'follow'
};
fetch("https://api.whoisfreaks.com/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
var client = new RestClient("https://api.whoisfreaks.com/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.whoisfreaks.com/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(curl, CURLOPT_URL, "https://api.whoisfreaks.com/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
import Foundation
#if canImport(FoundationNetworking)
import FoundationNetworking
#endif
var semaphore = DispatchSemaphore (value: 0)
var request = URLRequest(url: URL(string: "https://api.whoisfreaks.com/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all")!,timeoutInterval: Double.infinity)
request.httpMethod = "GET"
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
semaphore.signal()
return
}
print(String(data: data, encoding: .utf8)!)
semaphore.signal()
}
task.resume()
semaphore.wait()
Response
Live DNS Lookup API provides response in JSON/XML formats. You can pass format as parameter to consume API in your required format. Default format is JSON. Following is the complete DNS record data response format.
{
"domainName": "jfreaks.com",
"queryTime": "2022-12-22 14:29:59",
"dnsTypes": {
"A": 1,
"AAAA": 28,
"TXT": 16,
"SPF": 99,
"CNAME": 5,
"SOA": 6,
"MX": 15,
"NS": 2
},
"dnsRecords": [
{
"type": 1,
"dnsType": "A",
"name": "jfreaks.com",
"ttl": 300,
"rRsetType": 1,
"rawText": "jfreaks.com.\t\t300\tIN\tA\t104.21.20.167",
"address": "104.21.20.167"
},
{
"type": 1,
"dnsType": "A",
"name": "jfreaks.com",
"ttl": 300,
"rRsetType": 1,
"rawText": "jfreaks.com.\t\t300\tIN\tA\t172.67.193.56",
"address": "172.67.193.56"
},
{
"type": 28,
"dnsType": "AAAA",
"name": "jfreaks.com",
"ttl": 300,
"rRsetType": 28,
"rawText": "jfreaks.com.\t\t300\tIN\tAAAA\t2606:4700:3036:0:0:0:6815:14a7",
"address": "2606:4700:3036:0:0:0:6815:14a7"
},
{
"type": 28,
"dnsType": "AAAA",
"name": "jfreaks.com",
"ttl": 300,
"rRsetType": 28,
"rawText": "jfreaks.com.\t\t300\tIN\tAAAA\t2606:4700:3032:0:0:0:ac43:c138",
"address": "2606:4700:3032:0:0:0:ac43:c138"
},
{
"type": 15,
"dnsType": "MX",
"name": "jfreaks.com",
"ttl": 300,
"rRsetType": 15,
"rawText": "jfreaks.com.\t\t300\tIN\tMX\t20 mx2.zoho.com.",
"priority": 20,
"target": "mx2.zoho.com."
},
{
"type": 15,
"dnsType": "MX",
"name": "jfreaks.com",
"ttl": 300,
"rRsetType": 15,
"rawText": "jfreaks.com.\t\t300\tIN\tMX\t10 mx.zoho.com.",
"priority": 10,
"target": "mx.zoho.com."
},
{
"type": 15,
"dnsType": "MX",
"name": "jfreaks.com",
"ttl": 300,
"rRsetType": 15,
"rawText": "jfreaks.com.\t\t300\tIN\tMX\t50 mx3.zoho.com.",
"priority": 50,
"target": "mx3.zoho.com."
},
{
"type": 2,
"dnsType": "NS",
"name": "jfreaks.com",
"ttl": 86400,
"rRsetType": 2,
"rawText": "jfreaks.com.\t\t86400\tIN\tNS\tcheryl.ns.cloudflare.com.",
"singleName": "cheryl.ns.cloudflare.com."
},
{
"type": 2,
"dnsType": "NS",
"name": "jfreaks.com",
"ttl": 86400,
"rRsetType": 2,
"rawText": "jfreaks.com.\t\t86400\tIN\tNS\tnash.ns.cloudflare.com.",
"singleName": "nash.ns.cloudflare.com."
},
{
"type": 6,
"dnsType": "SOA",
"name": "jfreaks.com",
"ttl": 3600,
"rRsetType": 6,
"rawText": "jfreaks.com.\t\t3600\tIN\tSOA\tcheryl.ns.cloudflare.com. dns.cloudflare.com. 2285008783 10000 2400 604800 3600",
"admin": "dns.cloudflare.com.",
"host": "cheryl.ns.cloudflare.com.",
"expire": 604800,
"minimum": 3600,
"refresh": 10000,
"retry": 2400,
"serial": 2285008783
},
{
"type": 16,
"dnsType": "TXT",
"name": "jfreaks.com",
"ttl": 300,
"rRsetType": 16,
"rawText": "jfreaks.com.\t\t300\tIN\tTXT\t\"v\u003dspf1 include:zoho.com ~all\"",
"strings": [
"v\u003dspf1 include:zoho.com ~all"
]
}
]
}
HTTP Error Codes
Below mentioned possible type of error and desc.
Credits Usage API
You need credits in order to use Whoisfreaks API. DNS query API will charge 1 credit per successfull query for a domain. Surcharge requests are only allowed to credits subscribers. You can fetch credits usage and remaining credits information through an API with a time lag of 8 minutes.

Input parameters: required
apiKey Get your API key from our billing dashboard.
Input parameters: optional
format Two formats are available JSON, XML. If you don't pass 'format' parameter, default format is JSON.
Response
You can get API key from our billing dashboard.
{
"apiKey": "API_KEY",
"apiCredits": {
"totalCredits": 1020079,
"servedRequest": 1533
},
"apiSubscription": {
"subscriptionStatus": "deactivated",
"requestLimit": 0,
"servedRequests": 18,
"surchargeRequestLimit": 0,
"servedSurchargeRequests": 0
}
}
FAQs
What is the DNS?
The Domain Name System, or DNS, is a system that translates domain names to Internet Protocol (IP) addresses so browsers can load resources from the Internet.
Which DNS record types are supported?
A (IP address), AAAA (IPv6 address), MX (mail server), NS (name server), SOA (start of authority), SPF, TXT, and CNAME records are supported by DNS checker API.
Are DNS record types case sensitive?
No, DNS record types are not case sensitive.
Which TLDs are supported by your system?
All available TLDs and their sub-domains are supported by DNS lookup API.
Do you have notification service when API credits are near to an end?
Yes, we will inform you via an email. We send notification email on 80%,90%,100% usage. You can get credits/ subscription usage information from our billing portal or through API.
What happened if API credits have been utilized and my system is using whois API?
We provide surcharge requests on all active API credits subscriptions. You can fetch credits and surcharge requests information through our API. Each subscription plan has different surcharge requests limit.
Do you charge credit on 4xx error status codes in response?
No, We do not charge credits on 4xx status codes in response. All Whois APIs follow same rule for 4xx status codes in response.