Docs🌐 WebDomain & SSL Checker
POST/api/domain-check$0.005

🌐 Domain & SSL Checker

Inspect any domain's infrastructure in one call. Resolves all major DNS record types (A, AAAA, MX, NS, TXT, CNAME) and probes the SSL/TLS certificate to report issuer, subject, expiry date, days remaining, and protocol version. Useful for monitoring, pre-launch checks, and competitor research.

Request Body

ParameterTypeRequiredDescriptionDefault
domainstringrequiredDomain to check (e.g. example.com or https://example.com — protocol and path are stripped automatically)

Response Fields

FieldTypeDescription
domainstringCleaned domain that was checked
ipstring | nullPrimary IP address (first A or AAAA record)
reachablebooleanTrue if at least one A or AAAA record was found
sslobjectSSL certificate info: valid, issuer, subject, expires, daysRemaining, protocol, error?
dnsobjectAll DNS records: a[], aaaa[], mx[], ns[], txt[][], cname
checkedAtstringISO 8601 timestamp of when the check was performed

Code Examples

cURL
bash
curl -X POST https://sparkforge.sh/api/domain-check \
  -H "Content-Type: application/json" \
  -H "X-PAYMENT: <x402-payment-token>" \
  -d '{"domain": "sparkforge.sh"}'
Python
python
import requests

response = requests.post(
    "https://sparkforge.sh/api/domain-check",
    headers={
        "Content-Type": "application/json",
        "X-PAYMENT": "<x402-payment-token>"
    },
    json={"domain": "sparkforge.sh"}
)

data = response.json()
ssl = data["ssl"]
print(f"IP: {data['ip']} | Reachable: {data['reachable']}")
print(f"SSL: {ssl['valid']} — expires in {ssl['daysRemaining']} days ({ssl['issuer']})")
print(f"MX: {[r['exchange'] for r in data['dns']['mx']]}")
TypeScript / Node.js
typescript
import { wrapFetchWithPayment } from "@x402/fetch";

const fetch402 = wrapFetchWithPayment(fetch, wallet);

const res = await fetch402("https://sparkforge.sh/api/domain-check", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ domain: "sparkforge.sh" }),
});

const { domain, ip, reachable, ssl, dns, checkedAt } = await res.json();
console.log(`${domain}: ${reachable ? "✅ reachable" : "❌ unreachable"}, SSL ${ssl.daysRemaining}d remaining`);

Example Response

json
{
  "domain": "sparkforge.sh",
  "ip": "76.76.21.21",
  "reachable": true,
  "ssl": {
    "valid": true,
    "issuer": "Let's Encrypt",
    "subject": "sparkforge.sh",
    "expires": "2026-04-29T12:00:00.000Z",
    "daysRemaining": 60,
    "protocol": "TLSv1.3"
  },
  "dns": {
    "a": ["76.76.21.21"],
    "aaaa": [],
    "mx": [{ "exchange": "route1.mx.cloudflare.net", "priority": 68 }],
    "ns": ["ada.ns.cloudflare.com", "adi.ns.cloudflare.com"],
    "txt": [["v=spf1 include:_spf.google.com ~all"]],
    "cname": null
  },
  "checkedAt": "2026-02-28T16:00:00.000Z"
}

💳 Payment via x402

This endpoint costs $0.005 per call, paid in USDC on Base, Polygon, or Solana. Use the @x402/fetch library to handle payments automatically, or implement the x402 handshake manually.

bash
# Free demo mode (no payment)
curl https://sparkforge.sh/api/domain-check?demo=true

# Or try via MCP (Claude Desktop, Cursor, Windsurf)
# Add to mcp config: { "url": "https://sparkforge.sh/api/mcp" }
Previous
Email Verifier
Next
Web Search