# Domain Lookup API - DNS, MX, SPF, Tech & Contact Emails (`centorprat/domain-lookup-dns-mx-email`) Actor

Domain lookup in one call: DNS A/AAAA, MX mail servers, NS, SPF/TXT, homepage title and tech hints, social profiles and public contact emails for any domain. Use it for lead enrichment, KYB checks and email deliverability. Keyless, bulk.

- **URL**: https://apify.com/centorprat/domain-lookup-dns-mx-email.md
- **Developed by:** [Centor Prat](https://apify.com/centorprat) (community)
- **Categories:** Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.55 / 1,000 domain analyzeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
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 Lookup API: DNS, MX, SPF, Tech & Contact Emails

**One call, DNS + the live homepage, one record.** Give a domain (or many) and get a single
structured intel record — **resolved IPs, mail (MX) & name servers, SPF, homepage title/description/
tech, social profile links, and public contact emails** — instead of juggling DNS tools and a crawler.

Headless · **keyless** (no API keys) · structured JSON out · built for AI agents.

### ⚡ Why it's different

Other actors give you *raw* DNS or *raw* page scrapes. This one **fuses** them into one agent-ready
record and judges it: does it resolve, does it run mail, does it expose contacts? Ask once.

### 📋 What you get (per domain)

| Field | Meaning |
|---|---|
| `resolves`, `dns.a`, `dns.aaaa` | Does it resolve + its IPv4/IPv6 |
| `dns.mx`, `hasMailServer` | Mail servers + a flag |
| `dns.ns`, `dns.spf`, `dns.txt` | Name servers, SPF record, TXT records |
| `homepage.title`, `.metaDescription`, `.canonical`, `.generator` | Live homepage metadata + tech hint |
| `techHints` | Detected stack hints (e.g. generator) |
| `social` | LinkedIn / Twitter(X) / Facebook / Instagram / YouTube / GitHub / TikTok links |
| `emails` | Public contact emails found on the homepage |
| `robotsTxt`, `sitemaps` | robots.txt presence + any declared sitemaps |
| `hasContacts` | True if emails or social links were found |

### 📥 Input

| Field | Type | Meaning |
|---|---|---|
| `domain` | string | A single domain, e.g. `apify.com` (scheme/path stripped) |
| `domains` | array | Many domains: `["apify.com","stripe.com"]` (billed per domain) |
| `includeEmails` | boolean | Extract public contact emails (default true; off to skip personal data) |
| `webhookUrl` | string | POST the records here (Zapier/Make/n8n/custom) |

**Example input**

```json
{ "domains": ["apify.com", "stripe.com"] }
```

### 📤 Output (one row per domain)

```json
{
  "domain": "apify.com", "resolves": true, "hasMailServer": true,
  "dns": { "a": ["99.84.9.10"], "mx": ["0 apify-com.mail.protection.outlook.com."],
           "ns": ["ns-1928.awsdns-49.co.uk."], "spf": "v=spf1 include:... -all", "txt": ["..."] },
  "homepage": { "finalUrl": "https://apify.com/", "statusCode": 200,
                "title": "Apify: Marketplace of ready-to-run tools for AI",
                "metaDescription": "...", "generator": null },
  "techHints": [], "social": [{"platform":"github","url":"https://github.com/apify"}],
  "emails": ["support@apify.com"], "robotsTxt": true, "sitemaps": ["https://apify.com/sitemap.xml"],
  "hasContacts": true, "sources": ["dns.google (DNS-over-HTTPS)", "apify.com (homepage)"],
  "capturedAt": "2026-..."
}
```

### 💰 Pricing (pay-per-event menu)

- **`domain-analyzed`** — base, charged per domain.
- **`contacts-found`** — premium, charged only when a domain yields emails/social (the high-value outcome).

### 💡 Use cases

- **Lead enrichment:** turn a list of domains into contacts + socials + tech in one call.
- **Due diligence / KYB:** does it resolve, run mail (MX/SPF), what's the stack, who to contact.
- **Agent tools:** give an outreach/research agent one call instead of DNS + crawl + parse glue.
- **Deliverability checks:** MX + SPF presence at a glance across many domains.

### 🤖 For AI agents (MCP)

Keyless, one call → a fused, structured record. Every input is described in the schema for
programmatic/MCP use. Example MCP server config:

```json
{
  "mcpServers": {
    "domain-intel": {
      "url": "https://mcp.apify.com/?tools=actors,docs,centorprat/domain-lookup-dns-mx-email"
    }
  }
}
```

**Claude Code:** `claude mcp add --transport http apify "https://mcp.apify.com/?tools=actors,docs,centorprat/domain-lookup-dns-mx-email" --header "Authorization: Bearer <YOUR_APIFY_TOKEN>"`

No extra setup: this Actor is callable from Claude, Cursor, ChatGPT or any MCP client through the Apify MCP server, and agents can find it on their own with the server's `search-actors` tool.

### 🚀 Ready-made tasks (one click)

Pre-configured runs for the most common jobs. Open one, change the input, run:

- [MX & SPF Records Checker (Bulk Domains)](https://apify.com/centorprat/domain-lookup-dns-mx-email/examples/mx-spf-records-checker): Bulk MX, SPF, TXT, NS and A record lookup for any list of domains. See which domains receive email and have SPF set up.
- [Find Contact Emails & Social Profiles from Domains](https://apify.com/centorprat/domain-lookup-dns-mx-email/examples/website-contact-email-finder): Get public contact emails, LinkedIn/X/Facebook links, homepage info and MX records for any list of company domains. Bulk enrichment.
- [Bulk DNS Lookup: A, MX, NS & TXT Records](https://apify.com/centorprat/domain-lookup-dns-mx-email/examples/bulk-dns-lookup): Resolve A, AAAA, MX, NS and TXT records for many domains in one call, with resolve/mail flags and homepage title. Keyless DNS API.

### ❓ FAQ

- **Do I need an API key?** No — DNS-over-HTTPS and the homepage fetch are keyless.
- **How many domains per run?** As many as you pass; billed per domain (plus the premium event when contacts are found).
- **Where do emails/social come from?** Only the domain's own public homepage HTML — no login, no third-party data.
- **Why didn't it find social/emails for site X?** Many sites load them via JavaScript or keep them off the homepage; this reads the homepage HTML only.
- **Does it follow redirects?** Yes (https first, then http), and reports the final URL + status.
- **Is the data stored?** No — fetched, composed, returned.
- **Commercial use?** The DNS and your-target homepage are public; see the note below on personal data.

### ⚠️ Personal data

`emails` may be personal data. Use it lawfully (e.g. legitimate B2B outreach, due diligence) and in
line with GDPR/CAN-SPAM and the target site's terms. This actor only reads a domain's own public
homepage; it stores nothing.

### 📜 Data & attribution

DNS via **Google Public DNS-over-HTTPS**; homepage data from the **target domain's own site**.
Public data, composed and returned; nothing stored.

### 🔗 Related actors

Part of one suite of keyless, agent-ready composers by the same developer:

- [Shopify Store Leads + App Audit (Reviews, Email, Pixels)](https://apify.com/centorprat/shopify-store-leads-app-audit): Shopify stores by niche, verified and audited for missing apps (reviews, email/SMS, upsell, loyalty, chat, subscriptions), pixels and theme: scored leads with emails.
- [Google Maps Leads + Website Audit for Agencies](https://apify.com/centorprat/google-maps-leads-website-audit): local businesses from Google Maps audited for website, Google profile, reviews, booking and tracking gaps: scored, explained leads with phone and emails.
- [FEMA Flood Zone & Property Risk API - Zillow/Redfin Enricher](https://apify.com/centorprat/fema-flood-zone-property-risk): FEMA flood zone + 18-hazard FEMA risk index + neighborhood demographics per US address, or for a whole Zillow/Redfin dataset.
- [Wikipedia & Wikidata API - Entity Facts, Summary & Pageviews](https://apify.com/centorprat/wikipedia-wikidata-api): Wikipedia + Wikidata + pageviews → one structured brief per company, person or place.
- [Country Economic Data API - World Bank GDP, FX & Holidays](https://apify.com/centorprat/world-bank-country-economic-data): World Bank + FX + public holidays → one market brief per country.
- [Weather, Air Quality & Earthquake Risk API by Location](https://apify.com/centorprat/weather-air-quality-earthquake-api): live weather + air quality + earthquakes → one clear/caution/hazard verdict per point, worldwide.
- [Aircraft Tracker API (ADS-B) - Approach & Military Alerts](https://apify.com/centorprat/aircraft-tracker-adsb): aircraft approaching a point with CPA/ETA + military/unidentified flags and alerts.
- [NARA Catalog Extractor](https://apify.com/centorprat/nara-catalog-extractor): US National Archives catalog search → digital-object download URLs + metadata.

# Actor input Schema

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

A single domain (scheme/path are stripped). Example: apify.com

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

An array of domains, e.g. \["apify.com","stripe.com"]. Billed per domain.

## `includeEmails` (type: `boolean`):

Extract public contact emails from the homepage. Turn off to skip personal data (privacy/compliance).

## `webhookUrl` (type: `string`):

If set, the records are POSTed here as JSON (Zapier/Make/n8n/custom).

## Actor input object example

```json
{
  "domain": "apify.com",
  "includeEmails": true
}
```

# Actor output Schema

## `records` (type: `string`):

One fused record per domain: DNS (A/AAAA/MX/NS/SPF), mail-server flag, homepage (title/description/tech), social profile links, public contact emails, robots.txt + sitemaps.

# 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": "apify.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("centorprat/domain-lookup-dns-mx-email").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": "apify.com" }

# Run the Actor and wait for it to finish
run = client.actor("centorprat/domain-lookup-dns-mx-email").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": "apify.com"
}' |
apify call centorprat/domain-lookup-dns-mx-email --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,centorprat/domain-lookup-dns-mx-email"
        }
    }
}
```

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/0chI8THUphr6chmRa/builds/fGrHnzO2X3eCEcN3l/openapi.json
