# WHOIS Lookup Scraper: Bulk Domain Expiry, Registrar, DNS (`agents001/domain-rdap-lookup`) Actor

Returns WHOIS lookup results for each domain from official RDAP: registrar, created and expiry dates, days to expiry, status and nameservers, plus DNS records (A, MX, TXT, SPF, DMARC). A bulk WHOIS and domain expiry checker that can return only what changed since your last run.

- **URL**: https://apify.com/agents001/domain-rdap-lookup.md
- **Developed by:** [Mike Ross](https://apify.com/agents001) (community)
- **Categories:** Developer tools, SEO tools
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 domain records

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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

## WHOIS Lookup Scraper: Bulk Domain Expiry, Registrar, DNS

Bulk WHOIS lookup for a list of domains: returns registration data from official RDAP and DNS records, **one record per domain**:

- **Registration (WHOIS) data from RDAP**: registrar and its IANA ID, registration date, expiry date, last changed date, **days until expiry**, EPP status codes, nameservers and DNSSEC.
- **Registrant organisation and country**, only when the registry publishes them for an organisation. Names, email addresses and phone numbers of people are never returned.
- **DNS records**: A, AAAA, MX, NS, TXT, CNAME and SOA, plus the **SPF record** and the **DMARC record and policy**.
- **An availability guess** for names the registry has no record of.
- **What changed since your last run**: registrar, expiry, status codes, nameservers, MX, SPF, DMARC and more, with old and new values.

RDAP is the official, ICANN-mandated replacement for WHOIS. The Actor finds each TLD's RDAP server in IANA's bootstrap registry, so there is nothing to configure and no key to supply.

Use it to:

- Check expiry dates and days to expiry across a whole domain portfolio, and catch renewals before they lapse.
- Watch your own and look-alike domains for registrar, nameserver, MX and status changes on a schedule.
- Audit SPF and DMARC across many domains before an email campaign or a security review.
- See the registrar, nameservers and MX records behind a list of prospect domains.

### What you get

| Field | Example |
|---|---|
| `domain`, `domainUnicode`, `tld` | `apify.com`, `null`, `com` |
| `availability`, `availabilityBasis` | `registered`, `Registry RDAP record found.` |
| `registrar`, `registrarIanaId` | `Amazon Registrar, Inc.`, `468` |
| `createdAt`, `updatedAt`, `expiresAt` | ISO dates in UTC |
| `daysUntilExpiry` | `3144` (negative once a domain has expired) |
| `statuses` | `["client transfer prohibited"]` |
| `nameservers`, `dnssec` | registry nameservers, `true` |
| `registrantOrganization`, `registrantCountry`, `registrantIsPrivacyService` | `Acme Widgets Ltd`, `GB`, `false` |
| `aRecords`, `aaaaRecords`, `nsRecords`, `cnameRecords`, `txtRecords` | lists of values |
| `mxRecords` | `[{"priority": 1, "exchange": "aspmx.l.google.com"}]` |
| `soa` | primary nameserver, serial and timers |
| `spfRecord`, `dmarcRecord`, `dmarcPolicy` | `v=spf1 ... -all`, `v=DMARC1; p=reject; ...`, `reject` |
| `dnssecValidated` | `true` when the resolver validated the DNSSEC chain |
| `changeStatus`, `changedFields`, `changes` | `changed`, `["nameservers"]`, old and new values |
| `rdapStatus`, `rdapNote`, `sourceUrl`, `registryTermsUrl` | where the registration data came from |

The Output tab has four views: **Overview**, **DNS records**, **Changes since last run** and **Expiry watch**.

### Who it is for

- **Brand protection and security teams** watching their own and look-alike domains for registrar, nameserver, MX and status changes.
- **Domain investors and portfolio managers** tracking expiry dates and spotting names that drop.
- **Sales and marketing teams** checking a prospect list for email setup (MX, SPF, DMARC) and hosting.
- **IT and email deliverability teams** auditing SPF and DMARC across many domains.

### Quick start

1. Click **Start** with the example input. You get five example domains with their registration data and DNS records.
2. Replace the list with your own domains. Plain names, links (`https://www.example.co.uk/page`) and subdomains all work; each is reduced to the registered domain.
3. Pick the DNS record types you need, or switch DNS off for registration data only.
4. Schedule it daily or weekly with **Only domains that are new or changed since the last run** switched on, and connect the dataset to email, Slack or a spreadsheet with an Apify integration or webhook.

### Input

| Field | What it does | Default |
|---|---|---|
| `domains` | Domains to check, up to 1,000 per run. Empty runs the example list | example list |
| `includeDns` | Add DNS records from Cloudflare's 1.1.1.1 resolver | true |
| `recordTypes` | Any of `A`, `AAAA`, `MX`, `NS`, `TXT`, `CNAME`, `SOA`, `DMARC` | all |
| `maxItems` | At most this many domain records. Empty or `0` means no limit | no limit |
| `onlyChanged` | Only return domains that are new to the history or changed since the last run | false |
| `trackIpChanges` | Also count A and AAAA changes as changes (off because CDNs rotate IPs) | false |
| `stateStoreName` | Key-value store that keeps the history | `agents001-domain-rdap-lookup-state` |
| `rdapDelaySecs` | Minimum seconds between requests to the same registry | 1 |

Example input for weekly monitoring:

```json
{
  "domains": ["example.com", "example.org", "example.ai", "example.dev"],
  "recordTypes": ["MX", "NS", "TXT", "DMARC"],
  "onlyChanged": true
}
```

### Output example

```json
{
  "domain": "apify.com",
  "tld": "com",
  "availability": "registered",
  "rdapStatus": "ok",
  "registrar": "Amazon Registrar, Inc.",
  "registrarIanaId": "468",
  "createdAt": "2009-06-02T17:14:10Z",
  "updatedAt": "2026-05-16T16:53:04Z",
  "expiresAt": "2035-06-02T17:14:10Z",
  "daysUntilExpiry": 3144,
  "statuses": ["client transfer prohibited"],
  "nameservers": ["ns-1225.awsdns-25.org", "ns-1928.awsdns-49.co.uk", "ns-449.awsdns-56.com", "ns-839.awsdns-40.net"],
  "dnssec": true,
  "registrantOrganization": null,
  "mxRecords": [{"priority": 1, "exchange": "aspmx.l.google.com"}],
  "spfRecord": "v=spf1 a mx include:_spf.google.com include:mailgun.org include:amazonses.com -all",
  "dmarcRecord": "v=DMARC1; p=reject; sp=reject; pct=100; rua=mailto:redacted@apify.com; ri=604800",
  "dmarcPolicy": "reject",
  "dnsStatus": "ok",
  "dnssecValidated": true,
  "sourceUrl": "https://rdap.verisign.com/com/v1/domain/apify.com",
  "changeStatus": "changed",
  "changedFields": ["nameservers"],
  "changes": {"nameservers": {"old": ["ns1.old.example"], "new": ["ns-1225.awsdns-25.org"]}},
  "checkedAt": "2026-10-23T12:53:52Z"
}
```

A run report is saved in the key-value store as `RUN_SUMMARY`: domains checked, records saved, lookup results per registry server, and any entries skipped as invalid.

### Live API (Standby mode)

The Actor also runs as an always-ready HTTP API for one-off lookups from your app, CRM or workflow. Copy the API URL from the **Endpoints** tab and authenticate with your Apify API token in the `Authorization: Bearer <token>` header.

```bash
curl -H "Authorization: Bearer $APIFY_TOKEN" \
  "https://<your-standby-url>/lookup?domain=apify.com"

curl -X POST -H "Authorization: Bearer $APIFY_TOKEN" -H "Content-Type: application/json" \
  -d '{"domains": ["python.org", "mozilla.org"], "recordTypes": ["MX", "DMARC"]}' \
  "https://<your-standby-url>/lookup"
```

The response is `{"count": ..., "chargedRecords": ..., "results": [...]}`, where each result has the same fields as a dataset record. Entries that are not valid domain names come back with an `error` and are not charged.

| Endpoint | What it does |
|---|---|
| `GET /` | Free usage help |
| `GET /lookup`, `POST /lookup` | Look up to 10 domains per request |

Query parameters: `domain` (also `domains`), `includeDns`, `recordTypes` (comma-separated). Change tracking (`onlyChanged`) needs run history, so it is only available in normal runs; the API rejects it with HTTP 400. The same polite per-registry pacing applies to API calls, so a request with several domains at one registry takes about a second per domain.

### Pricing

This Actor uses **pay per event** pricing, with platform usage included:

- **$1.50 per 1,000 domain records** (`domain-record` event, $0.0015 each), in normal runs and API calls alike

For the live API, Apify bills the platform usage of the Standby run to you on top of the event price, as it does for every Standby Actor.

In normal runs you pay only for domain records saved to your dataset, so `onlyChanged` and `maxItems` keep costs down. A weekly `onlyChanged` run over 500 domains costs $0.75 the first time and then only $0.0015 for each domain that changed. Set a maximum cost per run in the run options and the Actor stops cleanly when it is reached.

### Which TLDs have registration data

Every registry sets its own terms for its RDAP service. The Actor only queries registries whose published terms allow lookups like these, and it reads the terms notice in every response again at run time.

- **Registration data returned** for most generic TLDs, including `.com`, `.net`, `.org`, `.info`, `.ai`, `.dev`, `.app`, `.page`, `.online`, `.site`, `.store`, `.tech`, `.pro`, `.mobi`, `.name`, `.cc`, `.top`, `.cloud` and `.in`, and several hundred more.
- **DNS data only** where a registry's terms forbid storing or reusing its RDAP data, or publish no terms that could be checked. This includes `.uk`, `.fr`, `.nl`, `.au`, `.br`, `.xyz`, `.biz`, `.tv`, `.shop`, `.club`, `.vip` and `.ca`. These records have `rdapStatus` `withheld-registry-terms` or `registry-terms-unverified`.
- **DNS data only** for TLDs with no RDAP server in IANA's bootstrap file, such as `.io`, `.co`, `.me`, `.de`, `.eu`, `.us`, `.za`, `.it`, `.es` and `.ch` (`rdapStatus` `no-rdap-server`).

For DNS-only domains the availability guess is based on DNS: a domain with nameservers is `registered`, and a name that does not exist in DNS is `possibly-available`.

### How the availability guess works

| Value | Meaning |
|---|---|
| `registered` | The registry has a record, or the domain has nameservers in DNS |
| `likely-available` | The registry returned "not found" (and the name does not exist in DNS) |
| `possibly-available` | No registry data, and the name does not exist in DNS |
| `unknown` | The lookups disagreed or failed |

It is a guess. Reserved, premium and blocked names can show as available, so confirm with a registrar before you rely on it.

### How change tracking works

With `onlyChanged` on, the Actor keeps the previous values of each domain in a key-value store in your account called `agents001-domain-rdap-lookup-state`. Each record compares the tracked fields with the previous run and lists what changed in `changedFields` and `changes`. Unchanged domains are not saved, so you are not charged for them. With `onlyChanged` off, the Actor does not open or update this store, so every record has `changeStatus` set to `new`. If a run stops with a message that it cannot open the store (for example because another Actor in your account already uses that name), enter a different name in **State store name** and run again.

- The history is kept per domain, so adding domains to your list keeps the history of the others.
- Changing `includeDns` or `recordTypes` starts a fresh history.
- A registry that was rate-limited or unreachable in a run is never reported as a change.
- SOA serial numbers are ignored, and IP addresses only count when `trackIpChanges` is on.

### Data sources, licences and privacy

- **Registration data**: each TLD's registry RDAP service, located through the [IANA RDAP bootstrap registry](https://data.iana.org/rdap/dns.json). The data belongs to the registries and is provided under their terms, linked in `registryTermsUrl` on each record. Registries forbid using it for unsolicited marketing, so do not use this Actor's output for spam or bulk outreach.
- **DNS records**: Cloudflare's public 1.1.1.1 resolver over DNS-over-HTTPS.
- **Domain parsing**: the Public Suffix List (Mozilla Public License 2.0), through the `publicsuffixlist` package.

The Actor uses no login and does not output personal data. It never returns a person's name, email address, phone number or street address from RDAP. Registrant organisation and country are only kept when the registry publishes them, they are not redacted, they do not belong to a privacy service, and the organisation is not the contact's own name. Email addresses inside TXT and DMARC records have their local part replaced with `redacted`, and the SOA responsible-person mailbox is dropped.

Domains sent to the live API are processed in memory and returned; nothing is written to storage and request URLs are not logged.

Requests are kept polite: one request at a time per registry server with a 1 second gap by default, longer waits when a registry answers HTTP 429, and a registry that asks for a long pause is skipped for the rest of the run.

### FAQ

**How fresh is the data?**
Every run asks each registry's RDAP server and Cloudflare's 1.1.1.1 resolver live, so you get the data as it stands at run time. Each record has a `checkedAt` timestamp.

**How much does a typical run cost?**
$1.50 per 1,000 domain records ($0.0015 each). A run over 500 domains costs $0.75. With `onlyChanged` on, later runs only charge for domains that changed.

**Can I schedule it and get only the changes?**
Yes. Schedule it daily or weekly in Apify and switch on **Only domains that are new or changed since the last run**. Each record then lists what changed, with old and new values.

**Does it need a login or API key?**
No login and no third-party key. Live API calls use your own Apify API token.

**What formats can I export?**
The dataset downloads as JSON, CSV, Excel and the other formats Apify offers, or you can read it through the Apify API and integrations.

**Is it legal, and where does the data come from?**
Registration data comes from each TLD's official registry RDAP service, found through IANA's bootstrap registry, under the terms linked in `registryTermsUrl`. The Actor skips registries whose terms forbid reuse and never returns personal contact details. Do not use the output for spam or bulk outreach.

**Why is the registrant organisation empty for most domains?**
Since GDPR most registries redact registrant details, and many gTLD registries no longer hold them at all. The Actor only reads the registry's own record and returns the organisation when it is published.

**Why is `expiresAt` empty for some domains?**
Some registries, for example the `.au` registry, do not publish an expiry date.

**Why does a `.uk` or `.fr` domain have no registrar?**
Those registries' terms forbid storing or reusing their RDAP data, so the Actor returns DNS data only. See "Which TLDs have registration data".

**What does `rdapStatus: rate-limited` mean?**
The registry asked the Actor to slow down for longer than it is willing to wait. Run those domains again later.

**Something looks wrong. What should I do?**
Open an issue on the Actor's Issues tab with the run link and the domain.

### Disclaimer

This Actor is independent and is not affiliated with, endorsed by or sponsored by IANA, ICANN, Cloudflare or any domain registry or registrar. Names are used only to describe data sources and belong to their owners. Registration data is provided by the registries without any guarantee of accuracy; check with the registry or registrar before acting on it.

# Actor input Schema

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

One domain per line, for example 'example.com'. Links and subdomains are accepted and reduced to the registered domain (https://www.example.co.uk/page becomes example.co.uk). Internationalised names such as 'bücher.de' work too. Up to 1,000 domains per run. Leave empty to run the example list.

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

Look up the domain's DNS records through Cloudflare's public 1.1.1.1 resolver. Turn off to return registration data only.

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

Which DNS records to return. DMARC reads the TXT record at \_dmarc.<domain> and adds the DMARC policy. SPF is taken from the TXT records.

## `maxItems` (type: `integer`):

Stop after saving this many domain records. Leave empty or 0 for no limit. You pay per domain record saved.

## `onlyChanged` (type: `boolean`):

Remember each domain's registration and DNS data between runs and only return domains that are new to the history or where something changed (registrar, expiry date, status codes, nameservers, DNSSEC, availability, MX, NS, TXT, SPF, DMARC and more). Every record also lists the changed fields with old and new values, whether this is on or off. Ideal for scheduled daily or weekly monitoring.

## `trackIpChanges` (type: `boolean`):

Also compare A and AAAA records between runs. Off by default because sites behind a CDN return different IP addresses on almost every lookup.

## `stateStoreName` (type: `string`):

Only used when 'Only domains that are new or changed since the last run' is on. Name of the key-value store in your account that keeps the previous values for change tracking. Change it only to keep separate histories. If a run reports that it cannot open the store, enter a different name here.

## `rdapDelaySecs` (type: `number`):

Minimum seconds between RDAP requests to the same registry server. The Actor slows down further on its own if a registry asks it to (HTTP 429). Keep this polite.

## Actor input object example

```json
{
  "domains": [
    "apify.com",
    "wikipedia.org",
    "python.org",
    "web.dev",
    "mozilla.org"
  ],
  "includeDns": true,
  "recordTypes": [
    "A",
    "AAAA",
    "MX",
    "NS",
    "TXT",
    "CNAME",
    "SOA",
    "DMARC"
  ],
  "onlyChanged": false,
  "trackIpChanges": false,
  "stateStoreName": "agents001-domain-rdap-lookup-state",
  "rdapDelaySecs": 1
}
```

# Actor output Schema

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

No description

## `dnsRecords` (type: `string`):

No description

## `changes` (type: `string`):

No description

## `runSummary` (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",
        "wikipedia.org",
        "python.org",
        "web.dev",
        "mozilla.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("agents001/domain-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",
        "wikipedia.org",
        "python.org",
        "web.dev",
        "mozilla.org",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,agents001/domain-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/9lRbwiEphWUL0w0F0/builds/fyWBjnT9jqOwIl7mx/openapi.json
