agentsvc.io

services / whois

utilityoperational · 86 ms

WHOIS Lookup

Domain registration lookup via RDAP (modern WHOIS). Returns registrar, registrar_url, created_at, updated_at, expires_at, days_until_expiry, name_servers array, status array, and registrant_country. Clean JSON — no raw WHOIS text to parse. Covers all major TLDs.

Run free trial ↗3 free calls per day with the example input. Paid: $0.002 USDC, no limit.

Call it

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/whois", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({"domain":"github.com"}),
});
const { data, payment } = await res.json();  // payment.transaction = on-chain receipt

Input

FieldTypeDescription
domain *stringDomain to look up (e.g. 'github.com', 'openai.com'). Include TLD, exclude https://

Output

FieldTypeDescription
domainstringThe queried domain name
registrarstringDomain registrar name
registrar_urlstringRegistrar website URL
statusarrayDomain status codes (e.g. clientTransferProhibited)
created_atstringDomain registration date (ISO 8601)
updated_atstringLast updated date (ISO 8601)
expires_atstringDomain expiry date (ISO 8601)
days_until_expiryintegerDays remaining until domain expires (negative = already expired)
name_serversarrayNameservers for the domain
dnssecstringDNSSEC status (e.g. 'signedDelegation', 'unsigned')
registrant_countrystringRegistrant country code (if publicly available)

Example response (data)

{
  "domain": "github.com",
  "registrar": "MarkMonitor Inc.",
  "registrar_url": "http://www.markmonitor.com",
  "status": [
    "clientDeleteProhibited",
    "clientTransferProhibited",
    "clientUpdateProhibited"
  ],
  "created_at": "2007-10-09T18:20:50.000Z",
  "updated_at": "2024-09-08T09:18:28.000Z",
  "expires_at": "2026-10-09T18:20:50.000Z",
  "days_until_expiry": 548,
  "name_servers": [
    "dns1.p08.nsone.net",
    "dns2.p08.nsone.net",
    "ns-1283.awsdns-32.org",
    "ns-1707.awsdns-21.co.uk"
  ],
  "dnssec": "unsigned",
  "registrant_country": "US"
}