# Bulk DNS Lookup: A, MX, NS, TXT, CNAME, SOA, PTR & IP Owner (`larkmoor/bulk-dns-lookup`) Actor

Look up DNS records for thousands of domains, hostnames or IPs: A, AAAA, MX, NS, TXT, CNAME, SOA, CAA, DMARC, SRV, plus reverse DNS and the network owner (ASN, organisation, country) of every IP. Detects mail, DNS and hosting providers. Non-existent names are free.

- **URL**: https://apify.com/larkmoor/bulk-dns-lookup.md
- **Developed by:** [Larkmoor Data](https://apify.com/larkmoor) (community)
- **Categories:** Developer tools, SEO tools
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.26 / 1,000 name looked ups

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Bulk DNS Lookup: A, MX, NS, TXT, CNAME, SOA, PTR & IP Owner

Look up the DNS records of hundreds of thousands of domains, hostnames or IP addresses in one run. For every name you get the A and AAAA addresses, MX mail servers with priorities, NS name servers, TXT records, CNAME, SOA, CAA, the DMARC record and (on request) SRV, DS, DNSKEY, HTTPS and NAPTR records, each with its TTL. Every IP address found is enriched with its reverse DNS name (PTR) and the network that owns it: ASN number and name, routed prefix, country and regional registry.

On top of the raw records, each row tells you in plain words which **mail provider** the domain uses (Google Workspace, Microsoft 365, Proofpoint, Mimecast, Zoho...), which **DNS provider** hosts its zone (Cloudflare, Route 53, GoDaddy, Namecheap, NS1...), which **hosting or CDN** sits behind the website (Cloudflare, Fastly, CloudFront, Vercel, Shopify, Wix...) and which **SaaS tools** the company verified in its TXT records (Google, Microsoft 365, Atlassian, Stripe, HubSpot, Slack, Zoom, DocuSign, OpenAI and about 50 more).

Everything comes from public DNS through a public resolver you choose. No API keys, no logins, no third-party lookup service with a daily quota.

### What you can use it for

- **Lead qualification and tech signals**: which companies on your list run Google Workspace vs Microsoft 365, use Cloudflare, host on Shopify, or have verified Salesforce, HubSpot or Stripe.
- **Migrations and audits**: export every record of a portfolio of domains before moving DNS providers, then run again after the move and compare.
- **IT, MSP and security teams**: find domains with no MX, missing DMARC, open CAA, stale A records pointing at old servers, or names that point at networks you do not own.
- **Email deliverability**: SPF and DMARC records side by side for a whole sender list.
- **IP investigations**: paste IP addresses and get the PTR hostname, ASN, network owner and country for each.
- **Data cleaning**: drop dead domains from a CRM; names that do not exist are flagged `NXDOMAIN` and are free.

### Input

- **Domains, hostnames, URLs, emails or IPs** (`domains`): one per line. `https://www.example.com/page` becomes `www.example.com`, `info@example.com` becomes `example.com`, IPv4 and IPv6 addresses get reverse DNS and owner details.
- **Record types** (`recordTypes`): default A, AAAA, MX, NS, TXT, CNAME, SOA, CAA and DMARC. Add SRV, DS, DNSKEY, HTTPS or NAPTR when you need them.
- **Reverse DNS** (`reverseDns`) and **IP owner** (`ipOwner`): on by default.
- **Max IPs enriched per name** (`maxIpsPerName`): default 4.
- **DNS resolver** (`resolver`): Cloudflare (default), Google, Quad9, OpenDNS or the platform default. **Custom resolver IPs** (`customResolvers`) let you query your own server, for example to check a change before it propagates.
- **Only names that exist** (`onlyExisting`), **Max names** (`maxResults`, default 5,000), **Parallel lookups** (`concurrency`, default 20), **DNS timeout** (`dnsTimeoutSecs`).

Example input:

```json
{
  "domains": ["apify.com", "github.com", "stripe.com", "1.1.1.1"],
  "recordTypes": ["A", "MX", "NS", "TXT", "DMARC"]
}
```

### Output

One row per name. A shortened example for `github.com`:

```json
{
  "name": "github.com",
  "type": "hostname",
  "exists": true,
  "status": "ok",
  "a": ["140.82.116.3"],
  "mx": [{"priority": 0, "host": "github-com.mail.protection.outlook.com"}],
  "ns": ["dns1.p08.nsone.net", "dns2.p08.nsone.net", "ns-421.awsdns-52.com", "ns-520.awsdns-01.net"],
  "txt": ["MS=ms58704441", "apple-domain-verification=...", "stripe-verification=...", "v=spf1 ip4:192.30.252.0/22 include:spf.protection.outlook.com ... ~all"],
  "soa": {"primaryNs": "ns-1707.awsdns-21.co.uk", "adminEmail": "awsdns-hostmaster@amazon.com", "serial": 1},
  "caa": ["0 issue \"digicert.com\"", "0 issue \"letsencrypt.org\"", "0 issuewild \"sectigo.com\""],
  "spf": "v=spf1 ip4:192.30.252.0/22 include:spf.protection.outlook.com ... ~all",
  "dmarc": "v=DMARC1; p=quarantine; sp=reject; pct=100; rua=mailto:dmarc@github.com; ruf=mailto:dmarc@github.com; fo=1",
  "mailProvider": "Microsoft 365",
  "dnsProvider": "NS1, Amazon Route 53",
  "cdnOrHost": "GITHUB - GitHub, Inc., US",
  "servicesFromTxt": ["Microsoft 365", "Tailscale", "Adobe", "Apple", "Atlassian", "Calendly", "DocuSign", "OpenAI", "Shopify", "Stripe"],
  "ips": [{"ip": "140.82.116.3", "ptr": "lb-140-82-116-3-sea.github.com", "asn": 36459, "asnName": "GITHUB - GitHub, Inc., US", "prefix": "140.82.116.0/24", "ipCountry": "US", "registry": "arin"}],
  "ttl": {"A": 27, "MX": 39, "NS": 3600, "TXT": 300, "DMARC": 172},
  "errors": null
}
```

Other fields: `aaaa`, `cname`, `records` (SRV, DS, DNSKEY, HTTPS, NAPTR when asked), `lookupMs`. A name that does not exist comes back with `exists: false` and `status: "NXDOMAIN"`. An IP address input returns `ptr`, `asn`, `asnName`, `prefix` and `ipCountry`. Download the dataset as JSON, CSV, Excel or HTML; the table view shows the main columns.

### Cost

You pay per name that exists: **$0.30 per 1,000 names** (less on higher Apify plans). Names that do not exist or do not answer are returned free.

- 1,000 domains: about $0.30
- 10,000 domains: about $3
- 100,000 domains: about $30

1,000 names usually take one to two minutes at the default settings; 256 MB of memory is enough.

### FAQ

**Is this legal?** Yes. DNS is a public directory: every browser and mail server reads these records before connecting. The actor only sends ordinary DNS queries to a public resolver; it does not connect to the websites or mail servers themselves.

**Where does the IP owner come from?** From the public IP-to-ASN mapping service run by Team Cymru, queried over DNS. It reflects the network that announces the IP on the internet (for example a cloud provider), not necessarily the company that rents the server.

**Why is a record empty when I can see it elsewhere?** Some zones answer differently by location or resolver, and very new records take time to propagate. Switch the resolver, or put your provider's name server IP in "Custom resolver IPs".

**Can it find all subdomains of a domain?** DNS does not list subdomains. Use our Subdomain Finder for that and paste its output here.

**Does it do WHOIS?** No. For registration dates, registrar and availability use our Domain RDAP Lookup actor.

**Can I monitor changes?** Yes: save the input as a task, schedule it daily, and compare the rows (for example MX or NS changes) between runs.

### Integrations

Run it from the Apify API, the Apify CLI, Make, Zapier, n8n or a webhook. Export to Google Sheets, or join the `mailProvider`, `dnsProvider` and `servicesFromTxt` columns back onto a lead list.

### Changelog

- **0.1** (Nov 9, 2026): first release: A, AAAA, MX, NS, TXT, CNAME, SOA, CAA, DMARC, SRV, DS, DNSKEY, HTTPS, NAPTR with TTLs; reverse DNS; IP owner (ASN, name, prefix, country, registry); mail, DNS and hosting/CDN provider detection; SaaS verification records from TXT; choice of resolver or custom resolvers; IP addresses as input; free rows for names that do not exist.

### Support

Found a problem or need a field added? Open an issue on the Issues tab; it is read and answered.

# Actor input Schema

## `domains` (type: `array`):

One per line: example.com, mail.example.com, https://example.com/page, info@example.com or an IP address (1.1.1.1, 2606:4700::1111). Duplicates are removed.

## `recordTypes` (type: `array`):

DNS record types to look up for every name. DMARC = the TXT record at \_dmarc.<name>. SRV checks common service names (SIP, Autodiscover, IMAP, submission, CalDAV, XMPP).

## `reverseDns` (type: `boolean`):

Look up the PTR hostname of every IP address found.

## `ipOwner` (type: `boolean`):

Add the network (ASN number and name), routed prefix, country and registry of every IP, from the public Team Cymru IP-to-ASN DNS service.

## `maxIpsPerName` (type: `integer`):

How many of a name's A/AAAA addresses get PTR and ASN details.

## `resolver` (type: `string`):

Public resolver used for all lookups.

## `customResolvers` (type: `array`):

Use these DNS server IP addresses instead (for example your own authoritative server, to check a change before it propagates).

## `onlyExisting` (type: `boolean`):

Leave out rows for names that do not exist (NXDOMAIN) or did not answer. Those rows are free either way.

## `maxResults` (type: `integer`):

Upper limit of names looked up in this run.

## `concurrency` (type: `integer`):

Names looked up at the same time.

## `dnsTimeoutSecs` (type: `integer`):

How long to wait for each DNS answer.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "github.com",
    "stripe.com",
    "1.1.1.1"
  ],
  "recordTypes": [
    "A",
    "AAAA",
    "MX",
    "NS",
    "TXT",
    "CNAME",
    "SOA",
    "CAA",
    "DMARC"
  ],
  "reverseDns": true,
  "ipOwner": true,
  "maxIpsPerName": 4,
  "resolver": "cloudflare",
  "onlyExisting": false,
  "maxResults": 5000,
  "concurrency": 20,
  "dnsTimeoutSecs": 4
}
```

# Actor output Schema

## `results` (type: `string`):

One row per result in the run's default dataset (CSV/Excel/JSON).

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "domains": [
        "apify.com",
        "github.com",
        "stripe.com",
        "1.1.1.1"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("larkmoor/bulk-dns-lookup").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "domains": [
        "apify.com",
        "github.com",
        "stripe.com",
        "1.1.1.1",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("larkmoor/bulk-dns-lookup").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "domains": [
    "apify.com",
    "github.com",
    "stripe.com",
    "1.1.1.1"
  ]
}' |
apify call larkmoor/bulk-dns-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,larkmoor/bulk-dns-lookup"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/w2cbQwJzRxdAJN45h/builds/wF5iaaGNoYFHrX0NC/openapi.json
