DNS Record Lookup API
Instant access to any DNS record
Our DNS Record Lookup API allows for programmatic retrieval of any type of DNS record for any domain or hostname.
Streamline the process of checking DNS records with one simple API.
Get Started for FreeWhy Choose ViewDNS.info DNS Record Lookup API?
- Allows Retrieval of Any Record Type for Any Domain or Hostname
- Live Data Ensuring Real-Time Results
- Highly Scalable to meet Business Needs
- Automate Checking of DNS Records
- Subscription Includes Access to ALL ViewDNS.info APIs
Our Valued Customers Include:

Key DNS Record Lookup API Features
Live Data
Our API retrieves data in real-time, ensuring that real-time values for DNS records are returned.
Highly Scalable
Our DNS Record Lookup API employs a highly scalable backend ensuring that even high volume searches are met with the highest success rate.
Streamlined Process
Take the hassle out of retrieving DNS records manually with one simple API.
Total Coverage
Our DNS Record Lookup API allows for retrieval of any record type (e.g. A,AAAA,ANY,MX,TXT, etc.) for any Domain or Hostname.
Usage Details
Retrieve DNS records for any Domain or Hostname.
/dnsrecord GET
https://api.viewdns.info/dnsrecord/
Retrieves the specified DNS record for any domain name or hostname.
Parameters
-
apikey
requiredYour API key associated with your ViewDNS.info account.
-
domain
requiredThe hostname to retrieve DNS records for (e.g.,
example.com
). -
recordtype
optional (default=ANY)The type of DNS record to retrieve (e.g.,
A,AAAA,MX,TXT,ANY
). -
output
optional (default=json)The output format required (
'xml'
or'json'
).
Sample Request Live Demo!
https://api.viewdns.info/dnsrecord/?domain=domain.com&apikey=demo&output=json
Sample Response
{
"query": {
"tool": "dnsrecord_PRO",
"domain": "domain.com",
"recordtype": "ANY"
},
"response": {
"records": [
{
"name": "domain.com.",
"ttl": "1800",
"class": "IN",
"type": "SOA",
"data": "lee.ns.cloudflare.com. dns.cloudflare.com. 2352199173 10000 2400 604800 1800"
},
{
"name": "domain.com.",
"ttl": "86400",
"class": "IN",
"type": "NS",
"data": "lee.ns.cloudflare.com."
},
{
"name": "domain.com.",
"ttl": "86400",
"class": "IN",
"type": "NS",
"data": "sarah.ns.cloudflare.com."
},
{
"name": "domain.com.",
"ttl": "300",
"class": "IN",
"type": "A",
"data": "172.64.145.59"
},
{
"name": "domain.com.",
"ttl": "300",
"class": "IN",
"type": "A",
"data": "104.18.42.197"
},
{
"name": "domain.com.",
"ttl": "300",
"class": "IN",
"type": "TXT",
"data": "\"MS=ms38008831\""
},
{
"name": "domain.com.",
"ttl": "300",
"class": "IN",
"type": "TXT",
"data": "\"google-site-verification=1aIdxE8tG_8BUCMClWep8Z33AIxgsL91plweqqCuNZU\""
},
{
"name": "domain.com.",
"ttl": "300",
"class": "IN",
"type": "TXT",
"data": "\"google-site-verification=zlpN6bg9OaBJVw4Lv4-1fZ2wHekVqEnEGBXwuonNpBM\""
},
{
"name": "domain.com.",
"ttl": "300",
"class": "IN",
"type": "TXT",
"data": "\"v=spf1 ip4:38.113.1.0/24 ip4:38.113.20.0/24 ip4:12.45.243.128/26 ip4:65.254.224.0/19 ip4:209.17.115.0/24 ip4:64.69.218.0/24 include:spf.protection.outlook.com include:registrarmail.net include:_spf.hostedemail.com include:spf.websitewelcome.com include:_s\" \"pf.salesforce.com include:_spf.google.com include:_spf.qualtrics.com -all\""
},
{
"name": "domain.com.",
"ttl": "300",
"class": "IN",
"type": "MX",
"priority": "10",
"data": "domain-com.mail.protection.outlook.com."
}
]
}
}
Code Example