pricing background

DNS API Documentation

Live DNS Lookup

ASK AI
The Live DNS API allows real-time lookups of DNS resource records such as A, AAAA, MX, NS, CNAME, SOA, TXT, and SPF, and also supports reverse IP lookups using PTR records by specifying the ipAddress parameter. The API uses the type parameter to look up specific DNS records, such as NS, or multiple records separated by commas (e.g., mx,ns). To retrieve all record types, simply set the type parameter to all.

Authorization

You can make authorized requests to our API by passing API key as a query parameter. To get your API key, login to our billing dashboard and get your API key! If your API key has been compromised, you can change it by clicking on reset button in billing dashboard.

Important References

  • For details on request limits and handling rate limiting, refer here
  • For a complete overview of API credit consumption and usage, refer here

Query Parameters

Required
  • apiKey
    Get your API key from our billing dashboard.
  • domainName
    The domainName for requested dns data.
  • ipAddress
    The ipAddress for requested DNS's PTR record. OR You can pass both domainName & ipAddress. At least one is required.
  • type
    Type of DNS record like all/comma separated list (A, AAAA, TXT, NS, MX, SOA, SPF)
Optional
  • format
    Two formats are available JSON, XML. If you don't specify the 'format' parameter, the default format will be JSON.

Request

shellnodejsjavapythonphprubyjscsharpgocswiftjquery
SHELL
Loading request...

Response

Loading response...

Fields Description

Fields
Details
Example
queryTime
Timestamp when DNS query was executed
2024-10-03 13:24:09
domainName
Domain name being queried
whoisfreaks.com
ipAddress
IP address associated with the domain lookup
8.8.8.8
dnsTypes
Count of DNS record types available for the domain
A: 1, MX: 15, NS: 2, TXT: 16,
dnsRecords
List of DNS records for the domain across all types
name
Fully qualified domain or reverse lookup name
whoisfreaks.com
type
Numeric DNS record type identifier
1
dnsType
Human-readable DNS record type
A
ttl
Time to live in seconds
3600
rawText
Raw DNS response string
whoisfreaks.com. 3600 IN A 172.233.38.245
address
IP address for A record
172.233.38.245
target
Target hostname for MX record
mx.zoho.com
priority
Priority for MX records
10
admin
SOA administrative contact
support.cloudns.net
host
Primary DNS server in SOA
dns3.cloudns.net
serial
SOA version serial number
2024091202
refresh
SOA refresh interval
7200
retry
SOA retry interval
1800
expire
SOA expiry time
1209600
minimum
Minimum TTL for negative caching
3600
strings
TXT/SPF record values
v=spf1 mx include:spf.mtasv.net -all

Historical DNS Lookup

The Historical DNS Lookup API queries a database containing billions of records to retrieve all historical DNS records for a specified domain name. Results are returned in a paginated format and can be delivered in either XML or JSON.

Authorization

You can make authorized requests to our API by passing API key as a query parameter. To get your API key, login to our billing dashboard and get your API key! If your API key has been compromised, you can change it by clicking on reset button in billing dashboard.

Query Parameters

Required
  • apiKey
    Get your API key from our billing dashboard.
  • domainName
    The domainName for requested dns data.
  • type
    Type of DNS record like all/comma separated list (A, MX, CNAME, NS, AAAA, TXT, SOA)
Optional
  • page
    Specify Page number to access specific page's data. If you don't pass 'page' parameter, default page is 1.
  • format
    Two formats are available JSON, XML. If you don't specify the 'format' parameter, the default format will be JSON.

Request

shellnodejsjavapythonphprubyjscsharpgocswiftjquery
SHELL
Loading request...

Response

Loading response...

Fields Description

Fields
Details
Example
totalRecords
Total number of historical DNS snapshots available
27
totalPages
Total number of pages in paginated response
1
currentPage
Current page number of response
1
historicalDnsRecords
List of DNS snapshots captured at different timestamps
Array of historical DNS record objects
queryTime
Time when DNS snapshot was recorded
2024-10-02
domainName
Domain name for which DNS history is retrieved
whoisfreaks.com
dnsTypes
Summary count of DNS record types in that snapshot
A: 1, MX: 3, NS: 4, TXT: 5, SOA: 1, SPF: 1
dnsRecords
This list includes fields similar to those returned in a Live Lookup

Reverse DNS Lookup

The Reverse DNS API lets you search for IP addresses or CIDR ranges associated with A and AAAA records, as well as specific values for other record types within our DNS database. It also supports pattern matching using an asterisk (*) for records such as MX, NS, CNAME, SPF, TXT, and SOA by setting the exact parameter to false.

Authorization

You can make authorized requests to our API by passing API key as a query parameter. To get your API key, login to our billing dashboard and get your API key! If your API key has been compromised, you can change it by clicking on reset button in billing dashboard.

Query Parameters

Required
  • apiKey
    Get your API key from our billing dashboard.
  • value
    Value of DNS record like IP Address, MX or NS Server.
  • type
    You can use different types of DNS record, such as A or any one from the following list (MX, CNAME, NS, AAAA, TXT, SOA).
Optional
  • exact
    The 'exact' parameter can be either 'true' or 'false'.
  • page
    Specify Page number to access specific page's data. If you don't pass 'page' parameter, default page is 1.
  • format
    Two formats are available JSON, XML. If you don't specify the 'format' parameter, the default format will be JSON.

Request

shellnodejsjavapythonphprubyjscsharpgocswiftjquery
SHELL
Loading request...

Response

Loading response...

Fields Description

Fields
Details
Example
totalRecords
Total reverse DNS records returned
23017
totalPages
Total number of pages available
231
currentPage
Current page number in pagination
1
reverseDnsRecords
Array of reverse DNS result objects
queryTime
Date when DNS data was queried
2024-07-06
domainName
Domain name associated with the reverse DNS record
techbrink.com
dnsTypes
Summary of DNS record types and their counts
A
Count of A records for the domain
1
dnsRecords
This list includes fields similar to those returned in a Live Lookup

Bulk DNS Lookup

The Bulk DNS API offers two methods for large-scale lookups: you can send an API request with a body containing up to 100 domains and 100 IP addresses, with results returned directly in the response, or upload a file with up to 3 million entries, where each line contains either a domain or an IP address, and the records will be delivered to you via email.

Authorization

You can make authorized requests to our API by passing API key as a query parameter. To get your API key, login to our billing dashboard and get your API key! If your API key has been compromised, you can change it by clicking on reset button in billing dashboard.

Query Parameters

Required
  • apiKey
    Get your API key from our billing dashboard.
  • type
    Type of DNS record like all/comma separated list (A,AAAA,TXT,NS,MX,SOA,SPF).
Optional
  • format
    Two formats are available JSON, XML. If you don't specify the 'format' parameter, the default format will be JSON.

Request

shellnodejsjavapythonphprubyjscsharpgocswiftjquery
SHELL
Loading request...

Response

Loading response...

Fields Description

Fields
Details
Example
status
Request status indicating success or failure
true
queryTime
Timestamp when DNS query was executed
2024-08-05 17:38:42
ipAddress
IP address used for reverse DNS lookup
8.8.8.8
dnsTypes
DNS record types and their counts
PTR
Count of PTR records
12
dnsRecords
This list includes fields similar to those returned in a Live Lookup