# RDAP Bootstrap Coverage and Server Conformance Ledger by TLD (`kingii98/rdap-bootstrap-coverage-and-server-conformance-ledger-by-tld`) Actor

Check which TLDs have an RDAP server in the IANA bootstrap file, which servers answer correctly, and what a 404 means for each server.

- **URL**: https://apify.com/kingii98/rdap-bootstrap-coverage-and-server-conformance-ledger-by-tld.md
- **Developed by:** [kingii98](https://apify.com/kingii98) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 tld_checks

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

## RDAP Bootstrap Coverage and Server Conformance Ledger by TLD

This Actor checks RDAP (Registration Data Access Protocol) coverage for each TLD (top-level domain).
It helps lookup code avoid one error: a registered domain that the code reports as free.

For each TLD, the Actor answers these questions:

- Does the IANA bootstrap file (`https://data.iana.org/rdap/dns.json`) list an RDAP server?
- Does the server answer 200 for a known-registered name?
- Does the server answer 404 for a random name?
- What does a 404 mean for this server?

### Input

| Field | Default | Meaning |
| --- | --- | --- |
| `tlds` | `["com","net","org"]` | TLDs to check. |
| `domains` | `[]` | Domains. The Actor reduces each domain to its TLD. |
| `probe_domain_overrides` | `example.com`, `example.net`, `example.org` | Known-registered name for each TLD. |
| `timeout_seconds` | `10` | Timeout for each request. Range: 1 to 30. |
| `compare_with_previous_run` | `true` | Write change records against the previous run. |

Limits: maximum 300 TLDs for each run. The Actor ignores TLDs above this limit.
An invalid TLD gets no row. A run with empty input uses the defaults and succeeds.

Without an override, the probe name is `nic.<tld>`. This is an assumption.
It can be wrong for some TLDs. Set `probe_domain_overrides` for those TLDs.

### Output

The default dataset has one row for each TLD (`record_type` = `tld`):

- `tld`, `bootstrap_present`, `server_url`, `probe_domain`
- `known_status`: HTTP status for the known-registered name
- `random_status`: HTTP status for a random name
- `redirect_chain`: URLs visited for the known name
- `rate_limit_headers`: rate-limit and `retry-after` headers
- `has_expiration_event`, `has_registrar_entity`
- `response_ms`: response time for the known name
- `class`: one of the values below
- `error`: error text, or `null`

| Class | Meaning |
| --- | --- |
| `usable` | Known name gives 200. Random name gives 404. |
| `ambiguous_not_found` | Any other pair of statuses. A 404 for a known name does not prove that the name is free. |
| `no_rdap_server` | The bootstrap file has no entry for the TLD. A 404 from a redirector does not mean "not registered". |
| `unreachable` | A request failed, timed out, or went to a blocked target. |

When a value differs from the previous run, the Actor writes a change record
(`record_type` = `change`) with `tld`, `field`, `previous`, and `current`.

A bad verdict never fails the run. If the bootstrap file cannot load, each row has class `unreachable`
and an `error` that starts with `bootstrap:`. The Actor does not charge for these rows.

### State

The Actor keeps one record for each user in the named key-value store `rdap-ledger-state`.
The record holds the previous row for each TLD. The Actor uses no external database.

### Pricing event

Pay-per-event. The Actor makes one `Actor.charge` call for the event `tld_check` for each TLD checked
(one row written, count 1). The contract proposal is USD 0.005 for each event.
The cost estimate is USD 0.0008 for each TLD. This is an estimate, not a measured value.
The default maximum charge in the proposal is USD 1.5. The Actor stops when the charge limit is reached.
This repository does not set the price. Set it in the Apify Console.

### Safety limits

- HTTP only. No browser, proxy, or paid API.
- The Actor rejects URLs with a private, loopback, link-local, or reserved address.
  It also rejects URLs with credentials. It checks each redirect target.
- Limits: 300 TLDs, 3 redirects, 2 MB for each response, 30 s total deadline for each request (guard, redirects, and body), 10 parallel TLDs.
- Known limit: the DNS check and the HTTP connection use separate lookups.

### Repeat triggers

Use an Apify schedule for a weekly run. Each change of the IANA bootstrap file needs an external trigger.
The Actor does not watch the file.

### Development

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

# Actor input Schema

## `tlds` (type: `array`):

TLDs to check, for example com or xn--p1ai. Maximum 300 for each run.

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

Optional domains. The Actor reduces each domain to its TLD and adds it to the TLD list.

## `probe_domain_overrides` (type: `object`):

Optional known-registered name for each TLD, for example {"com": "example.com"}. Without an override, the Actor uses nic.<tld>.

## `timeout_seconds` (type: `integer`):

Timeout for each HTTP request. Allowed range: 1 to 30.

## `compare_with_previous_run` (type: `boolean`):

When true, the Actor writes a change record for each value that differs from the previous run.

## Actor input object example

```json
{
  "tlds": [
    "com",
    "net",
    "org"
  ],
  "domains": [],
  "probe_domain_overrides": {
    "com": "example.com",
    "net": "example.net",
    "org": "example.org"
  },
  "timeout_seconds": 10,
  "compare_with_previous_run": true
}
```

# Actor output Schema

## `ledger` (type: `string`):

Dataset with TLD rows and change records.

## `changes` (type: `string`):

Change records against the previous run.

# 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 = {
    "tlds": [
        "com",
        "net",
        "org"
    ],
    "probe_domain_overrides": {
        "com": "example.com",
        "net": "example.net",
        "org": "example.org"
    },
    "timeout_seconds": 10,
    "compare_with_previous_run": true
};

// Run the Actor and wait for it to finish
const run = await client.actor("kingii98/rdap-bootstrap-coverage-and-server-conformance-ledger-by-tld").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 = {
    "tlds": [
        "com",
        "net",
        "org",
    ],
    "probe_domain_overrides": {
        "com": "example.com",
        "net": "example.net",
        "org": "example.org",
    },
    "timeout_seconds": 10,
    "compare_with_previous_run": True,
}

# Run the Actor and wait for it to finish
run = client.actor("kingii98/rdap-bootstrap-coverage-and-server-conformance-ledger-by-tld").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 '{
  "tlds": [
    "com",
    "net",
    "org"
  ],
  "probe_domain_overrides": {
    "com": "example.com",
    "net": "example.net",
    "org": "example.org"
  },
  "timeout_seconds": 10,
  "compare_with_previous_run": true
}' |
apify call kingii98/rdap-bootstrap-coverage-and-server-conformance-ledger-by-tld --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kingii98/rdap-bootstrap-coverage-and-server-conformance-ledger-by-tld"
        }
    }
}
```

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/d2ZKS02DLyEYEknz2/builds/lFEpr3AQIKNX0Onqr/openapi.json
