# Bulk DNS & Domain Lookup: Records, RDAP, SPF & DMARC (`forgeloop/dns-domain-lookup`) Actor

Look up DNS records and registration data for many domains at once. A, AAAA, MX, NS, TXT, CNAME, SOA and CAA records, SPF, DMARC policy, mail provider, registrar, creation and expiry date from RDAP. No website is scraped. Pay per domain.

- **URL**: https://apify.com/forgeloop/dns-domain-lookup.md
- **Developed by:** [Markus Heiß](https://apify.com/forgeloop) (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.00 / 1,000 domains

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 & Domain Lookup: Records, RDAP, SPF & DMARC

Look up DNS records and registration data for a list of domains. Enter domains, URLs or email addresses, get back one row per domain with its DNS records, SPF and DMARC settings, a mail provider guess and the registrar, creation and expiry date from RDAP.

Built for lead qualification, domain portfolio checks, email deliverability audits, IT inventories and security reviews. No website is scraped: the Actor only asks public DNS resolvers and the registries.

### What it does

- **Reads 8 record types:** A, AAAA, MX, NS, TXT, CNAME, SOA and CAA. Pick only the ones you need.
- **Accepts messy input.** `https://www.example.com/page`, `info@example.com` and `EXAMPLE.COM.` all become `example.com`. Subdomains are reduced to the registrable domain, so `blog.example.co.uk` becomes `example.co.uk`. Internationalized domains are converted to punycode. Duplicates are removed.
- **Checks email security.** Parses the SPF record (`all` qualifier, includes, redirect), the DMARC record at `_dmarc.<domain>` (policy, subdomain policy, percentage, alignment, whether reports are requested) and detects a null MX.
- **Guesses the mail provider** from the MX hosts: Google Workspace, Microsoft 365, Zoho, Proton, Fastmail, iCloud or Yahoo. Other hosts return `null`.
- **Reads registration data over RDAP,** the successor of WHOIS: registrar, creation date, expiry date, last change, status codes, name servers, DNSSEC and the domain age in days. A domain the registry does not know is marked `registered: false`, so you can also use it as an availability check.
- **Two resolvers to choose from:** DNS over HTTPS through Cloudflare (default) or Google Public DNS. No API key needed.
- **Fast:** 10 domains in parallel by default, a few seconds for a list of 15 domains.
- Polite to registries: at most 2 parallel RDAP requests per registry, a short pause between requests, and it waits as long as the registry asks after a rate limit (HTTP 429 with Retry-After).

### Use cases

- **Sales and lead research:** see which companies use which mail provider, which domains are old and established, which have no mail setup at all.
- **Email deliverability:** check SPF and DMARC across all your sending domains or your customers' domains, find `p=none` policies and missing records.
- **Domain portfolio management:** get the expiry date, registrar and status of all your domains in one table, catch domains that expire soon.
- **IT and security audits:** list name servers, CAA records and DNSSEC status, find domains that point to old servers.
- **Availability checks:** find out which names in a list are not registered yet.
- **Data cleaning:** turn a column of email addresses or URLs into a clean list of company domains with live DNS data.

### Input

| Field | Description | Default |
|---|---|---|
| Domains | Domains (`apify.com`), URLs (`https://www.example.com/page`) or email addresses (`info@example.org`) | |
| Record types | Any of A, AAAA, MX, NS, TXT, CNAME, SOA, CAA | all 8 |
| Email security | SPF, DMARC and mail provider guess | on |
| Registration data (RDAP) | Registrar, dates, status, name servers, DNSSEC | on |
| DNS resolver | `cloudflare` or `google` | `cloudflare` |
| Parallel domains | Domains looked up at the same time, 1 to 50 | 10 |
| Timeout | Seconds without data before a single request is given up, 3 to 60 | 15 |

Example:

```json
{
  "domains": ["apify.com", "https://www.example.com/", "info@wikipedia.org"],
  "recordTypes": ["A", "MX", "NS", "TXT"],
  "includeEmailSecurity": true,
  "includeRdap": true
}
```

### Output

One dataset item per domain:

```json
{
  "domain": "apify.com",
  "input": "apify.com",
  "registered": true,
  "hasMx": true,
  "spf": "v=spf1 a mx include:_spf.google.com include:mailgun.org include:amazonses.com -all",
  "dmarcPolicy": "reject",
  "mailProvider": "Google Workspace",
  "registrar": "Amazon Registrar, Inc.",
  "createdAt": "2009-06-02T17:14:10.000Z",
  "expiresAt": "2035-06-02T17:14:10.000Z",
  "dnsStatus": "NOERROR",
  "records": {
    "A": ["18.66.26.106", "18.66.26.11"],
    "MX": [{ "priority": 1, "host": "aspmx.l.google.com" }, { "priority": 5, "host": "alt1.aspmx.l.google.com" }],
    "NS": ["ns-1225.awsdns-25.org", "ns-449.awsdns-56.com"],
    "TXT": ["v=spf1 a mx include:_spf.google.com include:mailgun.org include:amazonses.com -all"],
    "CNAME": [],
    "SOA": { "mname": "ns-839.awsdns-40.net", "serial": 1, "refresh": 7200, "retry": 900, "expire": 1209600, "minimum": 86400 },
    "CAA": [{ "flags": 0, "tag": "issue", "value": "letsencrypt.org" }]
  },
  "emailSecurity": {
    "spf": { "record": "v=spf1 a mx include:_spf.google.com include:mailgun.org include:amazonses.com -all", "all": "-all", "includes": ["_spf.google.com", "mailgun.org", "amazonses.com"], "redirect": null, "multipleRecords": false },
    "dmarc": { "policy": "reject", "subdomainPolicy": "reject", "pct": 100, "hasRua": true, "alignmentDkim": "relaxed", "alignmentSpf": "relaxed", "multipleRecords": false },
    "mailProvider": "Google Workspace",
    "nullMx": false
  },
  "rdap": {
    "registrar": "Amazon Registrar, Inc.",
    "createdAt": "2009-06-02T17:14:10.000Z",
    "expiresAt": "2035-06-02T17:14:10.000Z",
    "updatedAt": "2026-05-16T16:53:04.000Z",
    "status": ["client transfer prohibited"],
    "nameservers": ["ns-1225.awsdns-25.org", "ns-449.awsdns-56.com"],
    "dnssecSigned": true,
    "domainAgeDays": 6373
  },
  "rdapNote": null,
  "dnsErrors": null,
  "error": null,
  "checkedAt": "2026-11-14T15:52:55.145Z"
}
```

- The flat fields at the top (`registered`, `hasMx`, `spf`, `dmarcPolicy`, `mailProvider`, `registrar`, `createdAt`, `expiresAt`) fill the table view and CSV export. The full data is in `records`, `emailSecurity` and `rdap`.
- `records` holds only the selected types. An empty list means the type has no records. `null` means the query failed, the reason is in `dnsErrors`.
- `registered` is `true` when the registry has the domain or DNS answers for it, `false` when the registry returns 404, and `null` when neither tells.
- `rdap` is `null` when the registry of the TLD has no RDAP service, when RDAP is turned off or when the lookup failed. `rdapNote` says which.
- `dnsStatus` is the DNS response code, for example `NOERROR` or `NXDOMAIN`.
- Invalid inputs and domains without any DNS answer or RDAP data return an item with `error` set, for example `Domain not found in DNS (NXDOMAIN) and no RDAP data. It is probably not registered.`

Export as JSON, CSV or Excel, or read it through the Apify API.

### Pricing

Pay per domain: 0.001 USD per looked up domain, so 1.00 USD per 1,000 domains. A domain counts when it has at least one DNS answer or an RDAP result. Invalid inputs, duplicates and domains that fail fully are free. You can cap the cost of a run with the maximum charge setting in Apify.

Each run also has a start fee of 0.00005 USD per GB of memory, which Apify shows as Actor Start.

### Limits

- Records are read for the registrable domain only, not for subdomains like `www` or `mail`.
- RDAP data is only available where the registry offers RDAP and lists it in the IANA bootstrap file. Many country code TLDs like `.de`, `.ch`, `.at`, `.eu` and `.io` do not. For these the Actor returns DNS data and a note instead of registration data.
- Registry RDAP servers often show less than the registrar's own server. The Actor asks the registry only.
- The mail provider guess looks at the MX hosts. A domain behind a mail filter service returns `null`, because its MX hosts belong to the filter.
- SPF includes are listed, not followed, so the number of nested DNS lookups is not checked.
- DNS answers come from the chosen public resolver and can be cached for up to the record's TTL.

### Data source, permitted use and legal

- **Data source:** public DNS data from the chosen DNS over HTTPS resolver and RDAP registration data from the domain registries, found through the IANA bootstrap file. The Actor does not open or scrape the websites of the domains.
- **No contact data:** Contact data of registrants is never returned. From the RDAP answer the Actor keeps only the registrar's name. Registrant, admin, tech and abuse contacts, names, email addresses and phone numbers are dropped. DMARC report addresses and the mailbox field of the SOA record are not returned. Contact values in CAA records (iodef email addresses, contactemail, contactphone) are replaced with `null`.
- **Snapshot:** Results show the data at the time of the run. We do not guarantee that they are complete, current or correct.
- **For business use:** This Actor is offered to businesses only, not to consumers.
- **Permitted use:** Look up only domains you have a legitimate reason to check, for example your own domains, your customers' domains or domains in a lead list you are allowed to process. Respect the terms of use of the registries and resolvers.
- **Your responsibility:** You choose the domains and decide what happens with the results. If your input or the results contain personal data, you are the controller and need your own legal basis.
- **No circumvention:** The Actor uses public, unauthenticated endpoints only. It does not bypass rate limits or access restrictions.
- **Request volume:** At most 2 parallel requests per RDAP registry with a short pause between requests, and it waits when a registry asks for it. Do not use it to put excessive load on a registry.
- **Provider:** forgeloop, Markus Heiss, Austria. [Imprint](https://devhem.github.io/forgeloop-legal/imprint.html), [Privacy Notice](https://devhem.github.io/forgeloop-legal/privacy.html), [Terms of Use](https://devhem.github.io/forgeloop-legal/terms.html).

### Questions and issues

Open an issue on the Actor page.

# Actor input Schema

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

Domains, URLs or email addresses. Each value is reduced to its registrable domain in lowercase: https://www.apify.com/store becomes apify.com, info@example.org becomes example.org. Internationalized domains are converted to punycode. Duplicates are removed. Format: a list of strings like \["apify.com", "https://example.com/page", "info@example.org"].

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

DNS record types to look up for every domain. Records are read for the domain itself, not for subdomains like www.

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

Read the SPF record, the DMARC record at \_dmarc.<domain> (policy, subdomain policy, whether reports are requested) and guess the mail provider from the MX hosts. Report addresses are not returned.

## `includeRdap` (type: `boolean`):

Ask the registry over RDAP for registrar, creation, expiry and last change date, status, name servers and DNSSEC. A domain the registry does not know is marked as not registered. Some TLDs like .de, .ch and .io offer no RDAP service and return a note instead. Contact data of registrants is never returned.

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

Public DNS over HTTPS resolver that answers the queries. No key needed for either.

## `maxConcurrency` (type: `integer`):

How many domains are looked up at the same time. RDAP requests are limited to 2 parallel requests per registry anyway.

## `timeoutSecs` (type: `integer`):

Give up on a single DNS or RDAP request after this many seconds without data. Failed requests are retried.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "example.com",
    "wikipedia.org"
  ],
  "recordTypes": [
    "A",
    "AAAA",
    "MX",
    "NS",
    "TXT",
    "CNAME",
    "SOA",
    "CAA"
  ],
  "includeEmailSecurity": true,
  "includeRdap": true,
  "resolver": "cloudflare",
  "maxConcurrency": 10,
  "timeoutSecs": 15
}
```

# Actor output Schema

## `results` (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": [
        "apify.com",
        "example.com",
        "wikipedia.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("forgeloop/dns-domain-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",
        "example.com",
        "wikipedia.org",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("forgeloop/dns-domain-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",
    "example.com",
    "wikipedia.org"
  ]
}' |
apify call forgeloop/dns-domain-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,forgeloop/dns-domain-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/X4DqteUT1DG4mDHj7/builds/mYBVA4iYi4ap8CLh9/openapi.json
