SFOLN

Demos / Domain WHOIS & DNS Lookup

Watch a domain portfolio for expiries, DNS changes and mail gaps

Halvorsen Freight Group owns a few dozen domains bought over fifteen years by IT, marketing, a German subsidiary and a recruiting agency. Renewal notices go to mailboxes of people who have left, and nobody notices a lapsed domain until a payment link breaks or someone else registers it. The IT team now keeps one list and runs it every Monday at 06:00. Each domain comes back with its registration, DNS, certificate and mail records; the watch compares them with its thresholds and with last week's snapshot, and sends one digest with only the items that need a decision.

Workflow

Where the API sits

  1. Trigger

    Monday 06:00 schedule

    The run starts with the domain list IT maintains in the asset register.

  2. API call

    Check every domain

    One call returns registration (RDAP), DNS, certificate and homepage data per domain. An unregistered domain comes back not_found at no charge.

    sfoln/domain-intelligence

  3. Your logic

    Thresholds and diff

    Flag whois.daysUntilExpiry under 90, sslDaysUntilExpiry under 14, missing spfRecord or weak dmarcPolicy; compare registrar and nameservers with last week's snapshot.

  4. Result

    Digest and tickets

    The dashboard updates, IT gets one e-mail sorted by urgency, and each finding becomes a ticket.

A scheduled run on Apify (or a cron job calling the API) with the domain list as input. A short script reads the dataset, compares each record with the previous run kept in the team's own store, opens tickets and sends the digest. The list can hold thousands of domains per run, so the same watch covers customer or brand-protection portfolios.

Result

Monday's portfolio view and the digest

Domain watchPortfolio · Halvorsen Freight Grouprun of Mon 9 Nov, 06:00

Domains watched

6

5 checked, 1 not registered

Act this week

3

Lapsed, expiring, certificate

Review

2

Nameserver change, mail records

Healthy

1

Company domains · 6 watched · thresholds: registration 30 / 90 days, certificate 14 days
Domain / registrarRegistration expiresCertificateNameserversMail authenticationFlags
hfgpay.examplewas Kestrel Domains Ltd. last week
Not registeredavailable: true
———Lapsed: open to anyone
halvorsen-logistics.exampleKestrel Domains Ltd.
27 Nov 202618 days
104 dayskestreldns.example
GoogleSPF -all · DMARC quarantine
Expires in 18 days
halvorsenfreight-de.exampleKestrel Domains Ltd.
30 May 2028568 days
6 dayskestreldns.example
MicrosoftSPF ~all · DMARC none
Certificate: 6 daysDMARC not enforced
halvorsentracking.exampleKestrel Domains Ltd.
2 Aug 2027266 days
114 daysedgegrid-dns.example
No mail (null MX)SPF -all · DMARC reject
Nameservers changed
hfg-careers.exampleNordreg AB
20 Jan 202772 days
61 daysnordreg.example
GoogleSPF missing · DMARC missing
Expires in 72 daysNo SPF, no DMARC
halvorsenfreight.exampleKestrel Domains Ltd.
14 Mar 20311,586 days
61 dayskestreldns.example
GoogleSPF -all · DMARC reject
Healthy

Change since last week · halvorsentracking.example

 registrar    Kestrel Domains Ltd.
-nameservers  ns1.kestreldns.example, ns2.kestreldns.example
+nameservers  ns1.edgegrid-dns.example, ns2.edgegrid-dns.example
-updatedAt    2025-08-03
+updatedAt    2026-11-05
Registry record updated
5 Nov 2026
Now delegated to
ns1.edgegrid-dns.example, ns2.edgegrid-dns.example
Certificate issuer
WE1

The removed lines come from the watch's own snapshot of the 2 Nov run; the API reports the current state. If no change ticket matches, treat it as a possible hijack.

Mail authentication gap · hfg-careers.example

Mailbox provider
Google
MX
aspmx.l.google.com
SPF record
none published missing
DMARC policy
none published missing
Registrar
Nordreg AB (not the corporate registrar)

The domain receives mail but anyone can send as it. Suggested records are in the ticket.

Five domains checked and charged; the unregistered one was reported at no cost. Changes are found by comparing with the watch's own snapshot of the previous run.
MailInbox · it-opsMon 9 Nov, 06:02
From
Domain watch <domain-watch@halvorsenfreight.example>
To
it-ops@halvorsenfreight.example
Subject
Domain watch, week 46: 3 to act on, 2 to review, 6 domains
Open dashboardSnooze a finding

Highlighted values are read from the API response. The data is a sample in the API's real output shape; names and figures are illustrative.

Call

The call behind it

One request with this input produces the 6 records the screen above is drawn from. Prices are the ones on the API page; records that fail or come back empty are not charged.

Input · POST /v2/actors/sfoln~domain-intelligence/run-sync-get-dataset-items
{
  "domains": [
    "halvorsenfreight.example",
    "halvorsen-logistics.example",
    "halvorsenfreight-de.example",
    "halvorsentracking.example",
    "hfg-careers.example",
    "hfgpay.example"
  ],
  "checkTls": true,
  "checkHomepage": true
}
First record of 6
Response · record 1 of 6 · sample data
{
  "input": "halvorsenfreight.example",
  "domain": "halvorsenfreight.example",
  "registrableDomain": "halvorsenfreight.example",
  "registrar": "Kestrel Domains Ltd.",
  "createdAt": "2009-03-14T10:22:05Z",
  "expiresAt": "2031-03-14T10:22:05Z",
  "domainAgeDays": 6449,
  "mailProvider": "google",
  "spfRecord": "v=spf1 include:_spf.google.com include:mail.halvorsen-notify.example -all",
  "dmarcPolicy": "reject",
  "sslIssuer": "R11",
  "sslValidTo": "2027-01-09T12:00:00.000Z",
  "sslDaysUntilExpiry": 61,
  "finalUrl": "https://www.halvorsenfreight.example/",
  "title": "Halvorsen Freight Group",
  "securityHeaders": {
    "grade": "B",
    "score": 85,
    "present": [
      "Strict-Transport-Security",
      "Content-Security-Policy",
      "X-Frame-Options",
      "X-Content-Type-Options",
      "Referrer-Policy"
    ],
    "missing": [
      "Permissions-Policy"
    ]
  },
  "whois": {
    "registrar": "Kestrel Domains Ltd.",
    "registrarIanaId": "9941",
    "updatedAt": "2026-02-11T08:14:30Z",
    "daysUntilExpiry": 1586,
    "statuses": [
      "client transfer prohibited",
      "client delete prohibited"
    ],
    "nameservers": [
      "ns1.kestreldns.example",
      "ns2.kestreldns.example"
    ],
    "dnssec": true,
    "registrantOrganization": "Halvorsen Freight Group AS",
    "registrantCountry": "NO",
    "abuseEmail": "abuse@kestreldomains.example"
  },
  "dns": {
    "a": [
      "203.0.113.20"
    ],
    "mx": [
      {
        "priority": 1,
        "exchange": "aspmx.l.google.com"
      }
    ],
    "ns": [
      "ns1.kestreldns.example",
      "ns2.kestreldns.example"
    ],
    "spf": {
      "record": "v=spf1 include:_spf.google.com include:mail.halvorsen-notify.example -all",
      "allQualifier": "-all",
      "includes": [
        "_spf.google.com",
        "mail.halvorsen-notify.example"
      ],
      "multipleRecords": false
    },
    "dmarc": {
      "record": "v=DMARC1; p=reject; rua=mailto:dmarc@halvorsenfreight.example",
      "policy": "reject",
      "subdomainPolicy": "reject",
      "pct": 100,
      "rua": [
        "mailto:dmarc@halvorsenfreight.example"
      ]
    },
    "hasMx": true,
    "nxdomain": false
  },
  "tls": {
    "issuer": "R11",
    "issuerOrganization": "Let's Encrypt",
    "subjectCommonName": "halvorsenfreight.example",
    "sanCount": 2,
    "validTo": "2027-01-09T12:00:00.000Z",
    "daysUntilExpiry": 61,
    "expired": false,
    "coversHost": true,
    "trusted": true,
    "protocol": "TLSv1.3"
  },
  "registered": true,
  "available": false,
  "httpStatus": 200,
  "sections": {
    "rdap": "ok",
    "dns": "ok",
    "tls": "ok",
    "http": "ok"
  },
  "status": "ok",
  "charged": true,
  "chargedEvent": "domain-intelligence",
  "source": "public-rdap-dns-tls",
  "fetchedAt": "2026-11-09T06:00:41.000Z",
  "warnings": []
}
Charged eventCountPriceTotal
Domain report
domain-intelligence
5$0.003$0.015
This run$0.015

Fields

Which output fields do the work

Output fieldUsed for
expiresAt whois.daysUntilExpiry registrarRegistration countdown and where to renew; under 30 days is an alert, under 90 a warning.
registered available status errorA domain that comes back not_found with available: true has lapsed and can be taken by anyone: the top alert.
whois.nameservers whois.updatedAt whois.statusesCompared with last week's snapshot; a delegation change without a ticket is escalated.
sslValidTo sslDaysUntilExpiry sslIssuer tlsCertificate countdown; catches a failed automatic renewal before browsers do.
mailProvider spfRecord dmarcPolicy dnsDomains with a mailbox provider but no SPF, or with DMARC missing or none, are listed as spoofable.
securityHeaders httpStatus finalUrlShown on the domain detail page: where the domain redirects and its header grade.
sections warningsA failed check (registry not answering, DNS SERVFAIL) is shown as "not checked" instead of as healthy.

All output fields are listed on the API page.

Build

Build it

The Monday job: run the list, derive findings from thresholds and from the previous snapshot, then store this week's snapshot.

Node.js · weekly job
const res = await fetch('https://api.apify.com/v2/actors/sfoln~domain-intelligence/run-sync-get-dataset-items', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.APIFY_TOKEN}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ domains: await assets.listDomains() }),
});

const findings = [];
for (const d of await res.json()) {
  const last = await snapshots.get(d.domain); // our own copy of the previous run
  const flag = (level, text) => findings.push({ domain: d.domain, level, text });

  if (d.status === 'not_found' && d.available) { flag('alert', 'Not registered: anyone can take it'); continue; }
  if (d.status !== 'ok') { flag('warn', `Not checked: ${d.error?.code}`); continue; }

  const left = d.whois?.daysUntilExpiry;
  if (left != null && left < 90) flag(left < 30 ? 'alert' : 'warn', `Registration expires in ${left} days`);
  if (d.sslDaysUntilExpiry != null && d.sslDaysUntilExpiry < 14) flag('alert', `Certificate expires in ${d.sslDaysUntilExpiry} days`);
  if (d.mailProvider && d.mailProvider !== 'none' && !d.spfRecord) flag('warn', 'No SPF record');
  if (!d.dmarcPolicy || d.dmarcPolicy === 'none') flag('warn', 'DMARC missing or not enforced');
  if (last && last.registrar !== d.registrar) flag('alert', `Registrar changed to ${d.registrar}`);
  if (last && String(last.nameservers) !== String(d.whois?.nameservers)) flag('warn', 'Nameservers changed');

  await snapshots.put(d.domain, { registrar: d.registrar, nameservers: d.whois?.nameservers, expiresAt: d.expiresAt });
}
await digest.send('it-ops', findings);
  • The API reports the current state of each domain. "Changed since last week" always comes from comparing with your own stored copy of the previous run.
  • Some registries redact or do not publish registration data; then expiresAt is null and sections.rdap says why. Treat it as "unknown", not as healthy.
  • For subdomains, registration data is looked up for the registrable domain while DNS, certificate and homepage are checked for the host given.

Authentication, the MCP endpoint and the asynchronous variant are on the API page.

More

Other things teams build with it

  • Brand protection: check look-alike domains weekly and alert when one becomes registered or starts receiving mail
  • Vendor security reviews: SPF, DMARC, certificate and header grade for every supplier domain
  • Mergers and audits: a one-off inventory of who registered what, where, and when it expires
  • Lead enrichment: domain age and mailbox provider as signals on a company record

Related demos

All demos · Domain WHOIS & DNS Lookup: prices, input and output · /actors/domain-intelligence.json carries this demo as demo