# Bulk WHOIS & Domain Lookup: Age, Expiry, DNS, SPF & DMARC (`spellzcode/domain-whois-dns-lookup`) Actor

Look up a list of domains in one run: registrar, registration and expiry dates, domain age, nameservers, IP addresses, mail servers and provider, and SPF and DMARC email authentication.

- **URL**: https://apify.com/spellzcode/domain-whois-dns-lookup.md
- **Developed by:** [Mårten Fitzback](https://apify.com/spellzcode) (community)
- **Categories:** Developer tools, Lead generation, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 1,000 domain 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 WHOIS & Domain Lookup: Age, Expiry, DNS, SPF & DMARC

Paste a list of domains and get the registration, DNS and email setup of each one in a single table.

### What you get for each domain

| Field | What it is |
|---|---|
| `status` | `ok`, `not-registered`, `lookup-failed` or `invalid-input` |
| `registrar`, `createdAt`, `expiresAt`, `updatedAt` | Who the domain is registered with, and when it was registered, last changed and expires |
| `ageDays`, `daysUntilExpiry` | Domain age and time left, ready for sorting and filtering |
| `registryStatuses` | Registry status codes such as `client transfer prohibited` |
| `nameservers`, `dnsProvider` | Nameservers and who runs them (Cloudflare, Route 53, GoDaddy and others) |
| `ipv4`, `ipv6`, `resolves` | Where the domain points |
| `mailServers`, `mailProvider`, `acceptsMail` | Mail servers in priority order and the provider behind them (Google Workspace, Microsoft 365 and others) |
| `spf`, `spfPolicy`, `dmarc`, `dmarcPolicy` | The published SPF and DMARC records and their policies |
| `emailAuthentication` | A one-word summary: `spf+dmarc-enforced`, `spf+dmarc-monitoring-only`, `spf-only`, `dmarc-only` or `none` |
| `txtRecords` | All TXT records |

### Typical uses

- **Lead research:** see which email and DNS providers a list of companies uses.
- **Deliverability and security checks:** find domains with no SPF or DMARC, or with DMARC in monitoring-only mode.
- **Domain portfolios:** track expiry dates across many domains.
- **Fraud and risk checks:** flag domains registered only days ago.

### Input

```json
{
  "domains": ["apify.com", "https://www.wikipedia.org/", "someone@example.org"]
}
```

Full addresses and email addresses are accepted; the domain is taken from them.

### Pricing

$2.00 per 1,000 domains ($0.002 each). One charge per domain looked up. Entries that are not domain names are free.

500 domains cost $1. 25,000 domains cost $50.

Each run also has a start charge of $0.00005. There is no separate charge for computing time. Apify's paid plans get 10% to 30% off these prices; the Pricing tab shows yours. Apify's free plan includes $5 of credit a month, which covers 2,500 domains.

### Limits

- Registration data comes straight from each registry over RDAP, the official successor to WHOIS. Some country registries do not publish it; for those domains the registration fields are empty and `registrationSource` says `unavailable`. DNS and email fields are still filled in.
- For a name like `www.shop.example.com`, registration, nameserver and email facts describe the registered domain behind it, shown in `registeredDomain`.
- Contact details of the domain owner are not included. Registries hide them for most domains.

### Questions

#### Can I run it on a schedule?

Yes. Save your input as a task and add an Apify schedule, for example every morning.

#### How do I get the results into Excel or Google Sheets?

Every run's results can be downloaded as Excel, CSV or JSON from the run's Output tab. Apify's integrations with Make, Zapier, n8n and Google Sheets can pass them on automatically.

#### Can I call it from my own code or from an AI agent?

Yes. The API tab has ready-made code for Python, JavaScript and cURL, and the tool can be connected to AI agents through Apify's MCP server.

#### Something looks wrong or is missing

Open a report under the Issues tab and include the input you used.

# Actor input Schema

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

Domains to look up, one per line. Full addresses such as https://www.example.com/page and email addresses are accepted; the domain is taken from them.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "wikipedia.org"
  ]
}
```

# Actor output Schema

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

One item per domain: registration facts, DNS records, mail setup and email authentication.

# 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",
        "wikipedia.org"
    ]
};

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,spellzcode/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/7AaZo9V4kR1e5pfE8/builds/6Qwbsg5vfYubluBAy/openapi.json
