# Domain Risk Signals — Agent Safety Check (`zekrom/domain-risk-signals`) Actor

Returns structured trust and risk signals for a domain: registration age, DNS posture, TLS certificate facts and live HTTP behaviour. Built for AI agents that need to vet a link before visiting it.

- **URL**: https://apify.com/zekrom/domain-risk-signals.md
- **Developed by:** [Tufan Yilmazer](https://apify.com/zekrom) (community)
- **Categories:** Agents, MCP servers, AI
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 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/platform/actors/running/actors-in-store#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

## Domain Risk Signals — Agent Safety Check

Give it a domain or a URL, get back structured trust signals: how old the registration is, whether DNS and mail are set up like a real operation, whether TLS actually validates, and what the live HTTP response does.

Built for AI agents that hit a link and need to decide *before* fetching it. One call per domain, plain JSON out, no account or API key on the target side.

### What it answers

- **How old is this domain?** Registration date straight from the registry over RDAP. A domain created nine days ago is a different proposition to one created in 2009.
- **Is it set up like a real business?** MX records, SPF, nameservers, resolvable A/AAAA.
- **Does TLS actually validate?** Issuer, validity window, and whether the chain is trusted — not just "is there a padlock".
- **Where does it really send you?** Full redirect chain, final URL, and a flag when it leaves the host you asked about.
- **Is the registry unhappy with it?** `clientHold`, `serverHold`, `pendingDelete` and similar states.

### Output

One dataset record per domain:

```json
{
  "domain": "example.com",
  "riskScore": 15,
  "riskLevel": "low",
  "signals": [
    { "code": "no_mail_records", "detail": "no MX record on the registrable domain", "weight": 10 },
    { "code": "no_spf", "detail": "no SPF record", "weight": 5 }
  ],
  "domainAgeDays": 10847,
  "registeredAt": "1995-08-14T04:00:00.000Z",
  "registrar": "RESERVED-Internet Assigned Numbers Authority",
  "resolves": true,
  "hasMx": false,
  "tlsValid": true,
  "tlsIssuer": "DigiCert Inc",
  "httpStatus": 200,
  "httpFinalUrl": "https://example.com/"
}
```

`riskScore` runs 0–100 and is **additive and fully explained**: every point that lands on the score appears in `signals` with its own weight. Nothing is hidden, so an agent can apply its own threshold or ignore the score entirely and reason from the raw signals.

`riskLevel` is a convenience bucket: `low` under 30, `medium` 30–59, `high` 60+.

### Input

| Field | Type | Default | Meaning |
|---|---|---|---|
| `domains` | array of strings | — | Domains or full URLs. URLs are reduced to their hostname. |
| `checkHttp` | boolean | `true` | Set `false` for a passive check with no request to the target. |
| `timeoutMs` | integer | `8000` | Per-lookup timeout. |

### What this is not

It is not a malware scanner and not a blocklist. It reports **observable facts about how a domain is set up**, plus a transparent score built from them. A brand-new domain with no mail records and a week-old certificate is not proof of anything — it is a reason for an agent to be careful. Treat the output as evidence, not a verdict.

### Notes

- Registration data comes from RDAP, the registries' own structured protocol. Some ccTLDs publish little or nothing; when that happens you get `registration_unknown` rather than a guess.
- With `checkHttp: false` nothing is sent to the target's web server at all.
- Domains are checked concurrently, so a list of a few hundred finishes quickly.

# Actor input Schema

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

Domains or full URLs to check. Full URLs are reduced to their hostname.

## `checkHttp` (type: `boolean`):

Issue a live request to observe status code, redirect chain and server headers. Disable for a passive, lower-latency check.

## `timeoutMs` (type: `integer`):

Maximum time to wait for each individual network lookup.

## Actor input object example

```json
{
  "domains": [
    "example.com"
  ],
  "checkHttp": true,
  "timeoutMs": 8000
}
```

# 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"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("zekrom/domain-risk-signals").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"] }

# Run the Actor and wait for it to finish
run = client.actor("zekrom/domain-risk-signals").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"
  ]
}' |
apify call zekrom/domain-risk-signals --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zekrom/domain-risk-signals"
        }
    }
}

```

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/p1QNhJvRqSRgtNPcc/builds/FCuhAcHLLfZWbVK2g/openapi.json
