Our DNS Lookup API offers instant and precise access to crucial DNS records, including A, AAAA, MX, NS, SOA, SPF, TXT, and CNAME, for any hostname. Designed for efficiency, this API simplifies DNS checks and helps you optimize network performance. Whether you are performing a DNS lookup to troubleshoot issues or manage domain configurations, our API provides the latest, most accurate data to ensure domain integrity and enhance your online security.
By leveraging our DNS Lookup API, network administrators, developers, and cybersecurity professionals can swiftly diagnose DNS problems, validate MX records, and refine domain settings. This API is an essential asset for anyone needing a reliable DNS checker, helping you maintain a robust and resilient online presence. With real-time DNS record verification and comprehensive lookup capabilities, our API supports effective domain management and advanced cybersecurity strategies.
Utilize our DNS checker API to obtain real-time DNS records efficiently. This feature enables you to execute live DNS lookups, swiftly identifying and addressing domain-related issues. By providing the most up-to-date and accurate DNS information, our API ensures that you maintain a reliable network infrastructure and effectively manage your domain settings.
Efficiently retrieve only the DNS records you need with our targeted lookup capability. Choose from A, AAAA, MX, NS, SOA, SPF, TXT, and CNAME records to focus your analysis and optimize your domain management. This feature helps streamline your DNS checks by filtering out unnecessary data, enhancing your overall workflow and accuracy.
$ pip install requests
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
host-name | Yes | String | Hostname or URL whose DNS records required | |
type | Yes | Array | A comma-separated list of DNS record types for lookup is required. The values can be A, AAAA, MX, NS, SOA, SPF, TXT, CNAME, or all. |
Field | Type | Requirement | Description |
---|---|---|---|
status | Boolean | Mandatory | Indicates whether the query was processed successfully (true or false). |
queryTime | String | Mandatory | Time at which the query was made. (Format: YYYY-MM-DD HH:mm:ss) |
domainName | String | Mandatory | Queried domain. |
domainRegistered | Boolean | Mandatory | Indicates whether the domain is registered (true) or not (false). |
dnsTypes | Object | Mandatory | DNS record types included in the response. |
dnsRecords | List<Object> | Mandatory | List of DNS records, with different formats depending on the record type. |
A and AAAA DNS record object contains following fields:
Field | Type | Requirement | Description |
---|---|---|---|
name | String | Mandatory | Name of the queried domain. |
type | Integer | Mandatory | DNS type (e.g., 1 for A, 28 for AAAA). |
dnsType | String | Mandatory | DNS type as a string (e.g., "A", "AAAA"). |
ttl | Integer | Mandatory | Time to live. |
rawText | String | Mandatory | Raw (un-parsed) DNS record. |
rRsetType | Integer | Mandatory | Indicates the resource record set type. |
address | String | Mandatory | IPV4 or IPV6 address for A or AAAA records respectively. |
CNAME DNS record object contains following fields:
Field | Type | Requirement | Description |
---|---|---|---|
name | String | Mandatory | Name of the queried domain. |
type | Integer | Mandatory | DNS type (e.g., 5 for CNAME). |
dnsType | String | Mandatory | DNS type as a string (e.g., "CNAME"). |
ttl | Integer | Mandatory | Time to live. |
rawText | String | Mandatory | Raw (un-parsed) DNS record. |
rRsetType | Integer | Mandatory | Indicates the resource record set type. |
target | String | Mandatory | Host to which this domain points. |
MX DNS record object contains following fields:
Field | Type | Requirement | Description |
---|---|---|---|
name | String | Mandatory | Name of the queried domain. |
type | Integer | Mandatory | DNS type (e.g., 15 for MX). |
dnsType | String | Mandatory | DNS type as a string (e.g., "MX"). |
ttl | Integer | Mandatory | Time to live. |
rawText | String | Mandatory | Raw (un-parsed) DNS record. |
rRsetType | Integer | Mandatory | Indicates the resource record set type. |
target | String | Mandatory | Targeted mail service provider. |
priority | Integer | Mandatory | Priority level associated with the mail server. |
NS DNS record object contains following fields:
Field | Type | Requirement | Description |
---|---|---|---|
name | String | Mandatory | Name of the queried domain. |
type | Integer | Mandatory | DNS type (e.g., 2 for NS). |
dnsType | String | Mandatory | DNS type as a string (e.g., "NS"). |
ttl | Integer | Mandatory | Time to live. |
rawText | String | Mandatory | Raw (un-parsed) DNS record. |
rRsetType | Integer | Mandatory | Indicates the resource record set type. |
singleName | String | Mandatory | Name server for that particular domain. |
SOA DNS record object contains following fields:
Field | Type | Requirement | Description |
---|---|---|---|
name | String | Mandatory | Name of the queried domain. |
type | Integer | Mandatory | DNS type (e.g., 6 for SOA). |
dnsType | String | Mandatory | DNS type as a string (e.g., "SOA"). |
ttl | Integer | Mandatory | Time to live. |
rawText | String | Mandatory | Raw (un-parsed) DNS record. |
rRsetType | Integer | Mandatory | Indicates the resource record set type. |
admin | String | Mandatory | Administrative contact email for SOA records. |
host | String | Mandatory | Primary name server for SOA records. |
expire | String | Mandatory | Expiry time for SOA records. |
minimum | Integer | Mandatory | The minimum TTL for SOA records. |
refresh | Integer | Mandatory | Indicates the refresh interval for SOA records. |
retry | Integer | Mandatory | The retry interval for SOA records. |
serial | Integer | Mandatory | The serial number for SOA records. |
SPF and TXT DNS record object contains following fields:
Field | Type | Requirement | Description |
---|---|---|---|
name | String | Mandatory | Name of the queried domain. |
type | Integer | Mandatory | DNS type (e.g., 16 for TXT). |
dnsType | String | Mandatory | DNS type as a string (e.g., "TXT"). |
ttl | Integer | Mandatory | Time to live. |
rawText | String | Mandatory | Raw (un-parsed) DNS record. |
rRsetType | Integer | Mandatory | Indicates the resource record set type. |
strings | List<String> | Mandatory | List containing the verification strings. |
HTTP Status | Reasons |
---|---|
400 | Unable to process request. |
404 | Entered Domain does not exist: <HOSTNAME> |
408 | Unable to fetch dns records. Please try after some time. [For Technical Support email at: support@whoisfreaks.com] |
500 | Internal Server error occurred. |
503 | Service is unavailable. |
504 | Request is timed-out. |
To look up specific DNS records, including A, AAAA, MX, NS, SOA, SPF, TXT, and CNAME, include the type parameter in your request. Specify a comma-separated list of record types for targeted lookups, or use all to retrieve all supported DNS records in a single request.
# Get A, AAAA, and MX records only{ "status": true, "queryTime": "2024-08-15 12:34:45", "domainName": "jfreaks.com", "domainRegistered": true, "dnsTypes": { "AAAA": 28, "A": 1, "MX": 15 }, "dnsRecords": [ { "name": "jfreaks.com", "type": 1, "dnsType": "A", "ttl": 300, "rawText": "jfreaks.com. 300 IN A 172.67.193.56", "rRsetType": 1, "address": "172.67.193.56" }, { "name": "jfreaks.com", "type": 1, "dnsType": "A", "ttl": 300, "rawText": "jfreaks.com. 300 IN A 104.21.20.167", "rRsetType": 1, "address": "104.21.20.167" }, { "name": "jfreaks.com", "type": 28, "dnsType": "AAAA", "ttl": 300, "rawText": "jfreaks.com. 300 IN AAAA 2606:4700:3032:0:0:0:ac43:c138", "rRsetType": 28, "address": "2606:4700:3032:0:0:0:ac43:c138" }, { "name": "jfreaks.com", "type": 28, "dnsType": "AAAA", "ttl": 300, "rawText": "jfreaks.com. 300 IN AAAA 2606:4700:3036:0:0:0:6815:14a7", "rRsetType": 28, "address": "2606:4700:3036:0:0:0:6815:14a7" }, { "name": "jfreaks.com", "type": 15, "dnsType": "MX", "ttl": 3600, "rawText": "jfreaks.com. 3600 IN MX 0 jfreaks-com.mail.protection.outlook.com.", "rRsetType": 15, "target": "jfreaks-com.mail.protection.outlook.com.", "priority": 0 } ] } # Get all supported DNS record typescurl --location 'https://api.apifreaks.com/v1.0/domain/dns/live?host-name=jfreaks.com&type=a%2Caaaa%2Cmx&apiKey=API-KEY'{ "status": true, "queryTime": "2024-08-15 12:36:20", "domainName": "jfreaks.com", "domainRegistered": true, "dnsTypes": { "A": 1, "AAAA": 28, "MX": 15, "NS": 2, "SOA": 6, "SPF": 99, "TXT": 16 }, "dnsRecords": [ { "name": "jfreaks.com", "type": 1, "dnsType": "A", "ttl": 300, "rawText": "jfreaks.com. 300 IN A 172.67.193.56", "rRsetType": 1, "address": "172.67.193.56" }, { "name": "jfreaks.com", "type": 1, "dnsType": "A", "ttl": 300, "rawText": "jfreaks.com. 300 IN A 104.21.20.167", "rRsetType": 1, "address": "104.21.20.167" }, { "name": "jfreaks.com", "type": 28, "dnsType": "AAAA", "ttl": 205, "rawText": "jfreaks.com. 205 IN AAAA 2606:4700:3032:0:0:0:ac43:c138", "rRsetType": 28, "address": "2606:4700:3032:0:0:0:ac43:c138" }, { "name": "jfreaks.com", "type": 28, "dnsType": "AAAA", "ttl": 205, "rawText": "jfreaks.com. 205 IN AAAA 2606:4700:3036:0:0:0:6815:14a7", "rRsetType": 28, "address": "2606:4700:3036:0:0:0:6815:14a7" }, { "name": "jfreaks.com", "type": 15, "dnsType": "MX", "ttl": 3600, "rawText": "jfreaks.com. 3600 IN MX 0 jfreaks-com.mail.protection.outlook.com.", "rRsetType": 15, "target": "jfreaks-com.mail.protection.outlook.com.", "priority": 0 }, { "name": "jfreaks.com", "type": 2, "dnsType": "NS", "ttl": 21600, "rawText": "jfreaks.com. 21600 IN NS cheryl.ns.cloudflare.com.", "rRsetType": 2, "singleName": "cheryl.ns.cloudflare.com." }, { "name": "jfreaks.com", "type": 2, "dnsType": "NS", "ttl": 21600, "rawText": "jfreaks.com. 21600 IN NS nash.ns.cloudflare.com.", "rRsetType": 2, "singleName": "nash.ns.cloudflare.com." }, { "name": "jfreaks.com", "type": 6, "dnsType": "SOA", "ttl": 1800, "rawText": "jfreaks.com. 1800 IN SOA cheryl.ns.cloudflare.com. dns.cloudflare.com. 2348954698 10000 2400 604800 1800", "rRsetType": 6, "admin": "dns.cloudflare.com.", "host": "cheryl.ns.cloudflare.com.", "expire": 604800, "minimum": 1800, "refresh": 10000, "retry": 2400, "serial": 2348954698 }, { "name": "jfreaks.com", "type": 99, "dnsType": "SPF", "ttl": 3600, "rawText": "jfreaks.com. 3600 IN SPF "v=spf1 include:zoho.com include:spf.protection.outlook.com ~all"", "rRsetType": 99, "strings": [ "v=spf1 include:zoho.com include:spf.protection.outlook.com ~all" ] }, { "name": "jfreaks.com", "type": 16, "dnsType": "TXT", "ttl": 3600, "rawText": "jfreaks.com. 3600 IN TXT "MS=ms84656090"", "rRsetType": 16, "strings": [ "MS=ms84656090" ] } ] }curl --location 'https://api.apifreaks.com/v1.0/domain/dns/live?host-name=jfreaks.com&type=all&apiKey=API-KEY'
To retrieve DNS records for a specific hostname or URL, include the host-name parameter in your request with the desired hostname or URL value. Our API will automatically extract the hostname from the provided URL.
# Get DNS records for hostname{ "status": true, "queryTime": "2024-08-15 12:36:20", "domainName": "jfreaks.com", "domainRegistered": true, "dnsTypes": { "A": 1, "AAAA": 28, "MX": 15, "NS": 2, "SOA": 6, "SPF": 99, "TXT": 16 }, "dnsRecords": [ { "name": "jfreaks.com", "type": 1, "dnsType": "A", "ttl": 300, "rawText": "jfreaks.com. 300 IN A 172.67.193.56", "rRsetType": 1, "address": "172.67.193.56" }, { "name": "jfreaks.com", "type": 1, "dnsType": "A", "ttl": 300, "rawText": "jfreaks.com. 300 IN A 104.21.20.167", "rRsetType": 1, "address": "104.21.20.167" }, { "name": "jfreaks.com", "type": 28, "dnsType": "AAAA", "ttl": 205, "rawText": "jfreaks.com. 205 IN AAAA 2606:4700:3032:0:0:0:ac43:c138", "rRsetType": 28, "address": "2606:4700:3032:0:0:0:ac43:c138" }, { "name": "jfreaks.com", "type": 28, "dnsType": "AAAA", "ttl": 205, "rawText": "jfreaks.com. 205 IN AAAA 2606:4700:3036:0:0:0:6815:14a7", "rRsetType": 28, "address": "2606:4700:3036:0:0:0:6815:14a7" }, { "name": "jfreaks.com", "type": 15, "dnsType": "MX", "ttl": 3600, "rawText": "jfreaks.com. 3600 IN MX 0 jfreaks-com.mail.protection.outlook.com.", "rRsetType": 15, "target": "jfreaks-com.mail.protection.outlook.com.", "priority": 0 }, { "name": "jfreaks.com", "type": 2, "dnsType": "NS", "ttl": 21600, "rawText": "jfreaks.com. 21600 IN NS cheryl.ns.cloudflare.com.", "rRsetType": 2, "singleName": "cheryl.ns.cloudflare.com." }, { "name": "jfreaks.com", "type": 2, "dnsType": "NS", "ttl": 21600, "rawText": "jfreaks.com. 21600 IN NS nash.ns.cloudflare.com.", "rRsetType": 2, "singleName": "nash.ns.cloudflare.com." }, { "name": "jfreaks.com", "type": 6, "dnsType": "SOA", "ttl": 1800, "rawText": "jfreaks.com. 1800 IN SOA cheryl.ns.cloudflare.com. dns.cloudflare.com. 2348954698 10000 2400 604800 1800", "rRsetType": 6, "admin": "dns.cloudflare.com.", "host": "cheryl.ns.cloudflare.com.", "expire": 604800, "minimum": 1800, "refresh": 10000, "retry": 2400, "serial": 2348954698 }, { "name": "jfreaks.com", "type": 99, "dnsType": "SPF", "ttl": 3600, "rawText": "jfreaks.com. 3600 IN SPF "v=spf1 include:zoho.com include:spf.protection.outlook.com ~all"", "rRsetType": 99, "strings": [ "v=spf1 include:zoho.com include:spf.protection.outlook.com ~all" ] }, { "name": "jfreaks.com", "type": 16, "dnsType": "TXT", "ttl": 3600, "rawText": "jfreaks.com. 3600 IN TXT "MS=ms84656090"", "rRsetType": 16, "strings": [ "MS=ms84656090" ] } ] } # Get the DNS records for URLcurl --location 'https://api.apifreaks.com/v1.0/domain/dns/live?host-name=jfreaks.com&type=all&apiKey=API-KEY'{ "status": true, "queryTime": "2024-08-15 12:43:52", "domainName": "https://jfreaks.com/", "domainRegistered": true, "dnsTypes": { "A": 1, "AAAA": 28, "MX": 15, "NS": 2, "SOA": 6, "TXT": 16, "SPF": 99 }, "dnsRecords": [ { "name": "jfreaks.com", "type": 1, "dnsType": "A", "ttl": 300, "rawText": "jfreaks.com. 300 IN A 172.67.193.56", "rRsetType": 1, "address": "172.67.193.56" }, { "name": "jfreaks.com", "type": 1, "dnsType": "A", "ttl": 300, "rawText": "jfreaks.com. 300 IN A 104.21.20.167", "rRsetType": 1, "address": "104.21.20.167" }, { "name": "jfreaks.com", "type": 28, "dnsType": "AAAA", "ttl": 300, "rawText": "jfreaks.com. 300 IN AAAA 2606:4700:3032:0:0:0:ac43:c138", "rRsetType": 28, "address": "2606:4700:3032:0:0:0:ac43:c138" }, { "name": "jfreaks.com", "type": 28, "dnsType": "AAAA", "ttl": 300, "rawText": "jfreaks.com. 300 IN AAAA 2606:4700:3036:0:0:0:6815:14a7", "rRsetType": 28, "address": "2606:4700:3036:0:0:0:6815:14a7" }, { "name": "jfreaks.com", "type": 15, "dnsType": "MX", "ttl": 3600, "rawText": "jfreaks.com. 3600 IN MX 0 jfreaks-com.mail.protection.outlook.com.", "rRsetType": 15, "target": "jfreaks-com.mail.protection.outlook.com.", "priority": 0 }, { "name": "jfreaks.com", "type": 2, "dnsType": "NS", "ttl": 21600, "rawText": "jfreaks.com. 21600 IN NS cheryl.ns.cloudflare.com.", "rRsetType": 2, "singleName": "cheryl.ns.cloudflare.com." }, { "name": "jfreaks.com", "type": 2, "dnsType": "NS", "ttl": 21600, "rawText": "jfreaks.com. 21600 IN NS nash.ns.cloudflare.com.", "rRsetType": 2, "singleName": "nash.ns.cloudflare.com." }, { "name": "jfreaks.com", "type": 6, "dnsType": "SOA", "ttl": 1800, "rawText": "jfreaks.com. 1800 IN SOA cheryl.ns.cloudflare.com. dns.cloudflare.com. 2348954698 10000 2400 604800 1800", "rRsetType": 6, "admin": "dns.cloudflare.com.", "host": "cheryl.ns.cloudflare.com.", "expire": 604800, "minimum": 1800, "refresh": 10000, "retry": 2400, "serial": 2348954698 }, { "name": "jfreaks.com", "type": 16, "dnsType": "TXT", "ttl": 3600, "rawText": "jfreaks.com. 3600 IN TXT "MS=ms84656090"", "rRsetType": 16, "strings": [ "MS=ms84656090" ] }, { "name": "jfreaks.com", "type": 99, "dnsType": "SPF", "ttl": 3600, "rawText": "jfreaks.com. 3600 IN SPF "v=spf1 include:zoho.com include:spf.protection.outlook.com ~all"", "rRsetType": 99, "strings": [ "v=spf1 include:zoho.com include:spf.protection.outlook.com ~all" ] } ] }curl --location 'https://api.apifreaks.com/v1.0/domain/dns/live?host-name=https%3A%2F%2Fjfreaks.com%2F&type=all&apiKey=API-KEY'
To use the DNS lookup API, API credits are required. Charges apply only for successful queries, indicated by a 2xx status code. If a request results in a 4xx or 5xx status code, no credits will be deducted, and any credits previously charged will be refunded.
For each successful request, 15 credits will be charged for DNS lookup. Utilize the Credits Usage API to efficiently monitor your recent consumption of both one-off and subscription credits. This API provides a streamlined way to track and manage your credit usage, ensuring you stay informed about your remaining balance and can optimize your resource allocation effectively.