# WHOIS & DNS Lookup API for AI Agents (RDAP, MX, NS) (`emttn/domain-lookup`) Actor

WHOIS lookup and DNS lookup API: give it domains and get each one's DNS records (A, AAAA, MX, NS, TXT and more) and registration from the registry's RDAP for AI agents: registrar, dates, status, nameservers, DNSSEC. No personal contacts; charged per domain fully answered. Also an MCP server.

- **URL**: https://apify.com/emttn/domain-lookup.md
- **Developed by:** [Frameskim Tools](https://apify.com/emttn) (community)
- **Categories:** AI, Agents, Developer tools
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 domain delivereds

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

## DNS & RDAP Domain Lookup for AI Agents

Give it domains and get each one's DNS records and its registration back as data, for AI agents that need to know whether a domain exists, who its registrar is, when it expires or where its mail and web point. You get one dataset item per domain: its A, AAAA, MX, NS and TXT records (CNAME, SOA and CAA on request) and, from the registry's RDAP server, its registrar, creation, update and expiry dates, status codes, nameservers and DNSSEC. It is also an MCP server (`/mcp`) and HTTP API (`/domain`) that returns one domain per call, charged per domain, without starting a run in your account (see Server interface below).

- RDAP, not WHOIS: each registry's own structured answer, found through IANA's RDAP bootstrap.
- One query per domain you ask, at most 100 domains per run, one query at a time per registry. It answers about the domains you list; it is not a bulk or zone-wide lookup.
- It never returns registrant, administrative, technical or abuse contacts: only the registrar's name and IANA ID.
- DNS is asked through the resolver of the cloud server the actor runs on; no third-party DNS service.
- Charged per domain fully answered; domains whose DNS or registry did not answer are free.

### What you get

```json
{
  "domain": "www.example.com",
  "registeredDomain": "example.com",
  "dnsStatus": "NOERROR",
  "dns": {
    "A": ["93.184.215.14"],
    "AAAA": ["2606:2800:21f:cb07:6820:80da:af6b:8b2c"],
    "MX": [{"priority": 0, "host": ""}],
    "NS": ["elliott.ns.cloudflare.com", "hera.ns.cloudflare.com"],
    "TXT": ["v=spf1 -all"]
  },
  "registered": true,
  "registrar": "RESERVED-Internet Assigned Numbers Authority",
  "registrarIanaId": "376",
  "status": ["client delete prohibited", "client transfer prohibited", "client update prohibited"],
  "created": "1995-08-14T04:00:00Z",
  "updated": "2026-08-14T08:01:43Z",
  "expires": "2027-08-13T04:00:00Z",
  "nameservers": ["elliott.ns.cloudflare.com", "hera.ns.cloudflare.com"],
  "dnssec": true,
  "rdapUrl": "https://rdap.verisign.com/com/v1/domain/example.com",
  "registryNotices": [{"title": "Terms of Service", "description": "Service subject to Terms of Use.", "links": ["https://www.verisign.com/domain-names/registration-data-access-protocol/terms-service/index.xhtml"]}]
}
```

- `domain` is the name looked up in DNS, in ASCII (an internationalized name in punycode); `registeredDomain` is the domain a registry holds, from the Public Suffix List (`news.bbc.co.uk` gives `bbc.co.uk`).
- `dnsStatus` is `NOERROR` or `NXDOMAIN` (the name does not exist; every list is empty). A type with no records has an empty list.
- `registered` is `false` when the registry has no record of the domain. It may still be reserved or blocked, so it is not a promise that it can be bought.
- `registryNotices` carries the registry's own notices, its terms of use among them; read them before you reuse the data.
- With `dns` or `rdap` off, that part's fields are `null`.
- A domain that could not be delivered has `domain` and `error`, with the reason, and is not charged.
- The run's status message says how many domains were delivered and failed, and why the run stopped early, if it did.
- If nothing is delivered, the run still ends as succeeded: each domain that failed is in the dataset with its `error`, the status message gives the first reason, and nothing was charged.

### Input

| Field | What it does |
|---|---|
| `domains` | From 1 to 100 domain names, subdomains or URLs. A repeated name is looked up once. |
| `records` | The DNS types: `A`, `AAAA`, `CNAME`, `MX`, `NS`, `TXT`, `SOA`, `CAA`. Default `A`, `AAAA`, `MX`, `NS`, `TXT`. |
| `dns` | Look up DNS records (default on). |
| `rdap` | Look up the registration (default on). |

### Limits

- Some country-code registries (for example `.de`, `.io`, `.co`, `.me`, `.es`) offer no RDAP service: those domains fail with that reason. Run them again with `rdap` off to get their DNS.
- 3 s per DNS query and 8 s per RDAP query, never retried, and a registry redirect is not followed; 5 domains at a time.
- Set a maximum charge per run to cap spending: the run stops before a domain that would pass it.

### Pricing

This actor bills one event, nothing else:

- `domain`: one per domain delivered with every part you asked (DNS, registration or both).

A domain whose DNS did not answer, whose registry offers no RDAP or did not answer, or that the run did not start is not charged. `NXDOMAIN` and "not registered" are answers, and are charged. Each domain stays charged once delivered, even if the run later stops or fails. If no domain is delivered, the run still ends as succeeded and nothing was charged. The run never charges more than the maximum you set: it stops before a domain that would not fit. Current prices are on the Pricing tab.

### Server interface (HTTP and MCP)

The actor is also a multi-tenant Server Actor: send a request to its server URL (on the Server tab) with your Apify API token in `Authorization: Bearer <token>` and get one domain back at once, without starting a run. You pay only the `domain` event of each domain delivered; no run starts in your account.

- `GET /domain?domain=<name>` (optionally `&records=A,MX`, `&dns=false` or `&rdap=false`) or `POST /domain` with `{"domain": "<name>", "records": ["A", "MX"], "dns": true, "rdap": true}`: `200` with the same item a run writes to its dataset. A domain that cannot be delivered comes back as `422` with its `error`, and a bad name or field as `400`; neither is charged.
- `POST /mcp`: an MCP server (streamable HTTP, stateless) with one tool, `domain_lookup`, that takes `domain`, `records`, `dns` and `rdap`. Add the MCP URL from the Server tab to your agent with your token as the bearer.
- Domains are looked up the same way as in runs (one RDAP query per domain, one at a time per registry), with up to 15 seconds per request. If your requests cost far more than the domains they deliver (for example many domains in a row whose registry does not answer), they get `429` for a while.
- Requests and answers are not stored: the server writes no dataset, keeps no registry answer between requests, and its log has only the method, route and status of each request, never the domain or who asked.

### Terms and privacy

DNS & RDAP Domain Lookup for AI Agents is operated by Emttn LLC and is not affiliated with, endorsed by or sponsored by IANA, ICANN or any registry or registrar. The registration data comes from each registry under its own terms, which the item of each registered domain carries in `registryNotices`; you are responsible for using the data lawfully and within those terms. Terms: https://frameskim.dev/terms. Privacy: https://frameskim.dev/privacy. Questions: support@frameskim.dev.

### Support

Every error says what was wrong. For anything else, see https://frameskim.dev/terms.

# Actor input Schema

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

Domain names, subdomains or URLs (the host is taken), from 1 to 100. Each domain delivered with every part asked is one domain event.

## `records` (type: `array`):

The DNS types to look up for each name.

## `dns` (type: `boolean`):

Look up the DNS records of each name.

## `rdap` (type: `boolean`):

Look up each registered domain at its registry's RDAP server: registrar, dates, status, nameservers, DNSSEC. Turn it off for TLDs whose registry offers no RDAP service.

## `failWhenEmpty` (type: `boolean`):

Internal: the run ends as failed, instead of succeeded with error items, when no domain is delivered. Used by health checks.

## Actor input object example

```json
{
  "domains": [
    "example.com",
    "wikipedia.org"
  ],
  "records": [
    "A",
    "AAAA",
    "MX",
    "NS",
    "TXT"
  ],
  "dns": true,
  "rdap": true,
  "failWhenEmpty": false
}
```

# Actor output Schema

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

Dataset items: domain, registeredDomain, dnsStatus, dns, registered, registrar, registrarIanaId, status, created, updated, expires, nameservers, dnssec, rdapUrl and registryNotices; domains that could not be delivered carry an error and are not charged.

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

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

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

```

## MCP server setup

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