# DNS Lookup Scraper (`anyxsolutions/dns-lookup-scraper`) Actor

Bulk DNS lookup for domains, website URLs or emails: A, AAAA, MX, NS, TXT, CNAME, SOA, CAA, SRV and DNSSEC records, plus SPF, DMARC and DKIM checks, the email provider (Google Workspace, Microsoft 365…) and the DNS host of each domain. No API key, no proxy.

- **URL**: https://apify.com/anyxsolutions/dns-lookup-scraper.md
- **Developed by:** [Anyx Solutions](https://apify.com/anyxsolutions) (community)
- **Categories:** Developer tools, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 results

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

![banner](https://anyx.solutions/banners/dns-lookup-scraper.png)

## DNS Lookup Scraper

**Bulk DNS lookup for any list of domains — every record type, SPF/DMARC/DKIM checks, email provider and DNS host — as clean JSON.**

Paste a list of domains, website URLs or email addresses and get one row per domain with its A,
AAAA, MX, NS, TXT, CNAME, SOA, CAA, SRV and DNSSEC records and their TTLs. Each row also carries
the email-security picture: whether the domain publishes SPF and DMARC (and how strict they are),
which DKIM selectors are set, and the email provider behind its MX records (Google Workspace,
Microsoft 365, Zoho, Proton and more), along with the DNS host behind its nameservers (Cloudflare,
Amazon Route 53, GoDaddy and more). Optional reverse DNS names the host behind each IP address.
Lookups go through Cloudflare's public DNS resolver (1.1.1.1), with no API key and no proxy.
Built for lead enrichment, email deliverability and security audits, domain portfolio monitoring
and IT due diligence.

### ⚡ Quick start

```json
{
  "domains": ["stripe.com", "shopify.com", "billing@notion.so"],
  "startUrls": [{ "url": "https://www.hubspot.com/pricing" }],
  "maxItems": 5
}
```

### 🧩 Input

| Field                  | Type    | Required | Default                                                   | Description                                                                                                                                                             |
| ---------------------- | ------- | -------- | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `domains`              | array   | no       | —                                                         | Domains to look up, one per line (`stripe.com`, `www.bbc.co.uk`). A URL is reduced to its hostname and an email address to its domain. Duplicates are looked up once.   |
| `startUrls`            | array   | no       | —                                                         | Website URLs. Each one is looked up as its registrable domain (`https://www.stripe.com/pricing` → `stripe.com`), so a list of company websites works as it is.          |
| `includeSubdomains`    | array   | no       | —                                                         | Subdomain prefixes to look up under every domain too, such as `www`, `mail` or `app`. Each adds its own row.                                                            |
| `recordTypes`          | array   | no       | `["A", "AAAA", "MX", "NS", "TXT", "CNAME", "SOA", "CAA"]` | Record types to return. Add `SRV` for common services (SIP, Autodiscover, IMAP, submission, CalDAV, XMPP) and `DNSKEY` / `DS` for DNSSEC keys.                          |
| `includeEmailSecurity` | boolean | no       | `true`                                                    | Check SPF and DMARC and name the email provider behind the MX records.                                                                                                  |
| `dkimSelectors`        | array   | no       | —                                                         | DKIM selectors to check, such as `google` (Google Workspace), `selector1` / `selector2` (Microsoft 365), `k1` (Mailchimp) or `s1` (SendGrid). Leave empty to skip DKIM. |
| `includeReverseDns`    | boolean | no       | `false`                                                   | Look up the hostname behind each IPv4 and IPv6 address (up to 10 per domain), which often names the hosting or CDN provider.                                            |
| `maxItems`             | integer | no       | —                                                         | Maximum number of names to look up, one row each, counting subdomains. The input form starts at 5; leave it empty to look up every entry.                               |
| `proxyConfiguration`   | object  | no       | `{ "useApifyProxy": false }`                              | Proxy settings. Cloudflare's public DNS resolver needs no proxy.                                                                                                        |

Add at least one entry to `domains` or `startUrls`. Entries that are not public domain names
(IP addresses, `localhost`, free text) are skipped with a note in the log.

### 📤 Output

Each looked-up name is one dataset row. A record type you did not ask for is `null`; a type you
asked for that the domain does not have is an empty list.

#### Fields

| Field               | Type    | Description                                                                                                                                                                                                                                                                                                           |
| ------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `domain`            | string  | The name looked up.                                                                                                                                                                                                                                                                                                   |
| `input`             | string  | The entry it came from (domain, URL or email), to match rows back to your list.                                                                                                                                                                                                                                       |
| `registrableDomain` | string  | The registrable domain (`stripe.com` for `www.stripe.com`).                                                                                                                                                                                                                                                           |
| `url`               | string  | The domain's website, `https://<domain>`.                                                                                                                                                                                                                                                                             |
| `status`            | string  | DNS response code: `NOERROR`, `NXDOMAIN` (the domain does not exist), `SERVFAIL` (its DNS is broken) or `REFUSED`.                                                                                                                                                                                                    |
| `resolver`          | string  | The resolver that answered: always `cloudflare` (Cloudflare 1.1.1.1).                                                                                                                                                                                                                                                 |
| `resolvedAt`        | string  | When the lookup ran (ISO 8601).                                                                                                                                                                                                                                                                                       |
| `records`           | object  | The records by type: `A`, `AAAA`, `NS`, `TXT` and `CNAME` as lists of strings; `MX` as `{ priority, host }`; `SOA` as `{ mname, rname, serial, refresh, retry, expire, minimum }`; `CAA` as `{ flags, tag, value }`; `SRV` as `{ service, priority, weight, port, target }`; `DNSKEY` and `DS` with their key fields. |
| `ttl`               | object  | The time-to-live in seconds of each record type, lowest across its records.                                                                                                                                                                                                                                           |
| `dnssec`            | boolean | Whether the resolver validated the domain's answers with DNSSEC.                                                                                                                                                                                                                                                      |
| `dnsProvider`       | string  | The DNS host behind the nameservers, such as Cloudflare, Amazon Route 53, GoDaddy or Azure DNS. `null` when it is a provider the Actor does not recognise.                                                                                                                                                            |
| `emailSecurity`     | object  | `hasSpf`, `spf`, `spfAll` (`-all`, `~all`, `?all`, `+all`), `spfIncludes`, `hasDmarc`, `dmarc`, `dmarcPolicy`, `dmarcSubdomainPolicy`, `dmarcPct`, `dmarcReportUris`, `hasDkim` and `dkim` (`null` when no selectors were checked), `mxProvider` and `mxProviders`. `null` when email security checks are off.        |
| `reverseDns`        | array   | `{ ip, hostname }` for each address. `null` when reverse DNS is off.                                                                                                                                                                                                                                                  |

<details><summary>Example output</summary>

```json
{
  "domain": "stripe.com",
  "input": "https://www.stripe.com/pricing",
  "registrableDomain": "stripe.com",
  "url": "https://stripe.com",
  "status": "NOERROR",
  "resolver": "cloudflare",
  "resolvedAt": "2026-10-13T09:48:12.000Z",
  "records": {
    "A": ["198.137.150.161", "198.202.176.161"],
    "AAAA": [],
    "MX": [
      { "priority": 10, "host": "aspmx.l.google.com" },
      { "priority": 20, "host": "alt1.aspmx.l.google.com" },
      { "priority": 20, "host": "alt2.aspmx.l.google.com" },
      { "priority": 30, "host": "aspmx2.googlemail.com" },
      { "priority": 30, "host": "aspmx3.googlemail.com" }
    ],
    "NS": [
      "ns-1087.awsdns-07.org",
      "ns-1882.awsdns-43.co.uk",
      "ns-423.awsdns-52.com",
      "ns-705.awsdns-24.net"
    ],
    "TXT": [
      "v=spf1 ip4:198.2.180.60/32 ip4:13.111.2.227/32 include:spf1.stripe.com include:greenhouse-outbound-mail.stripe.com include:_spf.qualtrics.com ~all",
      "MS=ms80697640",
      "apple-domain-verification=8kIS0gmJTvILWQuI",
      "google-site-verification=NLkFgZLHeVMVYlR3t1UZC9_1LzmqCAefJyNDs6ZQqBA"
    ],
    "CNAME": [],
    "SOA": {
      "mname": "ns-1882.awsdns-43.co.uk",
      "rname": "awsdns-hostmaster.amazon.com",
      "serial": 1,
      "refresh": 900,
      "retry": 900,
      "expire": 1209600,
      "minimum": 3600
    },
    "CAA": [
      {
        "flags": 0,
        "tag": "iodef",
        "value": "mailto:caa-violations@stripe.com"
      },
      { "flags": 0, "tag": "issue", "value": "amazon.com" },
      { "flags": 0, "tag": "issue", "value": "digicert.com" }
    ],
    "SRV": null,
    "DNSKEY": null,
    "DS": null
  },
  "ttl": {
    "A": 30,
    "AAAA": null,
    "MX": 86400,
    "NS": 43200,
    "TXT": 300,
    "CNAME": null,
    "SOA": 900,
    "CAA": 3600,
    "SRV": null,
    "DNSKEY": null,
    "DS": null
  },
  "dnssec": false,
  "dnsProvider": "Amazon Route 53",
  "emailSecurity": {
    "hasSpf": true,
    "spf": "v=spf1 ip4:198.2.180.60/32 ip4:13.111.2.227/32 include:spf1.stripe.com include:greenhouse-outbound-mail.stripe.com include:_spf.qualtrics.com ~all",
    "spfAll": "~all",
    "spfIncludes": [
      "spf1.stripe.com",
      "greenhouse-outbound-mail.stripe.com",
      "_spf.qualtrics.com"
    ],
    "hasDmarc": true,
    "dmarc": "v=DMARC1; p=reject; pct=100; fo=1; rua=mailto:dmarc-reports@stripe.com; ruf=mailto:dmarc-forensics@stripe.com;",
    "dmarcPolicy": "reject",
    "dmarcSubdomainPolicy": null,
    "dmarcPct": 100,
    "dmarcReportUris": ["mailto:dmarc-reports@stripe.com"],
    "hasDkim": true,
    "dkim": [
      {
        "selector": "google",
        "record": "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4T1…"
      }
    ],
    "mxProvider": "Google Workspace",
    "mxProviders": ["Google Workspace"]
  },
  "reverseDns": null
}
```

</details>

### 💡 Use cases

- **Lead enrichment** — learn which email provider, DNS host and SaaS senders (from SPF includes and TXT verifications) each prospect uses, and segment by tech stack.
- **Email deliverability audits** — find domains with no SPF, a permissive `+all`, no DMARC or a `p=none` policy, and check DKIM selectors before a campaign.
- **Security and IT due diligence** — review CAA, DNSSEC and nameserver setups across a portfolio, a vendor list or an acquisition target.
- **Domain monitoring** — schedule runs to catch changed MX, NS or A records, expired or dangling domains (`NXDOMAIN`) and broken DNS (`SERVFAIL`).
- **List cleaning** — check that the domains in a contact list exist and accept mail before you send.

### ❓ FAQ

- **Do I need an API key or a proxy?** No. Lookups go through Cloudflare's public DNS resolver, which needs neither.
- **Can I paste emails or full URLs?** Yes. `domains` reduces a URL to its hostname and an email address to its domain; `startUrls` reduces a website URL to its registrable domain. Duplicates are looked up once.
- **How do subdomains work?** Add prefixes such as `www` or `mail` to `includeSubdomains` and every domain gets a row for each. A subdomain without its own DMARC record shows the policy it inherits from its main domain.
- **Why is `dnsProvider` or `mxProvider` empty?** The domain uses a provider the Actor does not recognise, often its own servers. The raw `NS` and `MX` records are always in `records`.
- **Why is DKIM `null`?** DKIM keys live under selector names that only the sender knows, so they are checked only for the selectors you list in `dkimSelectors`.
- **How many domains can I look up?** As many as you like; several domains are looked up in parallel and a failed lookup is retried, then sent to a second Cloudflare endpoint.

### 🔗 More scrapers by Anyx

- [Web Content Scraper](https://apify.com/anyxsolutions/web-content-scraper)
- [Google Maps Email & Contact Extractor](https://apify.com/anyxsolutions/google-maps-email-extractor)
- [Google Search Scraper](https://apify.com/anyxsolutions/google-search-scraper)
- [Yellow Pages Scraper](https://apify.com/anyxsolutions/yellowpages-scraper)

### 🤝 Anyx Solutions

We build custom scrapers and data-extraction pipelines.

- Email: tantosthor@gmail.com

# Actor input Schema

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

Domains to look up, one per line, for example stripe.com or www.bbc.co.uk. URLs (https://www.stripe.com/pricing) are reduced to their hostname and email addresses (billing@stripe.com) to their domain.

## `startUrls` (type: `array`):

Website URLs, for example https://www.stripe.com/pricing or https://blog.hubspot.com/. Each one is looked up as its registrable domain (stripe.com, hubspot.com), so lists of company websites work as they are.

## `includeSubdomains` (type: `array`):

Subdomain prefixes to look up under every domain as well, one per line, for example www, mail or app. Each one adds its own row (www.stripe.com).

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

DNS record types to return. SRV looks up common services (SIP, Autodiscover, IMAP, submission, CalDAV, XMPP); DNSKEY and DS show the domain's DNSSEC keys.

## `includeEmailSecurity` (type: `boolean`):

Check SPF and DMARC (with the policy and report addresses) and name the email provider behind the MX records, such as Google Workspace or Microsoft 365.

## `dkimSelectors` (type: `array`):

DKIM selectors to check, one per line, for example google (Google Workspace), selector1 and selector2 (Microsoft 365), k1 (Mailchimp) or s1 (SendGrid). Leave empty to skip DKIM. Needs email security checks.

## `includeReverseDns` (type: `boolean`):

Look up the hostname behind each IPv4 and IPv6 address (up to 10 per domain), which often names the hosting or CDN provider.

## `maxItems` (type: `integer`):

Maximum number of names to look up, one row each, counting subdomains. Leave empty to look up every entry.

## `proxyConfiguration` (type: `object`):

Proxy settings. Cloudflare's public DNS resolver needs no proxy.

## Actor input object example

```json
{
  "domains": [
    "stripe.com",
    "shopify.com",
    "cloudflare.com",
    "hubspot.com",
    "notion.so",
    "atlassian.com",
    "dropbox.com",
    "zoom.us",
    "airbnb.com",
    "mailchimp.com"
  ],
  "recordTypes": [
    "A",
    "AAAA",
    "MX",
    "NS",
    "TXT",
    "CNAME",
    "SOA",
    "CAA"
  ],
  "includeEmailSecurity": true,
  "dkimSelectors": [
    "google",
    "selector1",
    "selector2",
    "k1",
    "default"
  ],
  "includeReverseDns": false,
  "maxItems": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# 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": [
        "stripe.com",
        "shopify.com",
        "cloudflare.com",
        "hubspot.com",
        "notion.so",
        "atlassian.com",
        "dropbox.com",
        "zoom.us",
        "airbnb.com",
        "mailchimp.com"
    ],
    "dkimSelectors": [
        "google",
        "selector1",
        "selector2",
        "k1",
        "default"
    ],
    "maxItems": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("anyxsolutions/dns-lookup-scraper").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": [
        "stripe.com",
        "shopify.com",
        "cloudflare.com",
        "hubspot.com",
        "notion.so",
        "atlassian.com",
        "dropbox.com",
        "zoom.us",
        "airbnb.com",
        "mailchimp.com",
    ],
    "dkimSelectors": [
        "google",
        "selector1",
        "selector2",
        "k1",
        "default",
    ],
    "maxItems": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("anyxsolutions/dns-lookup-scraper").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": [
    "stripe.com",
    "shopify.com",
    "cloudflare.com",
    "hubspot.com",
    "notion.so",
    "atlassian.com",
    "dropbox.com",
    "zoom.us",
    "airbnb.com",
    "mailchimp.com"
  ],
  "dkimSelectors": [
    "google",
    "selector1",
    "selector2",
    "k1",
    "default"
  ],
  "maxItems": 5
}' |
apify call anyxsolutions/dns-lookup-scraper --silent --output-dataset

```

## MCP server setup

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

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/v9zKzErWZozTEvy4q/builds/IpI16cTTzdF4fZSit/openapi.json
