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.
-
Bulk DNS Lookup
Bulk DNS lookup allows you to query multiple domains in one request to get the latest information on A (IP address), AAAA (IPv6 address), MX (mail server), NS (name server), SOA (start of authority), SPF, TXT, and CNAME records. A Bulk DNS lookup tool can be used to check upto 100 domains in JSON/XML format in a single request instead of checking them one by one.
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/v2.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all
https://api.whoisfreaks.com/v2.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=A
https://api.whoisfreaks.com/v2.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/v2.0/dns/live?apiKey=API_KEY&domainName=jfreaks.com&type=all'
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://api.whoisfreaks.com/v2.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/v2.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", "/v2.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/v2.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/v2.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/v2.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/v2.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/v2.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/v2.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/v2.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.
{
"status": true,
"queryTime": "2024-03-06 08:02:52",
"domainName": "jfreaks.com",
"domainRegistered": true,
"dnsTypes": {
"A": 1,
"AAAA": 28,
"MX": 15,
"NS": 2,
"SOA": 6,
"TXT": 16
},
"dnsRecords": [
{
"name": "jfreaks.com",
"type": 1,
"dnsType": "A",
"ttl": 300,
"rawText": "jfreaks.com.\t\t300\tIN\tA\t172.67.193.56",
"rRsetType": 1,
"address": "172.67.193.56"
},
{
"name": "jfreaks.com",
"type": 1,
"dnsType": "A",
"ttl": 300,
"rawText": "jfreaks.com.\t\t300\tIN\tA\t104.21.20.167",
"rRsetType": 1,
"address": "104.21.20.167"
},
{
"name": "jfreaks.com",
"type": 28,
"dnsType": "AAAA",
"ttl": 300,
"rawText": "jfreaks.com.\t\t300\tIN\tAAAA\t2606:4700:3036:0:0:0:6815:14a7",
"rRsetType": 28,
"address": "2606:4700:3036:0:0:0:6815:14a7"
},
{
"name": "jfreaks.com",
"type": 28,
"dnsType": "AAAA",
"ttl": 300,
"rawText": "jfreaks.com.\t\t300\tIN\tAAAA\t2606:4700:3032:0:0:0:ac43:c138",
"rRsetType": 28,
"address": "2606:4700:3032:0:0:0:ac43:c138"
},
{
"name": "jfreaks.com",
"type": 15,
"dnsType": "MX",
"ttl": 300,
"rawText": "jfreaks.com.\t\t300\tIN\tMX\t10 mx.zoho.com.",
"rRsetType": 15,
"target": "mx.zoho.com.",
"priority": 10
},
{
"name": "jfreaks.com",
"type": 15,
"dnsType": "MX",
"ttl": 300,
"rawText": "jfreaks.com.\t\t300\tIN\tMX\t20 mx2.zoho.com.",
"rRsetType": 15,
"target": "mx2.zoho.com.",
"priority": 20
},
{
"name": "jfreaks.com",
"type": 15,
"dnsType": "MX",
"ttl": 300,
"rawText": "jfreaks.com.\t\t300\tIN\tMX\t50 mx3.zoho.com.",
"rRsetType": 15,
"target": "mx3.zoho.com.",
"priority": 50
},
{
"name": "jfreaks.com",
"type": 2,
"dnsType": "NS",
"ttl": 21600,
"rawText": "jfreaks.com.\t\t21600\tIN\tNS\tcheryl.ns.cloudflare.com.",
"rRsetType": 2,
"singleName": "cheryl.ns.cloudflare.com."
},
{
"name": "jfreaks.com",
"type": 2,
"dnsType": "NS",
"ttl": 21600,
"rawText": "jfreaks.com.\t\t21600\tIN\tNS\tnash.ns.cloudflare.com.",
"rRsetType": 2,
"singleName": "nash.ns.cloudflare.com."
},
{
"name": "jfreaks.com",
"type": 6,
"dnsType": "SOA",
"ttl": 1800,
"rawText": "jfreaks.com.\t\t1800\tIN\tSOA\tcheryl.ns.cloudflare.com. dns.cloudflare.com. 2334348834 10000 2400 604800 1800",
"rRsetType": 6,
"admin": "dns.cloudflare.com.",
"host": "cheryl.ns.cloudflare.com.",
"expire": 604800,
"minimum": 1800,
"refresh": 10000,
"retry": 2400,
"serial": 2334348834
},
{
"name": "jfreaks.com",
"type": 16,
"dnsType": "TXT",
"ttl": 300,
"rawText": "jfreaks.com.\t\t300\tIN\tTXT\t\"v=spf1 include:zoho.com ~all\"",
"rRsetType": 16,
"strings": [
"v=spf1 include:zoho.com ~all"
]
}
]
}
HTTP Error Codes
Below mentioned possible type of error and desc.
Historical DNS Lookup
API
https://api.whoisfreaks.com/v2.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/v2.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/v2.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/v2.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", "/v2.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/v2.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/v2.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/v2.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/v2.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/v2.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/v2.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/v2.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/v2.0/dns/reverse?apiKey=API_KEY&format=json&value=8.8.8.8&type=a
https://api.whoisfreaks.com/v2.0/dns/reverse?apiKey=API_KEY&format=json&value=2001:db8::1&type=aaaa
https://api.whoisfreaks.com/v2.0/dns/reverse?apiKey=API_KEY&format=json&value=ns1.clouddns.com&type=ns
https://api.whoisfreaks.com/v2.0/dns/reverse?apiKey=API_KEY&format=json&value=mail.zoho.com&type=mx
https://api.whoisfreaks.com/v2.0/dns/reverse?apiKey=API_KEY&format=json&value=zoho.com&type=cname
https://api.whoisfreaks.com/v2.0/dns/reverse?apiKey=API_KEY&format=json&value=_spf.google.com&type=spf
https://api.whoisfreaks.com/v2.0/dns/reverse?apiKey=API_KEY&format=json&value=hostmaster.rackspace.com&type=soa
https://api.whoisfreaks.com/v2.0/dns/reverse?apiKey=API_KEY&format=json&value=1.1.0.0/16&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).
- A record: IPv4 Address (e.g. 8.8.8.8) / IPv4 CIDR Notation (e.g. 1.1.0.0/16)
- AAAA record: IPv6 Address (e.g. 2041:0000:140F::875B:131B) / IPv6 CIDR Notation (e.g. 21:db8:c4d::/64)
- NS record: Name Server (e.g. dns3.cloudns.net) / Domain (e.g. cloudns.net)
- MX record: MX Server Target (e.g. mx.zoho.com) / Domain (e.g. zoho.com)
And for other records you can input their respective record value.
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/v2.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/v2.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/v2.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", "/v2.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/v2.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/v2.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/v2.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/v2.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/v2.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/v2.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/v2.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.
Bulk DNS Lookup
Bulk DNS lookup enables querying multiple domains in a single request for the latest DNS records like A, AAAA, MX, NS, CNAME, etc. It's a time-saving tool to check 100 domains in JSON/XML format at once instead of querying them individually.
API
https://api.whoisfreaks.com/v2.0/dns/bulk/live?apiKey=API_KEY&type=all&format=json
{
"domainNames":[
"ipgeolocation.com",
"ucsbanmaw.edu.mm",
"google.cosaasm.pk",
"google.uk"
]
}
Input parameters: required
apiKey Get your API key from our billing dashboard.
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 Snippet
curl --location --request POST 'https://api.whoisfreaks.com/v2.0/dns/bulk/live?apiKey=API_KEY&type=all&format=json' \
--header 'Content-Type: application/json' \
--data '{
"domainNames":[
"ipgeolocation.com",
"ucsbanmaw.edu.mm",
"google.cosaasm.pk",
"google.uk"
]
}'
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api.whoisfreaks.com/v2.0/dns/bulk/live?apiKey=API_KEY&type=all&format=json',
'headers': {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"domainNames": [
"ipgeolocation.com",
"ucsbanmaw.edu.mm",
"google.cosaasm.pk",
"google.uk"
]
})
};
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("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"domainNames\":[\n \"ipgeolocation.com\",\n \"ucsbanmaw.edu.mm\",\n \"google.cosaasm.pk\",\n \"google.uk\"\n ]\n}");
Request request = new Request.Builder()
.url("https://api.whoisfreaks.com/v2.0/dns/bulk/live?apiKey=API_KEY&type=all&format=json")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.build();
Response response = client.newCall(request).execute();
import http.client
import json
conn = http.client.HTTPSConnection("api.whoisfreaks.com")
payload = json.dumps({
"domainNames": [
"ipgeolocation.com",
"ucsbanmaw.edu.mm",
"google.cosaasm.pk",
"google.uk"
]
})
headers = {
'Content-Type': 'application/json'
}
conn.request("POST", "/v2.0/dns/bulk/live?apiKey=API_KEY&type=all&format=json", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
'https://api.whoisfreaks.com/v2.0/dns/bulk/live?apiKey=API_KEY&type=all&format=json',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"domainNames":[
"ipgeolocation.com",
"ucsbanmaw.edu.mm",
"google.cosaasm.pk",
"google.uk"
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
require "uri"
require "json"
require "net/http"
url = URI("https://api.whoisfreaks.com/v2.0/dns/bulk/live?apiKey=API_KEY&type=all&format=json")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"domainNames": [
"ipgeolocation.com",
"ucsbanmaw.edu.mm",
"google.cosaasm.pk",
"google.uk"
]
})
response = https.request(request)
puts response.read_body
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"domainNames": [
"ipgeolocation.com",
"ucsbanmaw.edu.mm",
"google.cosaasm.pk",
"google.uk"
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.whoisfreaks.com/v2.0/dns/bulk/live?apiKey=API_KEY&type=all&format=json", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
var options = new RestClientOptions("https://api.whoisfreaks.com")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/v2.0/dns/bulk/live?apiKey=API_KEY&type=all&format=json", Method.Post);
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@" ""domainNames"":[" + "\n" +
@" ""ipgeolocation.com""," + "\n" +
@" ""ucsbanmaw.edu.mm""," + "\n" +
@" ""google.cosaasm.pk""," + "\n" +
@" ""google.uk""" + "\n" +
@" ]" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.whoisfreaks.com/v2.0/dns/bulk/live?apiKey=API_KEY&type=all&format=json"
method := "POST"
payload := strings.NewReader(`{
"domainNames":[
"ipgeolocation.com",
"ucsbanmaw.edu.mm",
"google.cosaasm.pk",
"google.uk"
]
}`)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
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, "POST");
curl_easy_setopt(curl, CURLOPT_URL, "https://api.whoisfreaks.com/v2.0/dns/bulk/live?apiKey=API_KEY&type=all&format=json");
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
const char *data = "{\n \"domainNames\":[\n \"ipgeolocation.com\",\n \"ucsbanmaw.edu.mm\",\n \"google.cosaasm.pk\",\n \"google.uk\"\n ]\n}";
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
res = curl_easy_perform(curl);
}
curl_easy_cleanup(curl);
let parameters = "{\n \"domainNames\":[\n \"ipgeolocation.com\",\n \"ucsbanmaw.edu.mm\",\n \"google.cosaasm.pk\",\n \"google.uk\"\n ]\n}"
let postData = parameters.data(using: .utf8)
var request = URLRequest(url: URL(string: "https://api.whoisfreaks.com/v2.0/dns/bulk/live?apiKey=API_KEY&type=all&format=json")!,timeoutInterval: Double.infinity)
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.httpMethod = "POST"
request.httpBody = postData
let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}
task.resume()
Response
{
"bulk_dns_info": [
{
"status": true,
"queryTime": "2024-02-09 11:48:58",
"domainName": "google.cosaasm.pk",
"domainRegistered": false,
"dnsRecords": []
},
{
"status": true,
"queryTime": "2024-02-09 11:48:58",
"domainName": "ipgeolocation.com",
"domainRegistered": true,
"dnsTypes": {
"MX": 15
},
"dnsRecords": []
},
{
"status": true,
"queryTime": "2024-02-09 11:48:58",
"domainName": "google.uk",
"domainRegistered": true,
"dnsTypes": {
"MX": 15
},
"dnsRecords": []
},
{
"status": true,
"queryTime": "2024-02-09 11:48:59",
"domainName": "ucsbanmaw.edu.mm",
"domainRegistered": true,
"dnsTypes": {
"MX": 15
},
"dnsRecords": [
{
"name": "ucsbanmaw.edu.mm",
"type": 15,
"dnsType": "MX",
"ttl": 3600,
"rawText": "ucsbanmaw.edu.mm.\t3600\tIN\tMX\t0 ucsbanmaw-edu-mm.mail.protection.outlook.com.",
"rRsetType": 15,
"target": "ucsbanmaw-edu-mm.mail.protection.outlook.com.",
"priority": 0
}
]
}
]
}
HTTP Error Codes
Below mentioned possible type of error and descCredits 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/v2.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)
How to perform Bulk DNS lookup?
To perform Bulk DNS lookup, follow these steps:
- Visit Bulk DNS lookup API tool.
- Enter the domain names in the provided input box, with each domain on a separate line.
- Select the desired DNS records from the available checkboxes (e.g., NS, A, CNAME, MX, etc.). You can also choose 'ALL' to retrieve all available DNS records for each domain.
- Click the search button to initiate the lookup process.
- Upon successful completion of the request, you will receive the DNS information for the requested domain names.
What is the minimum number of domain names needed for bulk DNS lookup?
Bulk DNS API tool allows you to query up to 100 domains at once. You can input any number of domains, from 1 to 100, with each domain on a separate line, to retrieve their respective DNS lookup information.