# Domain API (Whois & DNS) (`clovys/domain-api`) Actor

Bulk WHOIS & RDAP lookup: registrar, dates, status, nameservers, contacts, DNSSEC and raw records. Accepts domains or URLs. Pay only for successful results.

- **URL**: https://apify.com/clovys/domain-api.md
- **Developed by:** [Clovys](https://apify.com/clovys) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $2.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

### What does Domain API do?

**Domain API** looks up **WHOIS / RDAP registration data** and **live DNS records** for any domain or URL - registrar, creation / update / expiry dates, status, nameservers, contacts (when not privacy-redacted), plus A / AAAA / MX / TXT / NS / CNAME / SOA / CAA, SPF and DMARC.

Paste a list of domains (or full URLs), run the Actor, and download clean JSON / CSV / Excel. Built for **bulk runs** (up to **100,000** domains) on lightweight compute (**256 MB** default). Large lists are **auto-split** into ~3,000-domain child runs on Apify, with **auto-heal** under registry rate limits.

This Actor is **not affiliated with any registrar**. WHOIS/RDAP disclosure varies by TLD and privacy laws - redacted contacts still count as a successful structured result.

### Key features

- **Bulk domain lookup** - up to 100,000 domains per run (invalid / duplicate inputs filtered before work starts)
- **Auto-sharding** - runs above ~3,000 domains split into child runs; one parent dataset
- **Auto-heal** - on rate limits / timeouts: backoff and lower concurrency
- **RDAP + classic WHOIS** - merged registration fields (follow depth 1 or 2)
- **Lifecycle metrics** - created / updated / expires, age days, days until expiry
- **Contacts** - registrant / admin / tech / billing when published
- **Live DNS** - A, AAAA, MX, TXT, NS, CNAME, SOA, CAA + SPF / DMARC
- **URL-aware input** - paste `https://www.example.com/path` -> registrable hostname
- **Success-only billing** - failed domains stay in the dataset with `error`, but are **not** charged
- **No expensive proxies** - public registries + DNS; datacenter / no proxy is enough
- **Export anywhere** - JSON, CSV, Excel, HTML from the Apify dataset

### Why Clovys

Clovys is a nonprofit organization driven by a single mission: to make the internet safer, faster, more reliable, and universally accessible.

We believe that data should not be locked behind exorbitant paywalls or complex technical barriers. By building lightweight, highly optimized Apify Actors, we help developers, researchers, and organizations access the information they need to innovate without friction.

As a nonprofit initiative, **we do not optimize for margins**. Our pricing is kept as low as possible and is strictly calculated to cover the raw infrastructure costs of data extraction - such as Apify compute units and proxy bandwidth.

For Domain API specifically, Clovys ships a **complete domain profile in one call**: registration + live DNS, without browsers or residential proxies.

### Use cases

- **Lead / media enrichment** - domain age, registrar, expiry risk on large lists
- **Email auth checks** - MX, SPF, DMARC in the same run as WHOIS
- **Security & OSINT** - nameservers, DNSSEC, status codes, abuse contacts
- **Portfolio monitoring** - track expiry windows across many domains
- **Due diligence** - pair with traffic tools (e.g. SimilarWeb API) for a fuller footprint

### How to use

1. Open **Domain API** in Apify Console
2. Paste domains or URLs in **Domains or URLs**
3. Keep defaults (**256 MB**, DNS on, WHOIS follow `2`)
4. Click **Start**
5. Download results from the **Dataset** tab

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `domains` | `string[]` | - | Domains or URLs (required, up to 100,000) |
| `maxConcurrency` | `integer` | `8` | Parallel lookups (1-30) |
| `maxRetries` | `integer` | `2` | Retries on transient errors |
| `includeRaw` | `boolean` | `true` | Attach `rawRdap` + `rawWhois` |
| `includeDns` | `boolean` | `true` | Live DNS (A, MX, TXT, SPF, DMARC...) |
| `whoisFollow` | `integer` | `2` | `1` registry only, `2` registry + registrar |
| `timeoutMs` | `integer` | `10000` | Per-source timeout |

### Output example

You can download the dataset in JSON, HTML, CSV, or Excel.

```json
{
 "domain": "apify.com",
 "registrar": "Example Registrar, Inc.",
 "createdDate": "2015-03-01T00:00:00.000Z",
 "expiresDate": "2027-03-01T00:00:00.000Z",
 "ageDays": 3900,
 "daysUntilExpiry": 400,
 "status": ["clientTransferProhibited"],
 "nameservers": ["ns1.example.com", "ns2.example.com"],
 "dns": {
 "a": ["93.184.216.34"],
 "mx": [{ "exchange": "mail.example.com", "priority": 10 }],
 "spf": "v=spf1 include:_spf.example.com ~all",
 "dmarc": "v=DMARC1; p=none;",
 "error": null
 },
 "registrant": { "organization": "REDACTED FOR PRIVACY", "redacted": true },
 "sources": { "rdap": true, "whois": true },
 "error": null
}
```

Failed domains still appear with `error` set - **they are not billed**.

### Data fields

| Field | Description |
|---|---|
| `domain` | Normalized hostname |
| `registrar` / `registrarIanaId` | Sponsoring registrar |
| `createdDate` / `updatedDate` / `expiresDate` | Lifecycle dates |
| `ageDays` / `daysUntilExpiry` | Derived metrics |
| `status` | EPP / RDAP status codes |
| `nameservers` / `dnssec` | Delegation info |
| `dns` | Live DNS + SPF / DMARC |
| `registrant` / `admin` / `tech` / `billing` | Contacts when available |
| `emails` / `phones` | Aggregated contacts |
| `whoisFields` | Flattened classic WHOIS keys |
| `rawRdap` / `rawWhois` | Full raw payloads (if enabled) |
| `error` | Error message if the domain failed |

### Pricing

Pay-per-event pricing (platform usage is billed separately by Apify):

| Event | When charged | Price |
|---|---|---|
| **result** | Each successful domain written to the dataset | **$0.002** (**$2 / 1,000**) |
| **Actor Start** | Once when the run starts (scaled by memory GB) | **$0.001** |

Example: **1,000 successful domains** ~ **$2.00** in PPE `result` (+ Actor Start + Apify platform usage).

Only successful results are charged as `result`. Failed domains are free on the PPE event.

### Recommended settings

| Goal | Settings |
|---|---|
| Production / Store | **256 MB**, concurrency **8**, `whoisFollow: 2`, DNS on |
| Faster / leaner items | `whoisFollow: 1`, `includeRaw: false` |
| WHOIS only | `includeDns: false` |
| Huge lists | up to **100,000** domains - auto-shard handles the rest |

### FAQ

**How many domains per run?** Up to **100,000**. Lists above ~3,000 are auto-split into child runs; invalid / duplicate inputs are dropped **before** sharding. Parallelism is controlled by `maxConcurrency` (respect registry rate limits).

**What if a domain fails?** It is stored with `error`. Other domains continue. Failed items are **not** billed as `result`.

**Do I need expensive proxies?** No. Domain API talks to public RDAP / WHOIS / DNS resolvers. No residential proxies required.

**Why are contacts often empty?** Many registries redact personal data (GDPR / privacy services). The structured row is still a successful paid result.

**What does auto-heal do?** On rate-limit waves it slows down and lowers concurrency so the run keeps progressing without hammering registries.

### Support

Questions, bugs, or feature requests: use the Actor **Issues** tab on Apify, or contact Clovys through the Store profile.

# Actor input Schema

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

Domains or full URLs to look up (e.g. apify.com, https://www.lemonde.fr/path). Up to 100 000 per run (auto-split into ~3k chunks on Apify). Subdomains are reduced to the registrable hostname.

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

Parallel lookups. Keep moderate to respect registry rate limits. Auto-heal may temporarily lower this under blocks.

## `maxRetries` (type: `integer`):

Retries per domain on transient failures.

## `includeRaw` (type: `boolean`):

Attach raw RDAP JSON and raw WHOIS text (full detail, larger dataset items).

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

Resolve live DNS (A, AAAA, MX, TXT, NS, CNAME, SOA, CAA, SPF, DMARC).

## `whoisFollow` (type: `integer`):

1 = registry only (faster). 2 = registry + registrar (more contact/dates detail).

## `timeoutMs` (type: `integer`):

Timeout for each RDAP / WHOIS query.

## `_shard` (type: `boolean`):

Internal self-shard marker. Do not set manually.

## `_parentDatasetId` (type: `string`):

Internal parent dataset id for self-shard children. Do not set manually.

## Actor input object example

```json
{
  "domains": [
    "apify.com"
  ],
  "maxConcurrency": 8,
  "maxRetries": 2,
  "includeRaw": true,
  "includeDns": true,
  "whoisFollow": 2,
  "timeoutMs": 10000,
  "_shard": false
}
```

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("clovys/domain-api").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"] }

# Run the Actor and wait for it to finish
run = client.actor("clovys/domain-api").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"
  ]
}' |
apify call clovys/domain-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,clovys/domain-api"
        }
    }
}
```

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/4jRPMhJ93YDgRUWk6/builds/17piTzmTIJaQet2im/openapi.json
