# Domain-Layer Against Origin-Layer Outage Triage Receipt (`kingii98/domain-layer-against-origin-layer-outage-triage-receipt`) Actor

Find which layer failed in an outage: registration hold, parking delegation, sinkhole DNS, TLS, or origin.

- **URL**: https://apify.com/kingii98/domain-layer-against-origin-layer-outage-triage-receipt.md
- **Developed by:** [kingii98](https://apify.com/kingii98) (community)
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$20.00 / 1,000 hostname_triages

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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-Layer Against Origin-Layer Outage Triage Receipt

This Actor finds which layer failed when a site is down. It gives one dataset row for each hostname.

### Failed-layer classes

The Actor checks the layers in this order. It reports the first layer that fails.

| Class | Meaning |
| --- | --- |
| `registration_hold` | RDAP shows `client hold`, `server hold`, `pending delete`, or `redemption period`. |
| `parking_delegation` | A nameserver or the SOA name matches a parking or suspension pattern. |
| `sinkhole_dns` | A resolver answer is loopback, unspecified, private, or reserved. |
| `dns_no_answer` | Both resolvers give no A or AAAA answer. |
| `tls` | The HTTPS probe through DNS fails in the TLS handshake. |
| `dns_path_mismatch` | HTTPS through DNS fails, but the origin answers when the hostname is forced. |
| `origin` | HTTPS through DNS fails, and no direct probe passes. |
| `none` | HTTPS through DNS returns the expected status. |
| `invalid_hostname` | The input hostname is not a valid public name. No charge. |
| `triage_error` | An unexpected error occurred for this hostname. No charge. |

### Input

| Field | Default | Limit |
| --- | --- | --- |
| `hostnames` | `["example.com"]` | Maximum 50. IP addresses and private names are rejected. |
| `known_origin_ips` | `{}` | Map of hostname to public IPs. Maximum 4 for each hostname. |
| `health_path` | `/` | Must start with `/`. |
| `expected_status` | `200` | 100 to 599. |

An empty input `{}` runs the default input and succeeds.

### Output

Each row has these fields:

- `hostname`, `failed_layer`, `evidence` (list of text lines), `checked_at`
- `rdap`: `status`, `last_changed`, `error`
- `nameservers`, `soa_owner`, `soa_mname`, `parking_match`
- `resolvers`: for `1.1.1.1` and `8.8.8.8`, the `rcode`, `a`, and `aaaa` answers
- `sinkhole`: true if any answer is loopback or non-public
- `https_via_dns`: probe result for the first public DNS answer
- `https_direct`: one probe result for each known origin IP, with the hostname forced
- `rejected_origin_ips`: input origin IPs that were not public

A failed gate, an unreachable target, or a zero-finding result is a dataset row. The run still succeeds.

### Billing event

The Actor calls `Actor.charge` once for each hostname triaged, with the event `hostname_triage` (count 1).

- Invalid hostnames and `triage_error` rows are not charged.
- If the charge limit is reached, the Actor stops and reports this in the status message.
- The Actor does not set a price. The price is set by the operator in the Apify Console.

### Safety limits

- HTTP only. No browser, proxy, LLM, paid API, database, or secret.
- Input: 50 hostnames, 4 origin IPs for each hostname, 5 hostnames in parallel.
- Each hostname: 1 RDAP request, up to 6 DNS queries, up to 5 HTTPS probes.
- HTTPS probe: 10 s timeout, no redirects, 64 KB read limit.
- RDAP: HTTPS only, 3 redirects at most, 256 KB limit. Each redirect target must be public.
- Probes connect only to public IPs. Loopback, private, and reserved addresses are never contacted.

### Limits and risks

- The parking pattern list in `src/classify.py` needs regular updates.
- The RDAP name is the SOA owner name, or the last two labels if no SOA exists. This can be wrong for some multi-label public suffixes.
- Redirect hosts for RDAP are checked by name, not by resolved address.
- Competition in the Store is unknown.

### Local use

```
uv run pytest
uv run ruff check .
```

# Actor input Schema

## `hostnames` (type: `array`):

Public hostnames to triage. Maximum 50. IP addresses and private names are rejected.

## `known_origin_ips` (type: `object`):

Optional. Map of hostname to a list of public origin IPs. Maximum 4 IPs for each hostname. Example: {"example.com": \["203.0.113.10"]}.

## `health_path` (type: `string`):

Path for the HTTPS probes. It must start with /.

## `expected_status` (type: `integer`):

HTTP status code that means healthy.

## Actor input object example

```json
{
  "hostnames": [
    "example.com"
  ],
  "known_origin_ips": {},
  "health_path": "/",
  "expected_status": 200
}
```

# Actor output Schema

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

One row for each hostname, with the failed layer and its evidence.

# 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 = {
    "hostnames": [
        "example.com"
    ],
    "known_origin_ips": {},
    "health_path": "/",
    "expected_status": 200
};

// Run the Actor and wait for it to finish
const run = await client.actor("kingii98/domain-layer-against-origin-layer-outage-triage-receipt").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 = {
    "hostnames": ["example.com"],
    "known_origin_ips": {},
    "health_path": "/",
    "expected_status": 200,
}

# Run the Actor and wait for it to finish
run = client.actor("kingii98/domain-layer-against-origin-layer-outage-triage-receipt").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 '{
  "hostnames": [
    "example.com"
  ],
  "known_origin_ips": {},
  "health_path": "/",
  "expected_status": 200
}' |
apify call kingii98/domain-layer-against-origin-layer-outage-triage-receipt --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kingii98/domain-layer-against-origin-layer-outage-triage-receipt"
        }
    }
}
```

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/MigybFN1GQjPqY4b2/builds/3TqIKKIWhilSbb787/openapi.json
