Bulk DNS Lookup API - Fetch DNS Records in Bulk for Hundreds of Domains

Our Bulk DNS Lookup API is designed to streamline DNS management by allowing you to perform bulk DNS lookups with ease. This powerful tool enables you to fetch DNS records for hundreds of domains in one request, including A, AAAA, MX, NS, SOA, SPF, TXT, and CNAME records. Ideal for those needing DNS bulk lookup, it enhances efficiency and accuracy for network administrators, domain managers, and cybersecurity professionals handling large-scale DNS queries

10K Free Credits, No Credit Card Required

Features

Real-Time DNS Search

Leverage our Bulk DNS Lookup API to conduct real-time DNS searches for multiple domains within a single request. This feature enables you to execute live DNS lookups, providing the most current and accurate DNS records across hundreds of domains simultaneously. Our API delivers up-to-date information on A, AAAA, MX, NS, SOA, SPF, TXT, and CNAME records, empowering you to swiftly identify and resolve domain-related issues.

Targeted DNS Record Retrieval

When conducting bulk DNS lookups with our API, you can precisely select from A, AAAA, MX, NS, SOA, SPF, TXT, and CNAME records for each hostname included in your request. This targeted lookup capability enables you to filter out unnecessary data, streamlining your DNS checks and improving efficiency.

100 Hostnames per Request

Maximize efficiency with our Bulk DNS Lookup API, which supports up to 100 hostnames per request. This advanced feature enables you to process extensive batches of hostname queries simultaneously, significantly streamlining your workflow and conserving valuable time. By handling large-scale DNS lookups in a single request, our API enhances your operational productivity and provides seamless management of multiple hostnames, ensuring rapid and accurate results for effective domain administration.

Documentation

API Endpoint

POST

https://api.apifreaks.com/v1.0/domain/dns/live

Test
LANGUAGE
Python
PHP
Java
Node
Ruby
$ pip install requests

API Request

ParameterRequiredTypeDefaultDescription
typeYesArray
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.

The request body must be in JSON format and include a comma-separated list of hostnames for which to retrieve DNS records


{
    "domainNames":[
        "google.com",
        "paypal.us"
    ]
}

API Response

FieldTypeRequirementDescription
bulk_dns_infoArrayMandatory
List of DNS object for each host-name from the request

Each DNS lookup response object includes the following fields:

FieldTypeRequirementDescription
statusBooleanMandatory
Indicates whether the query was processed successfully (true or false).
queryTimeStringMandatory
Time at which the query was made. (Format: YYYY-MM-DD HH:mm:ss)
domainNameStringMandatory
Queried domain.
domainRegisteredBooleanMandatory
Indicates whether the domain is registered (true) or not (false).
dnsTypesObjectMandatory
DNS record types included in the response.
dnsRecordsList<Object>Mandatory
List of DNS records, with different formats depending on the record type.

A and AAAA DNS record object contains following fields:

FieldTypeRequirementDescription
nameStringMandatory
Name of the queried domain.
typeIntegerMandatory
DNS type (e.g., 1 for A, 28 for AAAA).
dnsTypeStringMandatory
DNS type as a string (e.g., "A", "AAAA").
ttlIntegerMandatory
Time to live.
rawTextStringMandatory
Raw (un-parsed) DNS record.
rRsetTypeIntegerMandatory
Indicates the resource record set type.
addressStringMandatory
IPV4 or IPV6 address for A or AAAA records respectively.

CNAME DNS record object contains following fields:

FieldTypeRequirementDescription
nameStringMandatory
Name of the queried domain.
typeIntegerMandatory
DNS type (e.g., 5 for CNAME).
dnsTypeStringMandatory
DNS type as a string (e.g., "CNAME").
ttlIntegerMandatory
Time to live.
rawTextStringMandatory
Raw (un-parsed) DNS record.
rRsetTypeIntegerMandatory
Indicates the resource record set type.
targetStringMandatory
Host to which this domain points.

MX DNS record object contains following fields:

FieldTypeRequirementDescription
nameStringMandatory
Name of the queried domain.
typeIntegerMandatory
DNS type (e.g., 15 for MX).
dnsTypeStringMandatory
DNS type as a string (e.g., "MX").
ttlIntegerMandatory
Time to live.
rawTextStringMandatory
Raw (un-parsed) DNS record.
rRsetTypeIntegerMandatory
Indicates the resource record set type.
targetStringMandatory
Targeted mail service provider.
priorityIntegerMandatory
Priority level associated with the mail server.

NS DNS record object contains following fields:

FieldTypeRequirementDescription
nameStringMandatory
Name of the queried domain.
typeIntegerMandatory
DNS type (e.g., 2 for NS).
dnsTypeStringMandatory
DNS type as a string (e.g., "NS").
ttlIntegerMandatory
Time to live.
rawTextStringMandatory
Raw (un-parsed) DNS record.
rRsetTypeIntegerMandatory
Indicates the resource record set type.
singleNameStringMandatory
Name server for that particular domain.

SOA DNS record object contains following fields:

FieldTypeRequirementDescription
nameStringMandatory
Name of the queried domain.
typeIntegerMandatory
DNS type (e.g., 6 for SOA).
dnsTypeStringMandatory
DNS type as a string (e.g., "SOA").
ttlIntegerMandatory
Time to live.
rawTextStringMandatory
Raw (un-parsed) DNS record.
rRsetTypeIntegerMandatory
Indicates the resource record set type.
adminStringMandatory
Administrative contact email for SOA records.
hostStringMandatory
Primary name server for SOA records.
expireStringMandatory
Expiry time for SOA records.
minimumIntegerMandatory
The minimum TTL for SOA records.
refreshIntegerMandatory
Indicates the refresh interval for SOA records.
retryIntegerMandatory
The retry interval for SOA records.
serialIntegerMandatory
The serial number for SOA records.

SPF and TXT DNS record object contains following fields:

FieldTypeRequirementDescription
nameStringMandatory
Name of the queried domain.
typeIntegerMandatory
DNS type (e.g., 16 for TXT).
dnsTypeStringMandatory
DNS type as a string (e.g., "TXT").
ttlIntegerMandatory
Time to live.
rawTextStringMandatory
Raw (un-parsed) DNS record.
rRsetTypeIntegerMandatory
Indicates the resource record set type.
stringsList<String>Mandatory
List containing the verification strings.

HTTP Error Codes

If the entire request encounters an error, specific error codes will be returned. However, if an individual hostname fails to retrieve DNS records or experiences another issue, the status for that hostname will be marked as false. The response will still include DNS records for the remaining hostnames, ensuring you receive the maximum amount of useful information available.

HTTP StatusReasons
400
Unable to process request.
408
Unable to fetch dns records. Please try after some time.
500
Internal Server error occurred.
503
Service is unavailable. Please try after some time.
504
Request is timed-out

How to Guides

Lookup Specific Dns Records

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 obtain all supported DNS records for each hostname.

curl --location 'https://api.apifreaks.com/v1.0/domain/dns/live?type=a%2Cmx&apiKey=API-KEY' --header 'Content-Type: application/json' --data '{ "domainNames":[ "google.com", "paypal.us" ] }'
{ "bulk_dns_info": [ { "status": true, "queryTime": "2024-08-15 15:26:09", "domainName": "paypal.us", "domainRegistered": true, "dnsTypes": { "A": 1, "MX": 15 }, "dnsRecords": [ { "name": "paypal.us", "type": 1, "dnsType": "A", "ttl": 3600, "rawText": "paypal.us. 3600 IN A 3.33.139.32", "rRsetType": 1, "address": "3.33.139.32" }, { "name": "paypal.us", "type": 15, "dnsType": "MX", "ttl": 21600, "rawText": "paypal.us. 21600 IN MX 1 bh.markmonitor.com.", "rRsetType": 15, "target": "bh.markmonitor.com.", "priority": 1 } ] }, { "status": true, "queryTime": "2024-08-15 15:26:09", "domainName": "google.com", "domainRegistered": true, "dnsTypes": { "A": 1, "MX": 15 }, "dnsRecords": [ { "name": "google.com", "type": 1, "dnsType": "A", "ttl": 164, "rawText": "google.com. 164 IN A 142.250.179.142", "rRsetType": 1, "address": "142.250.179.142" }, { "name": "google.com", "type": 15, "dnsType": "MX", "ttl": 218, "rawText": "google.com. 218 IN MX 10 smtp.google.com.", "rRsetType": 15, "target": "smtp.google.com.", "priority": 10 } ] } ] }

FInd DNS Records By Hostname / URL

Submit hostnames or URLs in the request body. Our API will return the corresponding DNS records for each entry, providing precise and comprehensive data tailored to your requirements.

curl --location 'https://api.apifreaks.com/v1.0/domain/dns/live?type=a%2Cmx&apiKey=API-KEY' --header 'Content-Type: application/json' --data '{ "domainNames":[ "google.com", "https://jfreaks.com" ] }'
{ "bulk_dns_info": [ { "status": true, "queryTime": "2024-08-15 15:30:18", "domainName": "https://jfreaks.com", "domainRegistered": true, "dnsTypes": { "A": 1, "MX": 15 }, "dnsRecords": [ { "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": 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": 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 } ] }, { "status": true, "queryTime": "2024-08-15 15:30:18", "domainName": "google.com", "domainRegistered": true, "dnsTypes": { "A": 1, "MX": 15 }, "dnsRecords": [ { "name": "google.com", "type": 1, "dnsType": "A", "ttl": 300, "rawText": "google.com. 300 IN A 142.251.39.110", "rRsetType": 1, "address": "142.251.39.110" }, { "name": "google.com", "type": 15, "dnsType": "MX", "ttl": 5, "rawText": "google.com. 5 IN MX 10 smtp.google.com.", "rRsetType": 15, "target": "smtp.google.com.", "priority": 10 } ] } ] }

Pricing

To use the Bulk DNS Lookup API, API credits are required. Charges apply only for successful queries, which are defined by a 2xx status code. If a request results in a 4xx or 5xx status code, no credits will be deducted, and any credits already charged will be refunded. Credits are applied based on each domain name specified in your request. If an error occurs with a specific domain name, credits will be refunded for that domain, and you will be charged only for successful DNS lookups.

ServiceCredits
DNS Data per Domain Name15 credits per successful domain name 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.

Price Estimation Calculator