# Domain Health Checker — WHOIS/RDAP, SSL & DNS (`nuhemugames/domain-health-checker`) Actor

Bulk domain intelligence: registrar, age and expiry via official RDAP (structured WHOIS), SSL certificate expiry and trust, DNS records (A/AAAA/MX/NS/TXT), plus clear warnings like "expires in 30 days". Registrant contact details are never extracted - registry facts only.

- **URL**: https://apify.com/nuhemugames/domain-health-checker.md
- **Developed by:** [kuon](https://apify.com/nuhemugames) (community)
- **Categories:** Developer tools, SEO tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Domain Health Checker — WHOIS/RDAP, SSL & DNS

Bulk domain intelligence from **official sources only**: registrar, age,
expiry dates and EPP statuses via RDAP (the registries' structured successor
to WHOIS), SSL certificate expiry and trust from a direct TLS handshake, and
DNS records (A/AAAA/MX/NS/TXT) — plus clear machine-readable warnings such as
`domain_expires_in_30_days` and `ssl_expired`. No credentials or API keys
needed.

**Privacy by design**: registrant, admin and tech contact entities in RDAP
responses are deliberately never read. The output contains no names, emails,
phone numbers or addresses of domain owners — only registry facts (registrar
company, dates, statuses, nameservers) and technical data. This tool cannot
be used for contact harvesting.

### What it does

Give it a list of domains (full URLs accepted — hostnames are extracted, and
subdomains are resolved to their registrable domain for registration lookups:
`www.example.co.uk` → `example.co.uk`). For each domain you get one dataset
item with:

- `registered` — `true`, `false` (available), or `null` when the TLD has no RDAP service
- `registrar`, `createdAt`, `updatedAt`, `expiresAt` — with computed `ageDays` and `expiresInDays`
- `statuses` (EPP), `nameservers`, `dnssec`, and the `rdapSource` URL for transparency
- `ssl` — issuer, subject, validity window, `expiresInDays`, and whether the chain is `trusted`
  (expiry is read even from untrusted/expired certificates)
- `dns` — A, AAAA, MX (with priority), NS and TXT records
- `warnings[]` — `domain_expires_in_30_days`, `ssl_expires_in_14_days`, `ssl_expired`,
  `ssl_not_trusted`, `ssl_unreachable`, `domain_unregistered`, `rdap_not_supported`,
  `rdap_error`, `dns_error`, `invalid_domain`

Invalid inputs produce a failed item with a clear error instead of crashing the run.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `domains` | array | — | Domains or URLs to check (duplicates removed) |
| `includeDns` | boolean | `true` | Resolve A/AAAA/MX/NS/TXT records |
| `includeSsl` | boolean | `true` | Check the SSL certificate on port 443 |
| `timeoutSecs` | integer | `10` | Timeout per network operation |

### Example output (abridged)

```json
{
    "domain": "www.apify.com",
    "registrableDomain": "apify.com",
    "status": "success",
    "registered": true,
    "registrar": "Amazon Registrar, Inc.",
    "createdAt": "2015-06-02T17:14:10Z",
    "expiresAt": "2035-06-02T17:14:10Z",
    "ageDays": 4096,
    "expiresInDays": 3210,
    "statuses": ["client transfer prohibited"],
    "nameservers": ["ns-1.awsdns-00.com", "ns-2.awsdns-11.net"],
    "dnssec": false,
    "ssl": {"trusted": true, "issuer": "R13", "notAfter": "2027-01-17T00:00:00Z", "expiresInDays": 152},
    "dns": {"a": ["1.2.3.4"], "mx": [{"host": "aspmx.l.google.com", "priority": 1}]},
    "warnings": [],
    "checkedAt": "2026-08-18T09:30:00Z"
}
```

### Typical uses

- Monitor your domain portfolio: expiry dates, SSL health, DNSSEC — schedule it and alert on `warnings`
- Pre-purchase checks: is a domain registered, how old is it, when does it lapse
- Security/IT hygiene: find expired or soon-to-expire certificates across all company domains
- Enrich datasets with domain age and registrar (fraud/quality signals) — without touching anyone's personal data

### Limitations

- Some ccTLDs (e.g. `.jp`, `.de`) have no RDAP service yet → `registered: null`
  with `rdap_not_supported`; SSL and DNS still work for them
- Registrant identity/contact fields are out of scope by design and will not be added
- SSL is checked on port 443 of the domain itself (not subdomain wildcards or other ports)

### Development (local)

```bash
cd actors/domain-health-checker
uv venv --python 3.13 .venv && uv pip install -p .venv/bin/python -r requirements.txt

.venv/bin/python tests/run_local_test.py           # end-to-end test (apify run equivalent), exit 0 = ALL PASS
../../node_modules/.bin/apify run                  # real apify CLI local run (input: storage/key_value_stores/default/INPUT.json)
```

The test spins up a local RDAP server (whose fixture deliberately contains
registrant contact data, proving it never leaks into output) and a local TLS
server with a 5-day self-signed certificate; expected results live in
`tests/expected_output.json`. Publishing → `../../docs/publishing.md`.

# Actor input Schema

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

Domains to check (one per line). Full URLs are accepted - the hostname is extracted. Duplicates are removed.

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

Resolve A, AAAA, MX, NS and TXT records for each domain.

## `includeSsl` (type: `boolean`):

Connect to port 443 and report certificate issuer, validity dates, days until expiry and whether the chain is trusted.

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

Timeout for each network operation (RDAP request, DNS query, SSL handshake).

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "example.com"
  ],
  "includeDns": true,
  "includeSsl": true,
  "timeoutSecs": 10
}
```

# Actor output Schema

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

All dataset items (one per domain): registration, expiry, SSL, DNS and warnings.

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

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

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

```

## MCP server setup

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

```

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/xvxQ3NdWYbMpa9sJU/builds/cVjIdhhnV2Llh87iC/openapi.json
