# Bulk Domain Lookup — WHOIS (RDAP), DNS, Expiry & Availability (`spider355/domain-whois-dns-lookup`) Actor

Look up many domains at once: registrar, creation and expiry dates, days until expiry, status, name servers, DNSSEC, whether the domain is registered, plus A, AAAA, MX, NS, TXT, CNAME and SOA records. Uses RDAP, the official WHOIS successor.

- **URL**: https://apify.com/spider355/domain-whois-dns-lookup.md
- **Developed by:** [Mitchell](https://apify.com/spider355) (community)
- **Security:** 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 results

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 Domain Lookup — WHOIS (RDAP), DNS, Expiry & Availability

Look up a list of domains in one run and get one clean row per domain: whether it is registered, the registrar, creation and expiry dates, days until expiry, domain statuses, name servers and DNSSEC, plus live DNS records (A, AAAA, MX, NS, TXT, CNAME, SOA). Registration data comes from **RDAP**, the official successor to WHOIS, using the IANA list of registry servers. DNS records are read straight from DNS. Export as JSON, CSV or Excel, or call it as an API.

No proxies, login or API keys are needed.

### What you can do with it

- **Watch a domain portfolio.** Schedule a weekly run and flag domains with few `daysUntilExpiry`, or changed name servers and statuses.
- **Check a list of names for availability** before you spend time on them, then confirm the shortlist with a registrar.
- **Enrich company lists.** Add registrar, domain age and `hasMailServer` to a sales or SEO list, and see which domains use Google, Microsoft or another mail provider from the MX records.
- **Security and brand checks.** Review name servers, SPF/TXT records and DNSSEC across the domains you are responsible for, or look at look-alike domains.

### Input

```json
{
    "domains": ["google.com", "https://www.wikipedia.org/wiki/Domain", "bbc.co.uk", "example.io"],
    "includeWhois": true,
    "includeDns": true,
    "dnsRecordTypes": ["A", "MX", "NS", "TXT"]
}
```

- `domains` — bare domains or full URLs. The scheme, path, port and `www.` are removed and the name is lowercased. Subdomains are reduced to the registrable domain, so `blog.example.co.uk` becomes `example.co.uk`. Duplicates are looked up once.
- `includeWhois` — registration data via RDAP (default on)
- `includeDns` — DNS records (default on)
- `dnsRecordTypes` — which record types to look up (default all seven)

#### Input validation

The run stops before any lookup if the input is invalid, and the error names the field:

- `domains` is required: a list of strings, up to 1,000 entries, each at most 2,048 characters. An entry that is not a domain (a stray line in a pasted list) is skipped and listed under `invalid` in `SUMMARY`. If none of the entries is a domain, the run fails up front.
- `includeWhois` and `includeDns` must be `true` or `false`, and at least one of them must be on.
- `dnsRecordTypes` must be a list drawn from A, AAAA, MX, NS, TXT, CNAME and SOA (any case). An unknown type fails the run; it is no longer dropped silently. An empty list means all seven.

#### Redaction in TXT records

TXT records are free text, and some carry an owner's email or phone number (for example a DMARC `rua=mailto:` address). Each TXT value is passed through the shared redaction module (`src/redact.js`), which replaces emails and phone numbers with `[redacted]`. The trade-offs:

- Role addresses such as DMARC report mailboxes are redacted too, because the module can't tell a role address from a personal one.
- Verification tokens and UUIDs (anything written as `key=value`, and standard UUIDs) are shielded from the phone-number rule. Without this, a live `docusign=` UUID was partly redacted.
- `soa.hostmaster` is not changed. It is the zone's technical contact written in DNS form (for example `hostmaster.bbc.co.uk`). For a small personal domain it can identify the owner.

### Output

One item per domain. Every item has the same fields; ones that do not apply are `null` or an empty list.

```json
{
    "domain": "wikipedia.org",
    "tld": "org",
    "registered": true,
    "available": false,
    "registrarName": "MarkMonitor Inc.",
    "registrarIanaId": "292",
    "createdDate": "2001-01-13T00:12:14.754Z",
    "updatedDate": "2026-08-12T08:47:19.410Z",
    "expiryDate": "2027-01-13T00:12:14.000Z",
    "daysUntilExpiry": 99,
    "statuses": ["client delete prohibited", "client transfer prohibited", "client update prohibited"],
    "nameServers": ["ns0.wikimedia.org", "ns1.wikimedia.org", "ns2.wikimedia.org"],
    "dnssecSigned": false,
    "rdapServer": "https://rdap.publicinterestregistry.org/rdap/",
    "rdapStatus": "ok",
    "a": ["198.35.26.224"],
    "aaaa": ["2620:0:863:ed1a::1"],
    "mx": [{ "exchange": "mx-in1001.wikimedia.org", "priority": 10 }, { "exchange": "mx-in2001.wikimedia.org", "priority": 10 }],
    "ns": ["ns0.wikimedia.org", "ns2.wikimedia.org", "ns1.wikimedia.org"],
    "txt": ["v=spf1 include:_cidrs.wikimedia.org ~all", "google-site-verification=AMHkgs-4ViEvIJf5znZle-BSE2EPNFqM1nDJGRyn2qk"],
    "cname": null,
    "soa": { "nsname": "ns0.wikimedia.org", "hostmaster": "hostmaster.wikimedia.org", "serial": 2026060420, "refresh": 43200, "retry": 7200, "expire": 1209600, "minttl": 3600 },
    "hasMailServer": true,
    "error": null
}
```

`rdapStatus` is `ok`, `not_registered`, `unsupported` (the TLD has no RDAP server), `failed` or `skipped`. A `SUMMARY` record in the key-value store gives the number of domains and how many were registered, available, unsupported and failed.

### Pricing

You pay per result returned.

### Limits worth knowing

- **Availability is an inference.** `available: true` means the registry's RDAP server answered "not found" for that name. Reserved, premium, blocked or recently dropped names can still be unavailable to register. Confirm with a registrar before you buy.
- **Some TLDs have no RDAP.** Several country-code TLDs (checked in this build: `.io`, `.de` and `.nz`) are not in the IANA list. For these, `registered` and `available` are `null` and `rdapStatus` is `unsupported`; DNS records are still returned. Nothing is guessed from DNS.
- **Contact details are deliberately not included.** Registrant, admin and technical contact names, emails, phone numbers and addresses are never output, even where a registry returns them. Registrar name and IANA ID are included. Many registries redact this data anyway.
- **Subdomain handling is simple.** The registrable domain is found with a built-in list of common two-part suffixes such as `co.uk`, `com.au` and `co.nz`, not the full Public Suffix List. Rare suffixes outside that list may be cut one label too short.
- **Registry detail varies.** Some registries leave out dates, the registrar IANA ID or DNSSEC data. Those fields are then `null`. The registry's own name servers (`nameServers`) can differ from the live NS records (`ns`).
- **DNS is a live snapshot** from the resolver on the machine that runs the Actor. A missing record is returned as an empty list. If a resolver fails or times out, the reason is in `error`.
- RDAP servers rate-limit. The Actor works on about ten domains at a time, sends one request at a time to any one RDAP server, and retries with a pause when a server asks it to slow down. Very large lists of domains under the same TLD therefore take longer.

### Questions and requests

Open an issue on the Issues tab and it will be looked at quickly.

# Actor input Schema

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

Domains or URLs to look up, one per line. Full URLs are reduced to the domain; www. is removed; subdomains are reduced to the registrable domain (blog.example.co.uk becomes example.co.uk). Duplicates are looked up once. Up to 1,000 per run. Entries that are not domains are skipped and listed in SUMMARY; if none is a domain the run fails.

## `includeWhois` (type: `boolean`):

Look up registrar, dates, status, name servers, DNSSEC and whether the domain is registered.

## `includeDns` (type: `boolean`):

Look up live DNS records for each domain.

## `dnsRecordTypes` (type: `array`):

Which DNS record types to look up. Used only when DNS records are switched on. An unknown type fails the run.

## Actor input object example

```json
{
  "domains": [
    "google.com",
    "wikipedia.org",
    "bbc.co.uk",
    "example.io"
  ],
  "includeWhois": true,
  "includeDns": true,
  "dnsRecordTypes": [
    "A",
    "AAAA",
    "MX",
    "NS",
    "TXT",
    "CNAME",
    "SOA"
  ]
}
```

# Actor output Schema

## `domains` (type: `string`):

One item per domain with registration data and DNS records.

## `summary` (type: `string`):

Counts of registered, available, unsupported and failed domains.

# 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": [
        "google.com",
        "wikipedia.org",
        "bbc.co.uk",
        "example.io"
    ],
    "dnsRecordTypes": [
        "A",
        "AAAA",
        "MX",
        "NS",
        "TXT",
        "CNAME",
        "SOA"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("spider355/domain-whois-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": [
        "google.com",
        "wikipedia.org",
        "bbc.co.uk",
        "example.io",
    ],
    "dnsRecordTypes": [
        "A",
        "AAAA",
        "MX",
        "NS",
        "TXT",
        "CNAME",
        "SOA",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("spider355/domain-whois-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": [
    "google.com",
    "wikipedia.org",
    "bbc.co.uk",
    "example.io"
  ],
  "dnsRecordTypes": [
    "A",
    "AAAA",
    "MX",
    "NS",
    "TXT",
    "CNAME",
    "SOA"
  ]
}' |
apify call spider355/domain-whois-dns-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,spider355/domain-whois-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/juji35sG6VLPJOo2g/builds/0qwHeBFwHwpvyek2v/openapi.json
