WHOIS Data

Domain Expiration Checker: Protect Your Domain Portfolio

Never lose a domain to expiration again. Learn how to build automated domain expiration monitoring using WHOIS data and API integrations.

March 22, 202610 min readDeveloper Relations Team
2,000+
TLDs supported
Real-time
WHOIS tracking
25ms
Response time

Why Domain Expiration Monitoring Matters

Domain expiration is one of the most preventable yet devastating risks to any online business. When a domain expires, it can be registered by anyone, leading to brand impersonation, traffic theft, and data loss. The recovery process is expensive and time-consuming.

The Cost of Domain Expiration

Redemption fee:$200 - $2,000
Lost revenue during downtime:$1,000 - $100,000+
SEO ranking loss recovery:3-6 months
Brand reputation damage:Incalculable

What Happens When a Domain Expires

PhaseDurationWhat HappensRecovery Cost
Active1-10 yearsDomain works normallyStandard renewal
Grace Period0-45 daysDomain inactive, can renew at normal priceNormal + late fee
Redemption Period30 daysDomain in quarantine, expensive recovery$200 - $2,000
Pending Delete5 daysDomain being removed from registryVery difficult
Available-Anyone can registerLost

Using the WHOIS API for Expiration Tracking

1

Query Domain Expiration

curl -X GET "https://api.ops.tools/v1/whois?domain=example.com" \
  -H "Authorization: Bearer YOUR_API_KEY"
2

Parse the Response

{
  "domainName": "example.com",
  "expirationDate": "2026-08-13T04:00:00Z",
  "registrationDate": "1995-08-14T04:00:00Z",
  "daysUntilExpiration": 148,
  "registrar": "GoDaddy.com, LLC"
}

Automated Monitoring Scripts

Python

import requests

apiUrl = "https://api.ops.tools/v1/whois"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
domains = ["example.com", "yourdomain.com", "partner.com"]

for domain in domains:
    response = requests.get(apiUrl, headers=headers, params={"domain": domain})
    data = response.json()

    days = data.get("daysUntilExpiration", 0)
    if days <= 14:
        print(f"ALERT: {domain} expires in {days} days!")
    elif days <= 30:
        print(f"WARNING: {domain} expires in {days} days")
    else:
        print(f"OK: {domain} - {days} days remaining")

Node.js

const domains = ["example.com", "yourdomain.com"];
const headers = { "Authorization": "Bearer YOUR_API_KEY" };

for (const domain of domains) {
  const res = await fetch(
    `https://api.ops.tools/v1/whois?domain=${domain}`,
    { headers }
  );
  const data = await res.json();
  const days = data.daysUntilExpiration;

  if (days <= 30) console.log(`WARNING: ${domain} expires in ${days}d`);
  else console.log(`OK: ${domain} - ${days}d remaining`);
}

Best Practices

  • Set alerts at 90, 60, 30, and 14 days before expiration
  • Enable auto-renewal wherever possible (GDPR-compliant registrars)
  • Consolidate domains under one registrar for easier management
  • Use WHOIS privacy services where appropriate
  • Conduct quarterly portfolio audits to catch orphaned domains
  • Monitor registrar changes as potential security indicators

For more on WHOIS data, see our WHOIS Lookup API guide.

Frequently Asked Questions

Q: How do I check when a domain expires?

Use the Ops.Tools WHOIS Lookup API to query domain expiration dates. Send a request with the domain name, and the API returns the registration date, expiration date, and days remaining until expiry. Professional plans start at $29/month.

Q: What happens when a domain expires?

When a domain expires, it goes through phases: active period (renewal at normal price), grace period (renewal with late fee), redemption period (expensive recovery), pending delete, and finally becomes available for anyone to register. Recovery costs increase dramatically at each phase.

Q: How to automate domain expiration monitoring?

Use the WHOIS Lookup API to query expiration dates programmatically. Schedule daily checks, compare days remaining against thresholds (90, 60, 30, 14 days), and send alerts when domains approach expiration.

Q: What is reverse WHOIS lookup?

Reverse WHOIS lookup finds all domains associated with a specific registrant email, name server, or IP address. This is useful for competitive research, fraud investigation, and discovering all domains in a portfolio.

Related Articles

SSL & Security14 min read

SSL Certificate Checker: Complete Guide to SSL Verification

Learn how to check SSL certificate validity, understand SSL errors, and monitor certificate expiration. Includes automation examples with the Ops.Tools API.

Read Article
API Tutorials12 min read

DNS Lookup API: How to Check DNS Records Programmatically

Complete developer guide to querying DNS records via API. Includes working code examples in Python, Node.js, Go, and PHP with caching best practices.

Read Article
DNS Data16 min read

DNS Records Explained: A Complete Guide to All DNS Record Types

Master every DNS record type: A, AAAA, MX, CNAME, TXT, NS, SOA, PTR and more. Understand how DNS resolution works with practical examples.

Read Article

Start Monitoring Domain Expiration Dates

Automated WHOIS monitoring for your entire domain portfolio. Plans from $29/month.