DEV Community

Oaida Adrian
Oaida Adrian

Posted on

Building a WHOIS & DNS Lookup Tool: Domain Intelligence in One API Call

Why Domain Intelligence Matters

Whether you're doing security research, monitoring your own infrastructure, or evaluating a potential acquisition target, domain data tells a story. WHOIS records reveal ownership history. DNS records expose infrastructure topology. SPF/DMARC configs show email security posture.

The problem? Gathering all this data usually means jumping between multiple tools — whois CLI, dig, nslookup, online MX lookup tools... It's tedious and doesn't scale.

So I built a WHOIS & DNS Lookup Tool on Apify that returns everything in a single API call.

What It Does

Give it a domain (or a list of domains), and you get:

  • WHOIS Data: Registrar, creation date, expiration date, registrant info, status flags
  • DNS Records: A, AAAA, MX, NS, TXT, CNAME, SOA, CAA, SRV
  • Email Security: SPF and DMARC record detection
  • IP Resolution: Quick A-record IP lookup

All in clean, structured JSON.

Example Output

{
  "domain": "example.com",
  "whois": {
    "registrar": "RESERVED-Internet Assigned Numbers Authority",
    "creationDate": "1995-08-14",
    "expirationDate": "2026-08-13",
    "nameServers": ["a.iana-servers.net", "b.iana-servers.net"]
  },
  "dns": {
    "A": ["93.184.216.34"],
    "MX": ["0 ."],
    "TXT": ["v=spf1 -all"],
    "SOA": ["ns.icann.org. noc.icann.org. 2025081403 7200 3600 1209600 3600"]
  },
  "security": {
    "spf": "v=spf1 -all",
    "dmarc": "v=DMARC1;p=reject;sp=reject;adkim=s;aspf=s"
  },
  "resolvedIP": "93.184.216.34"
}
Enter fullscreen mode Exit fullscreen mode

How It Works

The tool uses two battle-tested Python libraries:

It wraps them in the Apify SDK for cloud execution, automatic dataset storage, and pay-per-event pricing.

SPF/DMARC Detection

Email security is often overlooked in domain analysis. The tool checks TXT records for SPF policies and queries _dmarc.{domain} for DMARC configurations — two critical indicators of email deliverability posture.

Use Cases

Scenario What You Get
Security Audit Full DNS topology + WHOIS ownership trail
Domain Monitoring Track expiry dates and DNS changes over time
Email Deliverability SPF/DMARC validation for sender domains
Competitive Intel Infrastructure discovery via DNS records
SEO Analysis Name server patterns, CDN detection

Try It

You can run the tool directly on Apify:

👉 WHOIS & DNS Lookup Tool

It also works as a RapidAPI endpoint if you prefer that platform.

The full source code is available on GitHub:

📦 multi-tool-content-api

Pricing

$0.01 per domain looked up. No subscriptions, no minimums — pure pay-per-use.

What's Next

This is tool #10 in a growing portfolio of content and data extraction APIs. Each one solves a specific data gathering need:

  1. RSS Feed Aggregator
  2. llms.txt Generator
  3. RO Business Scraper
  4. Sitemap Content Extractor
  5. Product Hunt Scraper
  6. Sentiment Analyzer
  7. Property Listing Scraper
  8. Press Release Monitor
  9. AI Web Crawler
  10. WHOIS & DNS Lookup Tool ← this one

All available individually on Apify, or unified through a single RapidAPI endpoint.


Built with Python, Apify SDK, and a passion for clean data APIs.

Top comments (0)