# Domain DNS & WHOIS (RDAP) Lookup: registrar, expiry, SPF/DMA (`glistening_film/domain-dns-rdap-lookup`) Actor

- **URL**: https://apify.com/glistening\_film/domain-dns-rdap-lookup.md
- **Developed by:** [Yodesla](https://apify.com/glistening_film) (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

$2.00 / 1,000 domain checkeds

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 DNS & WHOIS (RDAP) Lookup: bulk records, registrar, expiry, SPF/DMARC

Look up **up to 1000 domains per run** and get, for each one: its DNS records (A, AAAA, MX,
NS, TXT, CNAME, SOA, CAA - pick any subset), an email-security summary (SPF, DMARC policy,
MX presence) and its registration data via **RDAP** - the official IANA directory and the
modern, protocol-based successor of WHOIS (registrar, registration, expiration and
last-changed dates, status, nameservers). Ideal for domain inventory, expiry/renewal
monitoring, deliverability pre-checks and lead enrichment, on demand or via Apify schedules.

### What you get (one dataset item per domain)

`domain`, `status` (`ok` | `nxdomain` | `invalid_input` | `error`), `records` (each requested
type as a list of answers), `dnsErrors` (per-type failures, e.g. timeouts),
`emailSecurity` (`spf` record, `dmarc` record, parsed `dmarcPolicy` such as `reject`,
`hasMx`), `rdap` (`registrar`, `created`, `expires`, `updated`, `status[]`, `nameservers[]`)
or `null` with `rdapError` (e.g. not found), and `checkedAt` (UTC).

- Domains are normalised for you: lowercased, IDNA-encoded, and if you pass URLs, reduced to
  the host (scheme, path, port and a leading `www.` removed).
- Multi-label TLDs such as `co.uk` are routed to the correct RDAP server automatically via
  the IANA bootstrap file (fetched once per run).
- A per-domain report (key-value store record `REPORT`) mirrors the dataset and adds
  per-domain processing time.

### Pricing: pay per domain that answered

**One event per domain with a real answer** - status `ok` or `nxdomain` (a domain that does
not exist in DNS is still a definite answer). Entries that fail normalisation
(`invalid_input`) and domains that error out are **reported but never charged**. There is no
start fee. The run checks your spending limit before each domain and stops cleanly when it
is reached.

### Limits

- Max 1000 domains per run (duplicates are checked once).
- DNS queries: 5 s timeout, 10 s lifetime per query, up to 10 domains in flight at once.
- RDAP: up to 2 concurrent requests per registry server, one retry after 5 s on HTTP 429.
- RDAP is public registration data; some registries answer slowly or not at all, which is
  reported as `rdapError` instead of failing the run.
- RDAP covers all generic TLDs (.com, .net, .org, .app, ...) and many country TLDs, but some
  registries (for example .de and .io at the time of writing) publish no RDAP service. For those,
  DNS and email-security results are still returned and `rdapError` says
  "no RDAP server in IANA bootstrap for this TLD".

### Input example

```json
{
  "domains": ["apify.com", "https://www.example.org/path", "münchen.de"],
  "recordTypes": ["A", "AAAA", "MX", "NS", "TXT"],
  "includeRdap": true,
  "includeEmailSecurity": true
}
```

# Actor input Schema

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

Up to 1000 domains or URLs per run (duplicates are checked once). URLs are reduced to their host (scheme, path, port and a leading www. are stripped). Invalid entries are reported as invalid\_input and never charged.

## `recordTypes` (type: `array`):

DNS record types to look up for each domain.

## `includeRdap` (type: `boolean`):

Fetch registrar, registration / expiration / last-changed dates, status and nameservers via the official IANA RDAP directory (the modern, protocol-based successor of WHOIS).

## `includeEmailSecurity` (type: `boolean`):

Check SPF (TXT record starting v=spf1), DMARC (TXT at \_dmarc.<domain>, p= policy) and whether the domain has MX records.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "example.org"
  ],
  "recordTypes": [
    "A",
    "AAAA",
    "MX",
    "NS",
    "TXT"
  ],
  "includeRdap": true,
  "includeEmailSecurity": true
}
```

# Actor output Schema

## `items` (type: `string`):

One item per domain: domain, status (ok | nxdomain | invalid\_input | error), records {type: \[rdata...]}, dnsErrors {type: reason}, emailSecurity {spf, dmarc, dmarcPolicy, hasMx}, rdap {registrar, created, expires, updated, status\[], nameservers\[]} or null with rdapError, checkedAt (UTC). Only ok and nxdomain items are charged.

## `report` (type: `string`):

The same per-domain items as the dataset, plus processingMs per domain.

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

// Run the Actor and wait for it to finish
const run = await client.actor("glistening_film/domain-dns-rdap-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",
        "example.org",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,glistening_film/domain-dns-rdap-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/JGAR4kz3X7scsLr8f/builds/TmHtvcnRZkGdFj5Fa/openapi.json
