DEV Community

Alexey D
Alexey D

Posted on

Domain WHOIS API: Get Registration, Expiry and Ownership Data in One Call

Most businesses and security teams need domain information — but WHOIS lookups are either slow, outdated, or behind paywalls.

I built Domain WHOIS API — instant access to registration data, expiry dates, nameservers, and IP addresses for any domain.

What it does

Single endpoint: POST /whois

Returns:

  • Registrar name
  • Creation date
  • Expiration date (+ days until expiry)
  • Last updated date
  • Domain status (active/expired/locked)
  • Nameservers
  • Country
  • IP address
  • Registrant organization

Perfect for: domain monitoring, cybersecurity, lead research, brand protection.

Quick start

Python

import requests

url = "https://domain-whois-lookup.p.rapidapi.com/whois"
headers = {
    "X-RapidAPI-Key": "YOUR_KEY",
    "Content-Type": "application/json"
}
payload = {"domain": "github.com"}

r = requests.post(url, json=payload, headers=headers)
print(r.json())
Enter fullscreen mode Exit fullscreen mode

Response:

{
  "domain": "github.com",
  "registrar": "MarkMonitor, Inc.",
  "creation_date": "2007-10-09T18:20:50+00:00",
  "expiration_date": "2026-10-09T18:20:50+00:00",
  "days_until_expiry": 158,
  "status": ["clientDeleteProhibited", "clientTransferProhibited"],
  "name_servers": ["ns1.verifydomains.com", "ns2.verifydomains.com"],
  "country": "United States",
  "ip_address": "140.82.114.4"
}
Enter fullscreen mode Exit fullscreen mode

JavaScript

const response = await fetch("https://domain-whois-lookup.p.rapidapi.com/whois", {
  method: "POST",
  headers: {
    "X-RapidAPI-Key": "YOUR_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ domain: "amazon.com" })
});
const data = await response.json();
console.log(data);
Enter fullscreen mode Exit fullscreen mode

Use cases

  • Domain monitoring — track when domains are about to expire
  • Brand protection — monitor competitor domains
  • Security/OSINT — identify domain ownership and registrars
  • Lead research — find contact info from WHOIS records
  • Infrastructure mapping — discover nameservers and IPs

Pricing

Plan Price Rate limit
BASIC Free 50 req/hr
PRO $9.99/mo 1,000 req/hr
ULTRA $29.99/mo 10,000 req/hr

Try it

Domain WHOIS Lookup on RapidAPI

Free tier available. No credit card required.


Built this because bulk WHOIS checks are expensive, slow, or outdated. This pulls live data and returns it in milliseconds.

Feedback welcome — especially on additional data points you'd like to see.

Top comments (0)