DNS API Documentation
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. These records are directly fetched from their respective DNS servers..
-
Historical DNS API
DNS history API helps to get historical dns records that are directly fetched from our historical database.
-
Reverse DNS API
Reverse DNS API lets you get DNS Records by any value such as IP Addresses, MX or NS Servers etc. These records also include historical data.
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
https://api.whoisfreaks.com/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all

https://api.whoisfreaks.com/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=A

https://api.whoisfreaks.com/v1.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=SPF,AAAA,A

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.
Historical DNS Lookup
API
https://api.whoisfreaks.com/v1.0/dns/historical?apiKey=API_KEY&domainName=google.com&type=all&page=1

Input parameters: required
apiKey Get your API key from our billing dashboard.
dominNameThe domainName for requested dns data. e.g. google.com
type Type of DNS record like all/comma separated list (A, MX, CNAME, NS, AAAA, TXT, SOA)
Input parameters: optional
pageSpecify Page number to access specific page's data. If you don't pass 'page' parameter, default page is 1.
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/historical?apiKey=API_KEY&domainName=google.com&type=all&page=1'
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.whoisfreaks.com/v1.0/dns/historical?apiKey=API_KEY&domainName=google.com&type=all&page=1',
'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/historical?apiKey=API_KEY&domainName=google.com&type=all&page=1")
.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/historical=API_KEY&domainName=jfreaks.com&type=all&page=1", 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/historical?apiKey=API_KEY&domainName=google.com&type=all&page=1',
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/historical?apiKey=API_KEY&domainName=google.com&type=all&page=1")
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/historical?apiKey=API_KEY&domainName=google.com&type=all&page=1", 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/historical?apiKey=API_KEY&domainName=google.com&type=all&page=1");
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/historical?apiKey=API_KEY&domainName=google.com&type=all&page=1"
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/historical?apiKey=API_KEY&domainName=google.com&type=all&page=1");
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/historical?apiKey=API_KEY&domainName=google.com&type=all&page=1")!,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
Historical 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.
{
"totalRecords": 29,
"totalPages": 1,
"currentPage": 1,
"historicalDnsRecords": [
{
"queryTime": "2023-02-23",
"domainName": "google.com.",
"dnsTypes": {
"MX": 15,
"A": 1,
"CNAME": 5,
"NS": 2,
"AAAA": 28,
"TXT": 16,
"SOA": 6
},
"dnsRecords": [
{
"name": "google.com",
"type": 1,
"dnsType": "A",
"ttl": 300,
"rawText": "google.com.\t\t300\tIN\tA\t172.253.124.138",
"rRsetType": 1,
"address": "172.253.124.138"
},
{
"name": "google.com",
"type": 1,
"dnsType": "A",
"ttl": 300,
"rawText": "google.com.\t\t300\tIN\tA\t172.253.124.101",
"rRsetType": 1,
"address": "172.253.124.101"
},
{
"name": "google.com",
"type": 1,
"dnsType": "A",
"ttl": 300,
"rawText": "google.com.\t\t300\tIN\tA\t172.253.124.139",
"rRsetType": 1,
"address": "172.253.124.139"
},
.
.
.
{
"name": "google.com",
"type": 28,
"dnsType": "AAAA",
"ttl": 300,
"rawText": "google.com.\t\t300\tCLASS28\tAAAA\t2607:f8b0:4002:c10:0:0:0:64",
"rRsetType": 28,
"address": "2607:f8b0:4002:c10:0:0:0:64"
},
{
"name": "google.com",
"type": 28,
"dnsType": "AAAA",
"ttl": 300,
"rawText": "google.com.\t\t300\tCLASS28\tAAAA\t2607:f8b0:4002:c10:0:0:0:8b",
"rRsetType": 28,
"address": "2607:f8b0:4002:c10:0:0:0:8b"
},
{
"name": "google.com",
"type": 28,
"dnsType": "AAAA",
"ttl": 300,
"rawText": "google.com.\t\t300\tCLASS28\tAAAA\t2607:f8b0:4002:c10:0:0:0:71",
"rRsetType": 28,
"address": "2607:f8b0:4002:c10:0:0:0:71"
},
{
"name": "google.com",
"type": 28,
"dnsType": "AAAA",
"ttl": 300,
"rawText": "google.com.\t\t300\tCLASS28\tAAAA\t2607:f8b0:4002:c10:0:0:0:65",
"rRsetType": 28,
"address": "2607:f8b0:4002:c10:0:0:0:65"
},
{
"name": "zanti.info",
"type": 6,
"dnsType": "SOA",
"ttl": 21600,
"rawText": "zanti.info.\t\t21600\tCLASS6\tSOA\tns1056.ui-dns.com. hostmaster.1and1.com. 2015082101 28800 7200 604800 300",
"rRsetType": 6,
"admin": "hostmaster.1and1.com.",
"host": "ns1056.ui-dns.com.",
"expire": 604800,
"minimum": 300,
"refresh": 28800,
"retry": 7200,
"serial": 2015082101
},
{
"name": "google.com",
"type": 16,
"dnsType": "TXT",
"ttl": 3600,
"rawText": "google.com.\t\t3600\tCLASS16\tTXT\t\"apple-domain-verification=30afIBcvSuDV2PLX\"",
"rRsetType": 16,
"strings": [
"apple-domain-verification=30afIBcvSuDV2PLX"
]
},
.
.
.
{
"name": "google.com",
"type": 2,
"dnsType": "NS",
"ttl": 21600,
"rawText": "google.com.\t\t21600\tCLASS2\tNS\tns2.google.com.",
"rRsetType": 2,
"singleName": "ns2.google.com."
},
{
"name": "google.com",
"type": 2,
"dnsType": "NS",
"ttl": 21600,
"rawText": "google.com.\t\t21600\tCLASS2\tNS\tns1.google.com.",
"rRsetType": 2,
"singleName": "ns1.google.com."
}
]
}
]
}
HTTP Error Codes
Below mentioned possible type of error and desc.
Reverse DNS Lookup
API
https://api.whoisfreaks.com/v1.0/dns/reverse?apiKey=API_KEY&format=json&value=8.8.8.8&type=a

Input parameters: required
apiKey Get your API key from our billing dashboard.
value Value of DNS record like IP Address, MX or NS Server
type You can use different types of DNS record, such as A or any one from the following list (MX, CNAME, NS, AAAA, TXT, SOA)
Input parameters: optional
page Specify Page number to access specific page's data. If you don't pass 'page' parameter, default page is 1.
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/reverse?apiKey=API_KEY&format=json&value=8.8.8.8&type=a'
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.whoisfreaks.com/v1.0/dns/reverse?apiKey=API_KEY&format=json&value=8.8.8.8&type=a',
'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/reverse?apiKey=API_KEY&format=json&value=8.8.8.8&type=a")
.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/reverse?apiKey=API_KEY&format=json&value=8.8.8.8&type=a")
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/reverse?apiKey=API_KEY&format=json&value=8.8.8.8&type=a", 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/reverse?apiKey=API_KEY&format=json&value=8.8.8.8&type=a");
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/reverse?apiKey=API_KEY&format=json&value=8.8.8.8&type=a"
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/reverse?apiKey=API_KEY&format=json&value=8.8.8.8&type=a");
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/reverse?apiKey=API_KEY&format=json&value=8.8.8.8&type=a")!,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
Reverse 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.
{
"totalRecords": 5049,
"totalPages": 51,
"currentPage": 1,
"reverseDnsRecords": [
{
"queryTime": "2023-02-10",
"domainName": "valhallapix.com",
"dnsTypes": {
"A": 1
},
"dnsRecords": [
{
"name": "valhallapix.com",
"type": 1,
"dnsType": "A",
"ttl": 7200,
"rawText": "valhallapix.com.\t7200\tIN\tA\t8.8.8.8",
"rRsetType": 1,
"address": "8.8.8.8"
}
]
},
{
"queryTime": "2023-02-10",
"domainName": "goldassayers.com",
"dnsTypes": {
"A": 1
},
"dnsRecords": [
{
"name": "goldassayers.com",
"type": 1,
"dnsType": "A",
"ttl": 300,
"rawText": "goldassayers.com.\t300\tIN\tA\t8.8.8.8",
"rRsetType": 1,
"address": "8.8.8.8"
}
]
},
.
.
.
.
.
{
"queryTime": "2023-02-10",
"domainName": "keylinksolutions.com",
"dnsTypes": {
"A": 1
},
"dnsRecords": [
{
"name": "keylinksolutions.com",
"type": 1,
"dnsType": "A",
"ttl": 300,
"rawText": "keylinksolutions.com.\t300\tIN\tA\t8.8.8.8",
"rRsetType": 1,
"address": "8.8.8.8"
}
]
},
{
"queryTime": "2023-02-10",
"domainName": "vision-sh.com",
"dnsTypes": {
"A": 1
},
"dnsRecords": [
{
"name": "vision-sh.com",
"type": 1,
"dnsType": "A",
"ttl": 600,
"rawText": "vision-sh.com.\t\t600\tIN\tA\t8.8.8.8",
"rRsetType": 1,
"address": "8.8.8.8"
}
]
},
{
"queryTime": "2023-02-10",
"domainName": "mauicondosforrent.com",
"dnsTypes": {
"A": 1
},
"dnsRecords": [
{
"name": "mauicondosforrent.com",
"type": 1,
"dnsType": "A",
"ttl": 300,
"rawText": "mauicondosforrent.com.\t300\tIN\tA\t8.8.8.8",
"rRsetType": 1,
"address": "8.8.8.8"
}
]
}
]
}
HTTP Error Codes
Below mentioned possible type of error and desc.
Credits Usage API
You need credits in order to use DNS API. DNS Lookup service will charge 1 credit per successfull query for a domain. Historical DNS service will charge 2 credits per page. Reverse DNS service will charge 5 credits per page. Surcharge requests are only allowed to credits subscribers. You can fetch credits usage and remaining credits information through an API.
https://api.whoisfreaks.com/v1.0/whoisapi/usage?apiKey=API_KEY

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.
What is the number of free API credits available for new users, and are these credits rate-limited?
We will provide 500 API credits to new users and yes, those credits have a rate-limiting of 10 requests per minute for Live APIs, 5 requests per minute for Bulk Domain Lookup, and 1 request per minute for Reverse/Historical Endpoints.
What is meant by Live Lookup endpoint and how much data latency does it offer?
Our Live Lookup API offers real-time access to various endpoints, including domain whois, SSL and DNS data. By directly connecting to authoritative sources, this API ensures that you receive the most current and up-to-date information, eliminating data latency.
What type of data do you provide in Historical API endpoint and how often is it updated?
Our Historical API offers a blend of up-to-date information and comprehensive unique historical data. We will provide all previous unique records related to that domain along with the latest data. Please note that we update our database on monthly basis, so the maximum data latency in our historical api data can be 1 month.
Do you have rate limiting on number of requests being made on your paid plans?
Yes, we have rate limiting on requests being made on all of our paid plans. The requests limit is
shown in the following table.
The Table is divided into three types of plans:
1) API Credits
Credits | live-rpm | bulk-rpm | historical/reverse-rpm |
---|---|---|---|
5000 | 20 | 8 | 3 |
15000 | 35 | 12 | 5 |
50000 | 80 | 20 | 10 |
150000 | 120 | 25 | 15 |
450000 | 150 | 35 | 20 |
1000000 | 200 | 50 | 25 |
3000000 | 300 | 70 | 35 |
2) API Subscription
Credits | live-rpm | bulk-rpm | historical/reverse-rpm |
---|---|---|---|
5000 | 20 | 8 | 3 |
15000 | 35 | 12 | 5 |
50000 | 80 | 20 | 10 |
150,000 | 120 | 25 | 15 |
450,000 | 150 | 35 | 20 |
1,000,000 | 200 | 50 | 25 |
3,000,000 | 300 | 70 | 35 |
- live-rpm: API requests per minute limit for live Whois lookup API, domain availability API, SSL certificate lookup API, and DNS lookup API endpoints.
- bulk-rpm: API requests per minute limit for bulk domain Whois lookup API endpoint.
- historical/reverse-rpm: API requests per minute limit for historical, and reverse Whois API endpoints.
Do you provide any headers in API response regarding rate limiting?
Yes, there are following three header parameters in the response:
- X-RateLimit-Allowed-Requests (Tells the max allowed API requests per minute on a specific plan)
- X-RateLimit-Remaining-Requests (Tells the remaining API requests per minute for that plan)
- X-RateLimit-Remaining-Time (Tells after how much time the API requests per minute will be reset)