Bulk DNS Lookup API - DNS Records for Up to 100 Hostnames in One Request
Checking DNS across a domain portfolio one hostname at a time means loops, rate limits, and scripts that fall over halfway through the list. The Bulk DNS Lookup API resolves up to 100 hostnames in a single POST request and returns live records for every entry in one synchronous response no job queues, no polling. You get current address, mail, nameserver, and text records for each hostname, plus a per-hostname success status and a registration flag, so one failed domain never sinks the batch. Built for security engineers auditing infrastructure, IT teams verifying migrations, and developers replacing scripted batch DNS lookup workflows. Start with 10,000 free credits no credit card required.
What You Get in Every Response
One POST, Up to 100 Hostnames
Submit a domainNames array of up to 100 hostnames to a single endpoint and receive one bulk_dns_info array back, with an entry per hostname. Each entry carries its own status boolean, queryTime timestamp, and domainRegistered flag, so unregistered or unresolvable domains are marked inline instead of failing the request.
Use it to sweep an entire client list or zone inventory in one call rather than 100.
Targeted Record-Type Filtering
The required type parameter accepts a comma-separated list of A, AAAA, MX, NS, SOA, SPF, TXT, and CNAME or all for the complete set. A dnsTypes summary object in each response entry counts the records found per type before you parse the detail.
Use it to pull only MX and TXT records for a mail audit and skip the payload you don't need.
PTR Lookups for IPs in the Same Batch
Alongside domainNames, the optional ipAddresses array accepts IP addresses and returns their PTR records, with the resolved hostname in the singleName field. One request can mix forward lookups for domains and reverse lookups for IPs the response distinguishes each entry by domainName or ipAddress.
Use it to resolve a mixed inventory of hosts and addresses without splitting the workload across two APIs.
Structured Records Plus Raw Zone Text
Every record in the dnsRecords array is returned twice over: as parsed fields - dnsType, ttl, and type-specific values like address for A records or target and priority for MX and as the original zone-file line in rawText. Responses are available as JSON (default) or XML via the format parameter.
Use the structured fields for programmatic checks and rawText for audit trails and human review.
Built for These Use Cases
Domain portfolio audits
Feed your full domain inventory through the endpoint in batches of 100 and diff the results against your intended configuration. Registrars, domain investors, and agencies get current nameserver and address records for every property in seconds, with dead or unregistered domains flagged inline. Pair it with the Bulk Domain WHOIS Lookup to check ownership records across the same list.
Email infrastructure checks
Request only mail and text records across every domain you send from, and verify that mail exchanger and sender policy entries survived the latest DNS change. One response covers an entire client roster the workflow that scripted bulk nslookup runs and one-domain-at-a-time web checkers can't handle cleanly.
Migration and cutover verification
After a nameserver or hosting migration, run the affected hostnames through one request and confirm the new records have propagated. When you need to prove what the records looked like before the change, the Historical DNS Lookup provides the dated baseline to diff against.
Threat and brand monitoring
Resolve a watchlist of lookalike or newly registered domains on a schedule and watch for the moment a parked name gains address or mail records. The per-hostname registration flag separates active threats from dormant registrations without a second API call.
API Endpoint
A maximum of 100 host-names can be included in the request body for a bulk lookup request.
All Endpoints
| Endpoint | Description | Credits | Reference | Playground |
|---|---|---|---|---|
| Bulk DNS Lookup | Retrieve DNS records for multiple hostnames in a single request. | 15 | Reference | Playground |
How to Guides
Run a Basic Bulk Lookup
You have a list of hostnames and want every record for each in one shot. POST the list as a domainNames array with type=all, and read one bulk_dns_info entry per hostname from the response each with its own record set and timestamp.
# Response { "bulk_dns_info": [ { "status": true, "queryTime": "2026-07-17 15:11:22", "domainName": "paypal.us", "domainRegistered": true, "dnsTypes": { "A": 1, "NS": 2, "SOA": 6, "MX": 15, "SPF": 99 }, "dnsRecords": [ { "name": "paypal.us", "type": 1, "dnsType": "A", "ttl": 3600, "rawText": "paypal.us.\t\t3600\tIN\tA\t3.33.139.32", "rRsetType": 1, "address": "3.33.139.32" }, { "name": "paypal.us", "type": 2, "dnsType": "NS", "ttl": 21600, "rawText": "paypal.us.\t\t21600\tIN\tNS\tns1.markmonitor.com.", "rRsetType": 2, "singleName": "ns1.markmonitor.com." }, { "name": "paypal.us", "type": 15, "dnsType": "MX", "ttl": 21600, "rawText": "paypal.us.\t\t21600\tIN\tMX\t1 bh.markmonitor.com.", "rRsetType": 15, "target": "bh.markmonitor.com.", "priority": 1 } ] } ] }curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/domain/dns/live?type=all' \ -H 'Content-Type: application/json' \ -H 'X-apiKey: API-KEY' \ -d '{ "domainNames": [ "google.com", "paypal.us" ] }'
Lookup Specific DNS Records
A mail audit doesn't need address records, and an address sweep doesn't need mail records. Trim the response to the job by passing a comma-separated list in the type parameter - type=A,MX returns only address and mail exchanger records for every hostname in the batch, cutting payload size and parse time on large runs.
# Response { "bulk_dns_info": [ { "status": true, "queryTime": "2026-07-02 07:31:39", "domainName": "paypal.us", "domainRegistered": true, "dnsTypes": { "A": 1, "MX": 15 }, "dnsRecords": [ { "name": "paypal.us", "type": 1, "dnsType": "A", "ttl": 3600, "rawText": "paypal.us.\t\t3600\tIN\tA\t3.33.139.32", "rRsetType": 1, "address": "3.33.139.32" }, { "name": "paypal.us", "type": 15, "dnsType": "MX", "ttl": 21600, "rawText": "paypal.us.\t\t21600\tIN\tMX\t1 bh.markmonitor.com.", "rRsetType": 15, "target": "bh.markmonitor.com.", "priority": 1 } ] }, { "status": true, "queryTime": "2026-07-02 07:31:39", "domainName": "google.com", "domainRegistered": true, "dnsTypes": { "A": 1, "MX": 15 }, "dnsRecords": [ { "name": "google.com", "type": 1, "dnsType": "A", "ttl": 86, "rawText": "google.com.\t\t86\tIN\tA\t142.250.27.113", "rRsetType": 1, "address": "142.250.27.113" }, { "name": "google.com", "type": 1, "dnsType": "A", "ttl": 86, "rawText": "google.com.\t\t86\tIN\tA\t142.250.27.100", "rRsetType": 1, "address": "142.250.27.100" }, { "name": "google.com", "type": 1, "dnsType": "A", "ttl": 86, "rawText": "google.com.\t\t86\tIN\tA\t142.250.27.101", "rRsetType": 1, "address": "142.250.27.101" }, { "name": "google.com", "type": 1, "dnsType": "A", "ttl": 86, "rawText": "google.com.\t\t86\tIN\tA\t142.250.27.102", "rRsetType": 1, "address": "142.250.27.102" }, { "name": "google.com", "type": 1, "dnsType": "A", "ttl": 86, "rawText": "google.com.\t\t86\tIN\tA\t142.250.27.138", "rRsetType": 1, "address": "142.250.27.138" }, { "name": "google.com", "type": 1, "dnsType": "A", "ttl": 86, "rawText": "google.com.\t\t86\tIN\tA\t142.250.27.139", "rRsetType": 1, "address": "142.250.27.139" }, { "name": "google.com", "type": 15, "dnsType": "MX", "ttl": 278, "rawText": "google.com.\t\t278\tIN\tMX\t10 smtp.google.com.", "rRsetType": 15, "target": "smtp.google.com.", "priority": 10 } ] } ] }curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/domain/dns/live?type=A%2CMX' \ -H 'Content-Type: application/json' \ -H 'X-apiKey: API-KEY' \ -d '{ "domainNames": [ "google.com", "paypal.us" ] }'
Mix Domains and IP Addresses in One Batch
Infrastructure inventories rarely come as a clean list of domains they're domains and bare IPs side by side. Add the optional ipAddresses array to the request body and the API returns PTR records for each address in the same response, with the resolved hostname in singleName, while domainNames entries get their forward records as usual.
# Response { "bulk_dns_info": [ { "status": true, "queryTime": "2026-07-17 15:11:22", "ipAddress": "8.8.8.8", "dnsTypes": { "PTR": 12 }, "dnsRecords": [ { "name": "8.8.8.8.in-addr.arpa", "type": 12, "dnsType": "PTR", "ttl": 14691, "rawText": "8.8.8.8.in-addr.arpa.\t14691\tIN\tPTR\tdns.google.", "rRsetType": 12, "singleName": "dns.google." } ] } ] }curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/domain/dns/live?type=all' \ -H 'Content-Type: application/json' \ -H 'X-apiKey: API-KEY' \ -d '{ "domainNames": [ "google.com" ], "ipAddresses": [ "8.8.8.8" ] }'
Handle Failed Hostnames in a Batch
On a 100-hostname run, a few entries will be typos, expired domains, or dead zones and your pipeline needs to keep moving. Check the status boolean on each bulk_dns_info entry: successful lookups carry their records, failed entries are marked false, and credits for failed hostnames are refunded automatically. Log failures with domainRegistered to separate unregistered domains from resolution errors, then retry only what's worth retrying.
# Response { "bulk_dns_info": [ { "status": true, "queryTime": "2026-07-17 15:11:23", "domainName": "google.com", "domainRegistered": true, "dnsTypes": { "A": 1 }, "dnsRecords": [ { "name": "google.com", "type": 1, "dnsType": "A", "ttl": 291, "rawText": "google.com.\t\t291\tIN\tA\t142.250.102.138", "rRsetType": 1, "address": "142.250.102.138" } ] }, { "status": true, "queryTime": "2026-07-17 15:11:23", "domainName": "nonexistent-domain-example-xyz.com", "domainRegistered": false, "dnsRecords": [] } ] }curl -X 'POST' \ 'https://api.apifreaks.com/v1.0/domain/dns/live?type=A' \ -H 'Content-Type: application/json' \ -H 'X-apiKey: API-KEY' \ -d '{ "domainNames": [ "google.com", "nonexistent-domain-example-xyz.com" ] }'
Frequently Asked Questions
domainNames array. Larger inventories are processed by splitting the list into batches of 100 each request returns synchronously, so batches can run sequentially or in parallel within your plan's rate limits.type parameter is required and accepts any comma-separated combination, or all for the complete set. Each response entry includes a dnsTypes summary counting the records found per type.ipAddresses array returns PTR records for each address, with the resolved hostname in the singleName field. Domains and IPs can be mixed in one batch and are distinguished in the response by the domainName and ipAddress fields.queryTime timestamp. For dated snapshots of past configurations, use the Historical DNS Lookup.format=xml to receive XML. The structure is equivalent in both formats, including per-hostname status and the raw zone-file text for each record.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.
| Service | Credits |
|---|---|
| DNS Data per Domain Name | 15 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.