Dev.to WebDev 🛠 Dev 👁 0

How to Build a WHOIS Lookup Tool for Free in 5 Minutes

Ever needed to check who owns a domain? Here's how to build one using a free API — no registration, no API key, just a GET request. The API Domain WHOIS API on RapidAPI. 5,000 free requests/month. Read more a

Ever needed to check who owns a domain? Here's how to build one using a free API — no registration, no API key, just a GET request.

The API

Domain WHOIS API on RapidAPI. 5,000 free requests/month. Read more at [link].

Step 1: Make a request

curl "https://mega-api-mellowed-tidepool-1271.fly.dev/whois/lookup?domain=github.com"

Step 2: Parse the response

({"registrar":"MarkMonitor","created":"2007-10-09","expires":"2028-10-09","nameservers":["ns1.github.com"]})

## Step 3: Call it from JavaScript


javascript
async function lookupDomain(domain) {
const res = await fetch(
"https://mega-api-mellowed-tidepool-1271.fly.dev/whois/lookup?domain=" + domain
);
const data = await res.json();
console.log(data);
}

lookupDomain("github.com");

That's it. No API key. No registration. No rate limits. Copy-paste and it works.

https://rapidapi.com/buigialy30206/api/domain-whois-api1/playground/apiendpoint_72a4be4a-8f73-4b30-a5e8-75ef1f165b40

📰 Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.