# Domain WHOIS & DNS Lookup via RDAP (`miacx/domain-whois-dns-lookup`) Actor

Look up domain registration, DNS records, email providers and homepage signals in batches. Registration comes from RDAP; DNS uses Cloudflare.

- **URL**: https://apify.com/miacx/domain-whois-dns-lookup.md
- **Developed by:** [mia.cx](https://apify.com/miacx) (community)
- **Categories:** Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 33.3% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.45 / 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

## Domain WHOIS & DNS Lookup via RDAP

Check registration and DNS before deciding whether to contact or inspect a domain.
Get RDAP registration data, Cloudflare DNS records, email-provider hints and homepage evidence in one row.
Registration uses RDAP, not the WHOIS protocol. Homepage redirects are reported without fetching the target.
Each qualifying domain costs $0.00045, plus $0.00005 per run start at default memory.

### Try it

```json
{"domains":["example.com"]}
```

An empty input `{}` runs the same example. An empty `domains` list fails the run.
No upstream API key is needed.

### Use from an agent

Add `https://mcp.apify.com?tools=miacx/domain-whois-dns-lookup` to your MCP client and sign in to Apify.
Call the dedicated Actor tool with the input above, then read its completed dataset with `get-dataset-items`.
Or set `APIFY_TOKEN` to your Apify API token and request JSON rows:

```sh
curl --fail-with-body 'https://api.apify.com/v2/actors/miacx~domain-whois-dns-lookup/run-sync-get-dataset-items' \
  -H "Authorization: Bearer $APIFY_TOKEN" -H 'Content-Type: application/json' \
  -d '{"domains":["example.com"]}'
```

### What you get

Read `status` first, then inspect `errors` and the source fields. A partial result can still be usable and billable.
Rows arrive in completion order, one per unique normalized hostname. Match them using `input` or `domain`.
`status: "ok"` means no source errors were recorded; unsupported RDAP or a skipped homepage can still occur.

Selected fields below come from recorded example.com fixtures, processed with the fixed test clock.
The robots.txt 404 response is supplied by the test setup.

```json
{
  "input": "example.com",
  "domain": "example.com",
  "status": "ok",
  "ok": true,
  "errors": [],
  "rdapStatus": "registered",
  "registrar": "RESERVED-Internet Assigned Numbers Authority",
  "createdAt": "1995-08-14T04:00:00Z",
  "expiresAt": "2027-08-13T04:00:00Z",
  "rdapFetchedAt": "2026-10-31T02:10:00.000Z",
  "mx": [{"priority":0,"exchange":""}],
  "emailProvider": "none",
  "spf": true,
  "dmarc": true,
  "dmarcPolicy": "reject",
  "homepageStatus": "fetched",
  "httpStatus": 200,
  "redirectTarget": null,
  "tech": [{"name":"Cloudflare","evidence":"server: cloudflare"}],
  "parked": false,
  "forSale": false,
  "parkingEvidence": []
}
```

Registration fields include the registrable domain, creation/expiry/change dates, registrar, IANA ID and domain status strings.
`rdapStatus` is `registered`, `not_registered` for a registry 404, `unsupported` when no service is available, or null on failure.
RDAP dates come from registry events; they are not fetch times. Registrant contacts are excluded.

DNS includes `a`, `aaaa`, `mx`, `ns`, `txt` and `nxdomain`.
Record arrays retain resolver order. MX entries contain numeric `priority` and `exchange`; an empty exchange represents null MX.
Null fields mean unknown or unavailable; empty record arrays mean the query returned no matching records.
`emailProvider` is inferred from the preferred MX, with `none` for no usable MX and `other` for unrecognized hosts.
SPF and DMARC fields report observed records, not a complete email-security assessment.

`tech` contains deduplicated name/evidence pairs from headers and HTML signatures.
`parked` and `forSale` are true when a matching signal exists, false after complete 2xx HTML analysis finds none, or null.
`parkingEvidence` lists observed signals; an empty list does not prove the domain is available to buy.

`rdapFetchedAt` and `homepageFetchedAt` mark response receipt; `dnsFetchedAt` marks the start of the query set.
Cache hits preserve those timestamps. `rdapCached` and `dnsCached` identify cache reuse.

### Input

| Field | Default | Accepted input |
| --- | --- | --- |
| `domains` | `["example.com"]` | 1–10,000 domains, hostnames, URLs or email addresses. Null also uses the default at runtime. |
| `maxConcurrency` | `8` | Integer from 1 to 20. Upstream requests are capped at twice this number. |

Inputs are trimmed, lowercased and IDNA-converted. URLs and emails contribute only their hostnames.
Subdomains remain distinct results; RDAP uses their ICANN registrable domain.
Private suffixes do not change the registry lookup; foo.github.io uses github.io for RDAP.
Invalid entries return error rows rather than failing the batch.

### Pricing

A Domain event (`domain-result`) costs $0.00045 per unique normalized hostname with a qualifying source answer.
It counts an RDAP registered/not-registered answer, a DNS hostname or DMARC answer, or a homepage HTTP response.
Partial results, negative answers and cached answers count. Homepage responses can qualify even with non-2xx HTTP status.
Invalid inputs and total source failures incur no Domain events. Duplicate hostnames incur no additional events within one run.

1,000 qualifying domains cost $0.45005, including the $0.00005 run start at default 256 MB memory.
The start charge applies even with no billable domains. Apify counts one start event per GB, with a minimum of one.
Processing stops at the charge limit; remaining domains may have no rows.

### Limits and data freshness

- Each input allows 1,024 characters; hostnames allow 253. IP addresses and bare public suffixes are rejected.
- Homepage checks request HTTPS on port 443 and respect robots.txt. Private and reserved addresses are blocked.
- Homepage HTML is capped at 256 KiB, robots.txt and RDAP at 512 KiB, and each DNS response at 64 KiB.
- No browser rendering or runtime LLM calls run. Redirect targets need a separate input to inspect their homepage.
- RDAP redirects and registrar follow-up services are not queried. DMARC checks only \_dmarc on the supplied hostname.

The Actor caches RDAP answers and the IANA bootstrap in memory for the duration of a run.
Registered answers and bootstrap data can be reused for 24 hours; not-registered answers for one hour.
Stored entries remain until overwritten or deleted; expiry controls reuse.
DNS uses the shortest observed TTL, capped at one hour, and only caches complete successful query sets.
Homepage results and robots decisions can be reused for five minutes. DNS and homepage caches last only within the run.

The synchronous API waits up to 300 seconds. Use [asynchronous runs](https://docs.apify.com/api/v2/actor-runs-post) for longer batches.

### If a row fails

Each `errors` entry has `source`, `code` and `message`, ordered by input, RDAP, DNS, then homepage.
Correct `INVALID_DOMAIN`; avoid private hosts for `HOST_NOT_PUBLIC`.
Retry `RATE_LIMITED`, `TIMEOUT`, `NETWORK_ERROR`, `DNS_QUERY_FAILED` or `ROBOTS_UNAVAILABLE` after checking the source message.
Inspect `UPSTREAM_ERROR`, `INVALID_RESPONSE`, `RESPONSE_TOO_LARGE` and `INTERNAL_ERROR` before retrying.
Reduce work if `BUDGET_EXHAUSTED` occurs. Successful source fields remain available alongside errors.

# Actor input Schema

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

1-10,000 domain names, hostnames, URLs or email addresses. Inputs are trimmed, lowercased and IDNA-converted; URL/email hosts are used. Omitted or null runs example.com; \[] fails the run. Normalized hostnames deduplicate within the run. Invalid inputs incur no Domain events; partial results count when at least one source answers.

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

Number of domains processed at once, from 1 to 20; default 8. Upstream requests are capped at twice this number. Dataset rows arrive in completion order. Lower this when upstream services rate-limit the run.

## Actor input object example

```json
{
  "domains": [
    "example.com",
    "apify.com"
  ],
  "maxConcurrency": 8
}
```

# Actor output Schema

## `results` (type: `string`):

One row per item, each with a status field.

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

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,miacx/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/2ttJrKuZ5p5oj60Kb/builds/1n5WsCNKBCZzaUXRH/openapi.json
