# Domain DNS Lookup & Trust Risk Checker (`chun_yung_lo/domain-dns-trust-checker`) Actor

Resolve A, AAAA, MX, NS, TXT, SPF, DMARC and CAA records for up to 25 domains and get a transparent 0-100 risk score with named reasons. Built for AI agents and automation.

- **URL**: https://apify.com/chun_yung_lo/domain-dns-trust-checker.md
- **Developed by:** [Chun-Yung Yong Lo](https://apify.com/chun_yung_lo) (community)
- **Categories:** Developer tools, Agents, MCP servers
- **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 $5.00 / 1,000 domains batch checked

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/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 & Trust Risk Checker

Check whether a domain looks real and how risky it looks, in one call. Give up to 25 domains or URLs and get back the DNS records (A, AAAA, MX, NS), email-security flags (SPF, DMARC policy, CAA) and a transparent 0-100 risk score with the named reasons behind it.

No login, no personal data, no scraping. It only asks public DNS.

### What it checks

- Live DNS: does the domain exist (NXDOMAIN gives status `not_found`), does it have address or mail records, SPF, DMARC and CAA.
- Offline name checks: punycode/IDN names, mixed scripts inside one label (homograph look-alikes), TLDs often abused, many hyphens, many digits, very long names, deep subdomain chains.

The risk score is a transparent heuristic, not a verdict and not a blocklist or reputation lookup. Every point in the score is listed in `riskSignals`. Domain age (WHOIS/RDAP) is not included.

### Input example

```json
{"domains": ["example.com", "https://www.github.com/login"], "checkDns": true}
```

- `domains` (required): 1 to 25 domain names or URLs. Scheme, path and port are stripped. IP addresses, emails and single-label names return `invalid_input`.
- `checkDns` (default true): set false for offline name checks only (fast, no network).

### Output example

```json
{
  "domain": "example.com",
  "normalizedDomain": "example.com",
  "status": "ok",
  "dnsChecked": true,
  "aRecords": ["93.184.216.34"],
  "aaaaRecords": [],
  "mxRecords": ["0 ."],
  "nsRecords": ["a.iana-servers.net", "b.iana-servers.net"],
  "hasSpf": true,
  "hasDmarc": false,
  "dmarcPolicy": null,
  "hasCaa": false,
  "riskScore": 0,
  "riskLevel": "low",
  "riskSignals": [],
  "summary": "Low risk (0/100): no risk signals found",
  "error": null
}
```

`status` is one of `ok`, `invalid_input`, `not_found` (domain does not exist) or `dns_error` (lookup failed or timed out, so nothing can be concluded). Actual records vary over time.

`riskLevel`: low (0-24), medium (25-49), high (50-100), or unknown for invalid input.

### Pricing

US$0.005 per call (one batch of up to 25 domains).

### Limits

- Max 25 domains per call, max 20 records listed per type.
- Uses the public DNS resolver of the runtime; each query times out after about 4 seconds.
- Registrable-domain detection is simple (no Public Suffix List), so unusual multi-part TLDs may be approximated.
- A risk score does not prove a domain is safe or malicious.

### For AI agents (MCP)

This Actor runs as an MCP tool through Apify's MCP server. Copy-paste input:

```json
{"domains": ["example.com"], "checkDns": true}
```

One call checks the whole list and costs US$0.005. Every row has a `status` field so you can tell `not_found` (domain does not exist) from `dns_error` (lookup failed) and `invalid_input` (bad entry). Field names are stable camelCase. Read `riskLevel` for a quick decision and `riskSignals` for the reasons.

### Credits

Built on [idna](https://github.com/kjd/idna) (BSD-3-Clause) for internationalized domain names and [dnspython](https://github.com/rthalley/dnspython) (ISC-style license, as stated in its documentation) for DNS resolution.

# Actor input Schema

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

List of 1 to 25 domain names or URLs, for example example.com or https://www.example.com/page. Scheme, path and port are stripped. IP addresses, email addresses and single-label names are reported as invalid_input. Internationalized names (IDN) are accepted.

## `checkDns` (type: `boolean`):

If true (default), query DNS for A, AAAA, MX, NS, TXT, CAA and DMARC records. If false, only offline checks run (syntax, punycode, mixed scripts, TLD, name shape).

## Actor input object example

```json
{
  "domains": [
    "example.com",
    "github.com"
  ],
  "checkDns": true
}
```

# Actor output Schema

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

One row per processed input

# 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",
        "github.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("chun_yung_lo/domain-dns-trust-checker").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",
        "github.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("chun_yung_lo/domain-dns-trust-checker").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",
    "github.com"
  ]
}' |
apify call chun_yung_lo/domain-dns-trust-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,chun_yung_lo/domain-dns-trust-checker"
        }
    }
}
```

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/Ox5GtXD67dd6bN8t1/builds/Y0BBs01a4UtUN3MLe/openapi.json
