# Whois Domain Lookup (`scrapers-hub/whois-domain-lookup`) Actor

WHOIS Domain Lookup returns registrar, registration and expiration dates, last updated, nameservers and domain status for one or many domains. 🌐 For domain portfolio monitoring, expiry alerts and due-diligence research.

- **URL**: https://apify.com/scrapers-hub/whois-domain-lookup.md
- **Developed by:** [Scrapers Hub](https://apify.com/scrapers-hub) (community)
- **Categories:**
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#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

## 🌐 Whois Domain Lookup – Bulk WHOIS & RDAP Domain Data Extraction

The **Whois Domain Lookup** actor performs fast, structured WHOIS and RDAP queries for any domain name, returning registrar details, nameservers, EPP status codes, and the full registration lifecycle — registration date, expiry date and last update — as clean JSON rows. Feed it one domain or a list of thousands, and it resolves each one through the RDAP protocol, the modern JSON-based successor to legacy WHOIS text records.

Domain intelligence underpins a surprising amount of everyday work: verifying that an inbound lead's company domain is genuinely established rather than registered last week, monitoring expiry dates across a corporate portfolio, mapping which DNS provider a competitor uses, or triaging a suspicious link during a phishing investigation. This Whois domain lookup tool gives you that data in a machine-readable shape, without parsing free-text WHOIS output or juggling per-registry quirks yourself.

***

### 📊 What Data Can You Extract with This Whois Domain Lookup Scraper?

Every row is a single domain's RDAP record, normalised into a flat, predictable structure. Here is how the real output fields group together.

| Category | Fields | What You Get |
|---|---|---|
| 🏷️ Domain identity | `domain` | The domain name as returned by the registry, typically upper-cased |
| ✅ Query result | `success`, `error` | Whether the lookup resolved, and the failure reason when it did not |
| 🔐 Registry status | `status` | Array of EPP status codes such as client transfer prohibited or client delete prohibited |
| 🗄️ DNS infrastructure | `nameservers` | Array of authoritative nameserver hostnames, revealing the DNS or CDN provider in use |
| 🏢 Registrar record | `registrar` | Object containing the registrar's `name` and IANA `id` |
| 📅 Lifecycle dates | `registrationDate`, `expirationDate`, `lastUpdated` | ISO-8601 timestamps for creation, expiry and the most recent registry update |

The `status` array is the field most people underuse. Those EPP codes tell you whether a domain is locked against transfer, deletion or update — which is exactly how you distinguish a well-managed, protected asset from one sitting unlocked and vulnerable to hijacking, or one already flagged for pending deletion.

***

### 🌟 Key Features of the Whois Domain Lookup Scraper

| Feature | Description |
|---|---|
| 📋 Bulk domain processing | Supply an array of domains via `domains` and the actor resolves every one of them in a single run |
| 🔎 Single-domain mode | The `domain` field handles quick one-off lookups without building an array |
| 🧬 RDAP-based queries | Uses the RDAP protocol via `rdap.org`, returning structured JSON rather than unparsed legacy WHOIS text |
| 📆 Full lifecycle dates | Captures `registrationDate`, `expirationDate` and `lastUpdated` as ISO-8601 timestamps ready for date arithmetic |
| 🔐 EPP status codes | Returns the complete `status` array so you can detect transfer locks, deletion holds and pending states |
| 🗺️ Nameserver mapping | Extracts every authoritative nameserver, making DNS provider identification trivial across a portfolio |
| 🏢 Registrar identification | Provides both the registrar's display name and its numeric IANA identifier for reliable matching |
| 🛡️ Per-domain error isolation | A domain that fails to resolve produces a row with `success: false` and an `error` message; the rest of the batch continues |
| 🌍 Automatic proxy rotation | Outbound requests are routed through Apify's proxy network automatically, reducing the risk of rate limiting on large batches |

***

### 🚀 Why Choose This Whois Domain Lookup Scraper?

**Structured output instead of raw WHOIS text.** Classic WHOIS returns unstructured text that varies wildly between registries, and parsing it reliably is a maintenance treadmill. This Whois domain lookup uses RDAP, which is a JSON protocol by design, so the fields you get are consistent whether the domain is a `.com`, a `.org` or a country-code TLD.

**Built for portfolios, not single queries.** The `domains` array means one run can cover an entire corporate domain estate, a competitor watchlist, or a batch of newly observed domains from a security feed. Results land in one dataset you can sort, filter and export in a single step.

**Failure never breaks the batch.** Non-existent domains, unsupported TLDs and registry timeouts are captured as rows with `success: false` and a populated `error` field. You get a complete accounting of what resolved and what did not, rather than a run that dies on the first bad input.

**Expiry monitoring that actually computes.** Because `expirationDate` comes back as an ISO-8601 timestamp rather than a locale-specific string, you can diff it against today's date directly in a spreadsheet, a SQL query or a scheduled script — no date parsing gymnastics required.

***

### 📥 Input

The Whois domain lookup accepts a single domain, a list of domains, or both. Neither field is strictly required, and both ship with working defaults.

```json
{
  "domain": "example.com",
  "domains": [
    "google.com",
    "github.com",
    "wikipedia.org"
  ]
}
```

#### 🔧 Whois Domain Lookup Input Fields

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `domain` | string | ❌ No | `"example.com"` | A single domain to check. |
| `domains` | array | ❌ No | `["google.com", "github.com", "wikipedia.org"]` | A list of domains to check. |

#### 💡 Input Examples

**Quick single-domain lookup**

```json
{
  "domain": "example.com"
}
```

**Bulk portfolio expiry audit**

```json
{
  "domains": [
    "acme-corp.com",
    "acme-corp.net",
    "acme-corp.org",
    "acmecorp.io",
    "acme.co.uk"
  ]
}
```

**Competitor and watchlist monitoring**

```json
{
  "domain": "competitor-flagship.com",
  "domains": [
    "competitor-eu.com",
    "competitor-apac.com",
    "competitor-blog.io"
  ]
}
```

***

### 📤 Output

Each dataset item is one domain's resolved WHOIS/RDAP record. Below is a real item from an actual run of the Whois domain lookup:

```json
{
  "domain": "EXAMPLE.COM",
  "success": true,
  "status": [
    "client delete prohibited",
    "client transfer prohibited",
    "client update prohibited"
  ],
  "nameservers": [
    "ELLIOTT.NS.CLOUDFLARE.COM",
    "HERA.NS.CLOUDFLARE.COM"
  ],
  "registrar": {
    "name": "RESERVED-Internet Assigned Numbers Authority",
    "id": "376"
  },
  "registrationDate": "1995-08-14T04:00:00Z",
  "expirationDate": "2026-08-13T04:00:00Z",
  "lastUpdated": "2026-01-16T18:26:50Z"
}
```

A domain that cannot be resolved returns a failure row instead:

```json
{
  "domain": "this-domain-does-not-exist-12345.com",
  "success": false,
  "error": "Domain not found in registry"
}
```

#### 🧾 Whois Domain Lookup Output Fields

| Field | Type | Description |
|---|---|---|
| `domain` | string | null | Domain name of the item. |
| `success` | boolean | null | Whether the lookup operation succeeded. |
| `status` | array | null | Registry status of the item — the EPP status codes attached to the domain. |
| `nameservers` | array | null | Nameservers values collected for the item. |
| `registrar` | object | null | Registrar of the item, containing the registrar's `name` and IANA `id`. |
| `registrationDate` | string | null | Date of the registration, as an ISO-8601 timestamp. |
| `expirationDate` | string | null | Date of the expiration, as an ISO-8601 timestamp. |
| `lastUpdated` | string | null | Last updated of the item — when the registry record was most recently modified. |
| `error` | string | null | Error message, if the item failed to process. |

***

### 💻 How to Use the Whois Domain Lookup Scraper (Step by Step)

#### Step 1: Assemble Your Domain List

Decide what you actually want to know before you build the list. An expiry audit calls for every domain your organisation owns, including defensive registrations and country-code variants that are easy to forget. A competitive study calls for a competitor's primary domain plus the regional and product subdomain-hosting domains they operate. A security triage calls for the domains extracted from suspicious links. Strip protocols and paths — submit `example.com`, not `https://example.com/pricing`.

#### Step 2: Choose Between `domain` and `domains`

The `domain` field takes one string and is convenient for ad-hoc checks straight from the Console. The `domains` field takes an array and is the right choice for anything at scale. You can populate both in the same run; the actor handles a single domain and a list together without conflict. For repeatable automation, prefer `domains` even when the list has one entry, because it keeps your input shape stable.

#### Step 3: Run the Whois Domain Lookup

Launch from the Apify Console with the Start button, or trigger the run over the API. Lookups are resolved through RDAP endpoints via `rdap.org`, which routes each query to the correct registry or registrar RDAP service automatically. Requests go out over Apify's proxy network, which keeps large batches from tripping per-IP rate limits at the registries.

#### Step 4: Check the `success` Flag Before Analysing

The first thing to do with the resulting dataset is split it on `success`. Rows where `success` is `true` carry the full record; rows where it is `false` carry an `error` string explaining why. Typical failures are domains that were never registered, TLDs whose registries do not publish RDAP, and transient timeouts worth retrying. Doing this split up front stops null dates from silently skewing any aggregate you compute.

#### Step 5: Interpret the Status Codes and Nameservers

The `status` array contains EPP status codes, which are the registry's own machine-readable statements about what may be done to the domain. Codes containing "prohibited" indicate protective locks; codes referencing pending states indicate a transfer, deletion or restoration in flight. The `nameservers` array, meanwhile, is a direct fingerprint of DNS infrastructure — Cloudflare, Route 53, a registrar's default DNS or a self-hosted setup are all immediately identifiable from the hostnames.

#### Step 6: Compute Days to Expiry and Set Thresholds

With `expirationDate` in ISO-8601 form, calculating time remaining is a subtraction. Export the dataset to a spreadsheet and add a column computing the difference from today, or do it in code during post-processing. Sorting on that column surfaces the domains needing renewal attention, and bucketing at thirty, sixty and ninety days gives you a practical alerting ladder.

#### Step 7: Schedule Recurring Portfolio Checks

Domain records change: registrars are switched, nameservers migrate, and locks are applied or lifted. Attach an Apify schedule to run the Whois domain lookup weekly or monthly against your full list, then compare each run's `lastUpdated`, `registrar` and `nameservers` values against the previous snapshot. Any change is worth a look, and unexpected changes to `nameservers` or `registrar` on a domain you own deserve immediate investigation.

***

### 🔌 API Access & Integrations

Run the Whois domain lookup and get dataset items back in one synchronous call:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers-hub~whois-domain-lookup/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "domains": ["google.com", "github.com", "wikipedia.org"]
  }'
```

The equivalent in Python with the official client, including a days-to-expiry calculation:

```python
from datetime import datetime, timezone
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")

run_input = {
    "domains": ["acme-corp.com", "acme-corp.net", "acme-corp.org"],
}

run = client.actor("scrapers-hub/whois-domain-lookup").call(run_input=run_input)

now = datetime.now(timezone.utc)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    if not item.get("success"):
        print("FAILED", item.get("domain"), item.get("error"))
        continue

    expires = item.get("expirationDate")
    days_left = None
    if expires:
        days_left = (datetime.fromisoformat(expires.replace("Z", "+00:00")) - now).days

    registrar = (item.get("registrar") or {}).get("name")
    print(item["domain"], registrar, days_left, item.get("nameservers"))
```

The actor also plugs into Zapier, Make, Google Sheets, Slack and any custom endpoint through Apify webhooks — so an expiry alert can post straight into a Slack channel, or a fresh lookup can append rows to a shared spreadsheet automatically.

***

### 💡 Best Use Cases for Whois Domain Lookup Data

#### 🗓️ Domain Portfolio Expiry Monitoring

An expired domain can take down email, break single sign-on and hand a valuable asset to a squatter. Running the Whois domain lookup across your full estate and sorting on `expirationDate` produces a renewal calendar in minutes. Pair it with `status` to confirm each domain also carries the appropriate client-side locks.

#### 🕵️ Phishing and Fraud Investigation

Newly registered domains are heavily overrepresented in phishing campaigns. Checking a suspicious domain's `registrationDate` immediately tells you whether it appeared days ago or has a decade of history, while `registrar` and `nameservers` help cluster related malicious infrastructure that shares a provider.

#### 🏷️ Brand Protection and Typosquat Detection

Generate the plausible misspellings and TLD variants of your brand, run them all through the lookup, and see which are registered. A `success: true` result on a domain you do not own is a lead: `registrationDate` tells you how recently it was taken, and `registrar` tells you where to file a complaint.

#### 💼 Sales Prospecting and Lead Verification

Company age is a useful qualification signal. Feeding inbound lead domains through this Whois domain lookup and reading `registrationDate` separates established businesses from entities registered last month. The `nameservers` field adds a technographic layer, revealing which hosting and CDN stack the prospect already runs.

#### 🔄 DNS Migration and Infrastructure Auditing

During a DNS provider migration, the `nameservers` array is the ground truth for what has actually propagated at the registry. Running the lookup across every domain before, during and after a cutover gives you a definitive checklist of which domains still point at the old provider.

#### 🏛️ M\&A and Domain Acquisition Research

Before approaching an owner about a domain, the record tells you what you are dealing with. `registrationDate` indicates how long it has been held, `expirationDate` shows how far ahead the owner has renewed, and `status` reveals whether the domain is locked or drifting toward deletion — all of which shape negotiating position and timing.

#### 📉 Competitor and Market Intelligence

Tracking a competitor's domain footprint over time reveals strategy. A cluster of new country-code domains registered in the same week signals international expansion; a `lastUpdated` change accompanied by different `nameservers` signals an infrastructure or agency change. Scheduled runs turn these one-off observations into a trend line.

***

### ⚙️ Tips for Better Whois Domain Lookup Results

- **Submit bare domain names.** Strip `https://`, `www.` where it is not part of the registered name, ports, paths and query strings. The registry knows `example.com`, not the full URL you copied from your browser.
- **Query the registrable domain, not a subdomain.** WHOIS and RDAP records exist at the registrable level. Looking up `blog.example.com` will not return a record; look up `example.com` instead.
- **Expect coverage gaps on some ccTLDs.** RDAP adoption is close to universal for gTLDs but uneven across country-code registries. Some ccTLDs publish limited data or none at all, which surfaces as a `success: false` row.
- **Retry timeouts before treating them as failures.** Registry RDAP endpoints occasionally throttle or time out under load. Re-running only the failed domains from the previous dataset usually resolves most of them.
- **Snapshot each run for change detection.** The real value of this data is longitudinal. Store every run's dataset and diff `registrar`, `nameservers` and `status` between snapshots to catch unauthorised or unexpected changes.
- **Do not expect registrant contact details.** Since GDPR, registries and registrars redact personal registrant information from public records. This actor returns what is published — registrar, nameservers, status and dates — not the registrant's name or address.

***

### 🛠️ Troubleshooting

**Why does a domain I know exists return `success: false`?**
The most common cause is a TLD whose registry does not expose an RDAP service, or exposes one with restricted data. Country-code registries vary considerably in what they publish. A second cause is a transient timeout at the registry endpoint, which usually clears on a retry of just that domain.

**Why is the `registrar` object empty or missing a name?**
Not every registry populates the registrar entity in its RDAP response, and some return only an IANA identifier without a display name. Where the registry omits the data, the actor cannot invent it. The IANA `id` alone is still usable for lookups against the public registrar list.

**Why can I not see the registrant's name, email or address?**
Public WHOIS and RDAP records have been redacted for privacy since GDPR came into force. Registrant contact details are no longer published for the overwhelming majority of domains, so no lookup tool — this one included — can return them from public sources.

**Why are `nameservers` empty on a domain that clearly resolves?**
A domain can resolve through cached or delegated DNS while the registry record itself lists no nameservers, which typically happens with domains in a parked, pending-delete or newly registered state. Cross-check with a live DNS query if you need the currently answering nameservers rather than the registry-recorded ones.

**Why did a large batch produce several failed rows?**
Registry RDAP services rate-limit aggressive querying. Although requests are routed through Apify's proxy network to spread load, a very large batch can still hit per-registry limits. Splitting the list into smaller runs, or re-running only the failures, generally recovers the missing records.

***

### ❓ Frequently Asked Questions About Whois Domain Lookup

**What is a Whois domain lookup and what does it tell me?**
A Whois domain lookup queries the public registration record for a domain name. It returns who the domain is registered through, which nameservers are authoritative for it, what registry status codes apply, and the key dates in its lifecycle — when it was created, when it expires, and when the record was last changed.

**What is the difference between WHOIS and RDAP?**
WHOIS is the older protocol and returns free-form text that differs between registries, making it awkward to parse. RDAP is its modern replacement and returns structured JSON with standardised fields. This actor uses RDAP, which is why the output is consistent across TLDs.

**How many domains can I look up in one run?**
Pass as many as you need in the `domains` array. There is no fixed cap in the input schema. For very large lists, splitting into several runs reduces the chance of hitting registry rate limits.

**Can I look up a subdomain such as blog.example.com?**
No. Registration records exist only at the registrable domain level. Query `example.com` and you will get the record that governs every subdomain beneath it.

**Does this Whois domain lookup work for country-code TLDs?**
It works wherever the registry publishes an RDAP service. Coverage is essentially complete for generic TLDs such as `.com`, `.net` and `.org`, and good but uneven across ccTLDs. Where a registry does not support RDAP, the domain returns `success: false`.

**Can I find out who owns a domain?**
Not from public data in most cases. Registrant names, emails and postal addresses are redacted under GDPR and similar privacy regimes. What you do get is the registrar the domain sits with, which is the appropriate contact point for abuse reports and legal notices.

**How do I check when a domain expires?**
Read the `expirationDate` field, which is an ISO-8601 timestamp. Subtract today's date from it to get days remaining, then sort or alert on that value. The Python example above shows the calculation.

**What do the EPP status codes in the `status` array mean?**
They are the registry's machine-readable statements about the domain's state. Codes describing prohibited actions indicate protective locks against transfer, deletion or update. Codes describing pending actions indicate an operation currently in progress at the registry.

**Can I tell if a domain is available to register?**
Indirectly. A domain that returns `success: false` with a not-found style error is generally unregistered, while one returning a full record is taken. For a definitive availability answer, confirm with a registrar's own availability API, since some registries treat reserved and premium names specially.

**Does the actor need a proxy configuration from me?**
No. Proxy rotation is handled automatically through Apify's proxy network, and there is no proxy field in the input schema for you to set.

**Why do domain names come back in uppercase?**
That is how many registries return them in their RDAP responses. Domain names are case-insensitive, so `EXAMPLE.COM` and `example.com` refer to the same domain. Normalise the case in post-processing if your downstream system expects lowercase.

**Can I use this Whois domain lookup to monitor changes over time?**
Yes, and it is one of the strongest uses. Schedule recurring runs and diff the `registrar`, `nameservers`, `status` and `lastUpdated` fields between consecutive datasets to detect transfers, DNS migrations and lock changes.

**What happens if I supply both `domain` and `domains`?**
Both are processed. The single `domain` value and every entry in the `domains` array are looked up in the same run, and each produces its own dataset row.

**In what formats can I export the Whois data?**
The Apify dataset supports JSON, JSONL, CSV, Excel, XML and RSS export from the Console, plus programmatic access through the dataset API and the `apify_client` library.

**Is this Whois domain lookup free to run?**
The actor is listed with a free pricing model on the Apify platform. Apify's own platform usage terms and compute unit accounting still apply to any run, as they do for every actor.

***

### 🆘 Support & Feedback

Hit an unexpected error, found a TLD that will not resolve, or spotted a field that looks wrong? Open a ticket on the **Issues** tab of this actor with the domain and the run ID. That is the fastest route to a fix and leaves a public record other users can learn from.

Need something more specific? Custom domain intelligence work — bulk availability checks, historical record archiving, automated expiry alerting wired into your own systems, or a private variant tuned to your portfolio — is available. Email **scraperhubapi@gmail.com** with a description of what you are trying to achieve.

If this Whois domain lookup saves you time, a review on the actor page is genuinely appreciated. Ratings and written feedback shape what gets improved next.

***

### ⚖️ Disclaimer

This Whois domain lookup actor retrieves only publicly published domain registration data made available by registries and registrars through the RDAP protocol. It does not bypass access controls, authenticate to restricted WHOIS ports, or attempt to obtain redacted information by any means.

You are responsible for ensuring your use of this data complies with applicable law, with registry and registrar acceptable use policies, and with the terms of service of the platforms involved. Registration data is published for technical and administrative purposes; using it to send unsolicited commercial email, for mass marketing, or to enable domain hijacking is prohibited by most registry policies and may be unlawful.

Where a domain record contains personal data — which since GDPR is uncommon but still occurs, particularly for organisational contacts and in some ccTLD registries — you act as the data controller for any further processing you perform. Ensure you have a lawful basis under the GDPR, the UK GDPR, the CCPA or any other applicable privacy framework, apply data minimisation, retain records no longer than necessary, and honour data subject access and erasure requests.

If you believe data returned through this actor should be removed, or you have a privacy concern relating to a specific record, contact **scraperhubapi@gmail.com** and the request will be reviewed promptly.

# Actor input Schema

## `domain` (type: `string`):

A single domain to check

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

A list of domains to check

## Actor input object example

```json
{
  "domain": "example.com",
  "domains": [
    "google.com",
    "github.com",
    "wikipedia.org"
  ]
}
```

# Actor output Schema

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

Records scraped by Whois Domain Lookup, stored in the run's default dataset.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers-hub/whois-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("scrapers-hub/whois-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 '{}' |
apify call scrapers-hub/whois-domain-lookup --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapers-hub/whois-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/m2maLBRYhdMbQ9NCc/builds/PlSvbYoiS00XW4TNz/openapi.json
