APIs Documentation

How to use DNS Zone API

Get complete DNS Zone record in a structured JSON or XML response.

DNS Zone API use case

Another unbelievably simple API that contains a great deal of important and interesting data. With nameserver information, you can find out which company hosts a certain website (legitimate or a criminal). Or you can check the MX information and see if a company has Google apps or Office 365 installed.

But that’s not all, the nameserver and MX information can become particularly important when you or someone else is migrating their website or email server, so if you are mapping out that particular part of the internet you will definitely want to use our DNS zone API.

DNS zone API
Making a DNS Zone API request with XML format:
http://api.whoapi.com/?domain=whoapi.com&r=dnszone&apikey=demokey
Output in JSON format:
{
    "status": "0",
    "ip": "52.32.117.162",
    "mx": [ {
       "priority": "1",
       "name": "aspmx.l.google.com"
   },
    {
       "priority": "5",
       "name": "alt1.aspmx.l.google.com"
   },
    {
       "priority": "5",
       "name": "alt2.aspmx.l.google.com"
   },
    {
       "priority": "10",
       "name": "aspmx2.googlemail.com"
   },
    {
       "priority": "10",
       "name": "aspmx3.googlemail.com"
   },
    {
       "priority": "10",
       "name": "aspmx4.googlemail.com"
   },
    {
       "priority": "10",
       "name": "aspmx5.googlemail.com"
   } ],
    "arecord": [ "52.32.117.162" ],
    "soa": {
       "nameserver": "ns1.first-ns.de",
       "email": "postmaster@robot.first-ns.de",
       "serial_number": "2016081102",
       "refresh": "14400",
       "retry": "1800",
       "expire": "604800",
       "min_ttl": "86400"
   },
    "nameservers": [ "ns1.first-ns.de.",
    "robotns2.second-ns.de.",
    "robotns3.second-ns.com." ],
    "txt": {
       "raw": "\"v=spf1 ip4:95.85.36.168 +a +mx +ip4:88.198.98.181 ?all\"\n",
       "spf": {
          "rule": "Neutral",
          "mx": true,
          "mx_domain": "",
          "a": true,
          "a_domain": "",
          "ip4": [ "95.85.36.168",
          "88.198.98.181" ],
          "ip6": "",
          "includes": "",
          "redirect": "",
          "explanation": "",
          "ptr": false,
          "ptr_domain": ""
      }
   },
    "requests_available": 100
}
Making a DNS Zone API request with XML format:
http://api.whoapi.com/?domain=whoapi.com&r;=dnszone&apikey;=demokey&asxml;
Output in XML format:
<?xml version="1.0"?>
<response>
  <status>0</status>
  <ip>52.32.117.162</ip>
  <mx>
    <item0>
      <priority>1</priority>
      <name>aspmx.l.google.com</name>
    </item0>
    <item1>
      <priority>5</priority>
      <name>alt1.aspmx.l.google.com</name>
    </item1>
    <item2>
      <priority>5</priority>
      <name>alt2.aspmx.l.google.com</name>
    </item2>
    <item3>
      <priority>10</priority>
      <name>aspmx2.googlemail.com</name>
    </item3>
    <item4>
      <priority>10</priority>
      <name>aspmx3.googlemail.com</name>
    </item4>
    <item5>
      <priority>10</priority>
      <name>aspmx4.googlemail.com</name>
    </item5>
    <item6>
      <priority>10</priority>
      <name>aspmx5.googlemail.com</name>
    </item6>
  </mx>
  <arecord>
    <item0>52.32.117.162</item0>
  </arecord>
  <soa>
    <nameserver>ns1.first-ns.de</nameserver>
    <email>postmaster@robot.first-ns.de</email>
    <serial_number>2016081102</serial_number>
    <refresh>14400</refresh>
    <retry>1800</retry>
    <expire>604800</expire>
    <min_ttl>86400</min_ttl>
  </soa>
  <nameservers>
    <item0>ns1.first-ns.de.</item0>
    <item1>robotns2.second-ns.de.</item1>
    <item2>robotns3.second-ns.com.</item2>
  </nameservers>
  <txt>
    <raw>"v=spf1 ip4:95.85.36.168 +a +mx +ip4:88.198.98.181 ?all"
</raw>
    <spf>
      <rule>Neutral</rule>
      <mx>1</mx>
      <mx_domain/>
      <a>1</a>
      <a_domain/>
      <ip4>
        <item0>95.85.36.168</item0>
        <item1>88.198.98.181</item1>
      </ip4>
      <ip6/>
      <includes/>
      <redirect/>
      <explanation/>
      <ptr/>
      <ptr_domain/>
    </spf>
  </txt>
  <requests_available>100</requests_available>
</response>