# Domain & DNS Lookup API — records, whois & IP (no key) (`synthetic.ia/domain-dns-lookup`) Actor

Resolve DNS records (A/AAAA/MX/TXT/NS/CNAME/SOA/CAA), look up domain whois via RDAP (registrar, dates, status, nameservers, DNSSEC), and IP-network ownership (owner, country, CIDR). Clean HTTP API + MCP, no key. Pay per query.

- **URL**: https://apify.com/synthetic.ia/domain-dns-lookup.md
- **Developed by:** [Synthetic](https://apify.com/synthetic.ia) (community)
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 lookups

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

## Domain & DNS Lookup API — records, whois & IP (no key)

Everything you need to inspect a **domain** or an **IP**, behind a clean HTTP API (and MCP tool): resolve **DNS records** (A, AAAA, MX, TXT, NS, CNAME, SOA, CAA, SRV, PTR), pull **domain whois** via **RDAP** (registrar, creation/expiry dates, status, nameservers, DNSSEC), and look up **IP-network ownership** (org, country, CIDR range, abuse contact). Perfect for monitoring, security, sales intelligence, deliverability and agents. **No API key.** Pay per query.

- 🌐 **DNS records** — resolve any record type over DNS-over-HTTPS (fast, portable, no local resolver needed).
- 📇 **Whois (RDAP)** — registrar, registration/expiry/updated dates, EPP status codes, nameservers, DNSSEC — structured, not raw text.
- 🖧 **IP network** — who owns an IP: network name, country, CIDR range, parent allocation and abuse contact.
- 🔒 **Modern & keyless** — RDAP (the successor to legacy whois) + DoH; clean JSON, no key.
- 💵 Pay per query.

### The use case it was built for

Check a domain's MX and SPF before sending mail, watch an expiry date, confirm DNSSEC, or find out which network an IP belongs to for abuse triage — all in one call, as structured JSON your app or agent can act on.

### Sample output (`whois`, domain "github.com")

```json
{
  "ok": true, "domain": "github.com", "registrar": "MarkMonitor Inc.",
  "status": ["client delete prohibited", "client transfer prohibited"],
  "created": "2007-10-09T18:20:50Z", "expires": "2028-10-09T18:20:50Z",
  "nameservers": ["dns1.p08.nsone.net", "dns2.p08.nsone.net"], "dnssec": false
}
```

### How to use

- **HTTP API (Standby):** POST or GET `/dns`, `/whois`, `/ip`. `GET /` returns help. Example: `GET /dns?domain=example.com&types=MX,TXT`.
- **Normal run:** pass `{ operation, domain | ip, types? }`; results land in the dataset + key-value store.
- **MCP tool:** expose it to your agent via Apify's MCP server.

### Input

- **operation** — `dns` · `whois` · `ip`.
- **domain** — for `dns` / `whois` (a full URL is accepted; the host is used).
- **types** — (dns) record types, e.g. `["A","MX","TXT"]`. Default: A, AAAA, MX, TXT, NS.
- **ip** — for `ip` (IPv4 or IPv6).

### Pricing

**Per query** from **$0.005** (down to $0.0015 on higher tiers). One call = one lookup (the `dns` op can return many record types at once).

### Related Actors

- **[Website Screenshot & PDF](https://apify.com/synthetic.ia/web-screenshot-pdf)** — render a page to an image or PDF.
- **[Currency Exchange](https://apify.com/synthetic.ia/currency-exchange)** — live ECB rates and conversion.

### FAQ

**Do I need a key?** No. DNS uses DNS-over-HTTPS (Google, with a Cloudflare fallback); whois/IP use RDAP via rdap.org.

**Why RDAP instead of whois?** RDAP is the IETF standard replacing legacy port-43 whois — it returns structured JSON with consistent fields. Some TLDs (e.g. a few ccTLDs) don't publish RDAP yet; those return a clear "no RDAP" message.

**Can it check SPF/DKIM/DMARC?** Yes — request the `TXT` record type (SPF/DMARC live in TXT; DKIM under its selector subdomain).

### Notes & limits

DNS answers reflect the resolver's view and TTLs. RDAP fields vary slightly by registry. IP lookups return network-level ownership (not street-level geolocation).

# Changelog

This Actor's version history is a separate document: https://apify.com/synthetic.ia/domain-dns-lookup/changelog.md

# Actor input Schema

## `operation` (type: `string`):

What to look up.

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

A domain name, e.g. example.com (a full URL is fine, the host is used).

## `types` (type: `array`):

DNS record types to resolve. Leave empty for A, AAAA, MX, TXT, NS.

## `ip` (type: `string`):

An IPv4 or IPv6 address, e.g. 8.8.8.8.

## Actor input object example

```json
{
  "operation": "dns",
  "domain": "github.com",
  "types": [
    "A",
    "AAAA",
    "MX",
    "TXT",
    "NS"
  ]
}
```

# Actor output Schema

## `result` (type: `string`):

No description

## `runs` (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 = {
    "domain": "github.com",
    "types": [
        "A",
        "AAAA",
        "MX",
        "TXT",
        "NS"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("synthetic.ia/domain-dns-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 = {
    "domain": "github.com",
    "types": [
        "A",
        "AAAA",
        "MX",
        "TXT",
        "NS",
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("synthetic.ia/domain-dns-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 '{
  "domain": "github.com",
  "types": [
    "A",
    "AAAA",
    "MX",
    "TXT",
    "NS"
  ]
}' |
apify call synthetic.ia/domain-dns-lookup --silent --output-dataset

```

## MCP server setup

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