https://networkcalc.com/api/dns/lookup/{hostname}
Look up DNS records for a hostname, domain name, or IP address on the public Internet.
curl https://networkcalc.com/api/dns/lookup/example.com
{
"status": "OK",
"hostname": "example.com",
"records": {
"A": [
{
"address": "93.184.216.34",
"ttl": 6962
}
],
"CNAME": [],
"MX": [
{
"exchange": "",
"priority": 0
}
],
"NS": [
{
"nameserver": "b.iana-servers.net"
},
{
"nameserver": "a.iana-servers.net"
}
],
"SOA": [
{
"nameserver": "ns.icann.org",
"hostmaster": "noc.dns.icann.org"
}
],
"TXT": [
"v=spf1 -all",
"8j5nfqld20zpcyr8xjw0ydcfq9rk8hgm"
]
}
}
Parameters
{hostname}(Required) The hostname, domain name, or IP address to look up, save, etc.
Example: https://networkcalc.com/api/dns/lookup/example.com
Response Format
Response Codes
200
OK - Success.400
NO_HOST_SPECIFIED - The {hostname} parameter was not specified.400
INVALID_HOST - The {hostname} parmaeter is not valid.400
NO_RECORDS - The hostname is valid, but the query returned no results.400
INVALID_STRING - The request format is incorrect. It should be a string.400
FAILED_TO_VALIDATE - An error occurred while validating. Verify the request and try again.400
NO_SPF_RECORD - An SPF record was not supplied in the body or there was no published SPF record found for {hostname}.