ViewDNS.info - Your one source for DNS related tools!
ViewDNS.info > API > Documentation >

DNS Record Lookup API



Documentation Home

TOOLS
Abuse Contact Lookup
ASN Lookup
Chinese Firewall Test
DNS Propagation Checker
DNS Record Lookup
DNS Report
DNSSEC Test
Domain/IP Whois
Free Email Lookup
Get HTTP Headers
Google Pagerank Checker
IP History
IP Location Finder
Iran Firewall Test
Is My Site Down
MAC Address Lookup
Ping
Port Scanner
Reverse DNS Lookup
Reverse IP Lookup
Reverse NS Lookup
Reverse Whois Lookup
Spam Database Lookup
Traceroute
URL/String Decode


DNS Record Lookup

View all configured DNS records (A, MX, CNAME etc.) for a specified domain name.

URL

http://pro.viewdns.info/dnsrecord/

Parameters

domain - the domain name to lookup DNS records for
recordtype - the type of DNS record you wish to retrieve (default 'ANY')
output - the output format required ('xml' or 'json')
apikey - your api key

Sample Query - A Records

domain: twitter.com
recordtype: A

GET http://pro.viewdns.info/dnsrecord/?domain=twitter.com&recordtype=A&apikey=yourapikey&output=output_type

XML Response (output=xml)

<?xml version='1.0' encoding='ISO-8859-1'?>
<viewdns>
<query>
  <tool>dnsrecord_PRO</tool>
  <domain>twitter.com</domain>
  <recordtype>A</recordtype>
</query>
<response>
  <record>
    <name>twitter.com.</name>
    <ttl>30</ttl>
    <class>IN</class>
    <type>A</type>
    <data>199.59.148.82</data>
  </record>
  <record>
    <name>twitter.com.</name>
    <ttl>30</ttl>
    <class>IN</class>
    <type>A</type>
    <data>199.59.148.10</data>
  </record>
  <record>
    <name>twitter.com.</name>
    <ttl>30</ttl>
    <class>IN</class>
    <type>A</type>
    <data>199.59.149.230</data>
  </record>
</response>
</viewdns>

JSON Response (output=json)

{
    "query": {
        "tool": "dnsrecord_PRO",
        "domain": "twitter.com",
        "recordtype": "A"
    },
    "response": {
        "records": [
            {
                "name": "twitter.com.",
                "ttl": "30",
                "class": "IN",
                "type": "A",
                "data": "199.59.148.82"
            },
            {
                "name": "twitter.com.",
                "ttl": "30",
                "class": "IN",
                "type": "A",
                "data": "199.59.149.230"
            },
            {
                "name": "twitter.com.",
                "ttl": "30",
                "class": "IN",
                "type": "A",
                "data": "199.59.148.10"
            }
        ]
    }
}

Sample Query - MX Records

domain: twitter.com
recordtype: MX

GET http://pro.viewdns.info/dnsrecord/?domain=twitter.com&recordtype=MX&apikey=yourapikey&output=output_type

XML Response (output=xml)

<?xml version='1.0' encoding='ISO-8859-1'?>
<viewdns>
<query>
  <tool>dnsrecord_PRO</tool>
  <domain>twitter.com</domain>
  <recordtype>MX</recordtype>
</query>
<response>
  <record>
    <name>twitter.com.</name>
    <ttl>600</ttl>
    <class>IN</class>
    <type>MX</type>
    <priority>20</priority>
    <data>alt1.aspmx.l.google.com.</data>
  </record>
  <record>
    <name>twitter.com.</name>
    <ttl>600</ttl>
    <class>IN</class>
    <type>MX</type>
    <priority>20</priority>
    <data>alt2.aspmx.l.google.com.</data>
  </record>
  <record>
    <name>twitter.com.</name>
    <ttl>600</ttl>
    <class>IN</class>
    <type>MX</type>
    <priority>30</priority>
    <data>ASPMX2.GOOGLEMAIL.com.</data>
  </record>
  <record>
    <name>twitter.com.</name>
    <ttl>600</ttl>
    <class>IN</class>
    <type>MX</type>
    <priority>30</priority>
    <data>ASPMX3.GOOGLEMAIL.com.</data>
  </record>
  <record>
    <name>twitter.com.</name>
    <ttl>600</ttl>
    <class>IN</class>
    <type>MX</type>
    <priority>10</priority>
    <data>aspmx.l.google.com.</data>
  </record>
</response>
</viewdns>

JSON Response (output=json)

{
    "query": {
        "tool": "dnsrecord_PRO",
        "domain": "twitter.com",
        "recordtype": "MX"
    },
    "response": {
        "records": [
            {
                "name": "twitter.com.",
                "ttl": "600",
                "class": "IN",
                "type": "MX",
                "priority": "10",
                "data": "aspmx.l.google.com."
            },
            {
                "name": "twitter.com.",
                "ttl": "600",
                "class": "IN",
                "type": "MX",
                "priority": "20",
                "data": "alt1.aspmx.l.google.com."
            },
            {
                "name": "twitter.com.",
                "ttl": "600",
                "class": "IN",
                "type": "MX",
                "priority": "20",
                "data": "alt2.aspmx.l.google.com."
            },
            {
                "name": "twitter.com.",
                "ttl": "600",
                "class": "IN",
                "type": "MX",
                "priority": "30",
                "data": "ASPMX2.GOOGLEMAIL.com."
            },
            {
                "name": "twitter.com.",
                "ttl": "600",
                "class": "IN",
                "type": "MX",
                "priority": "30",
                "data": "ASPMX3.GOOGLEMAIL.com."
            }
        ]
    }
}







All content © 2016 ViewDNS.info
Feedback / Suggestions / Contact Us   Become an Affiliate