Back to API Ninjas in Google Sheets
SheetXAI logo
API Ninjas logo
API Ninjas · Google Sheets Guide

Enrich a B2B Domain List With MX Records and WHOIS Data in Google Sheets

2026-05-13
4 min read
See the Excel version →

The Scenario

You are a sales ops manager at a B2B SaaS company. Your SDR team just purchased a cold-lead list of 300 company domains and they are ready to load it into the outbound sequencing tool. But last quarter, 40% of the cold list bounced because the domains had no active mail servers.

Before you load this list, you need to verify MX records and WHOIS creation date for every domain. Fresh domains (under 12 months old) and domains without MX records go in a "Review" pile. Everything else goes into the sequencer. The SDR manager needs the split by 3 PM today.

The bad version of this morning:

  • You open MXToolbox, enter domain one, read the MX records, note the primary server
  • You run a WHOIS lookup in a separate tool, find the creation date, calculate the domain age
  • You repeat for domain two, domain three
  • By 11 AM you have checked thirty-eight domains and have 262 left
  • The SDR manager calls at 2:45 PM and asks for the split
  • You tell him 38 of 300 are verified. He loads the full 300 anyway.

The fast version is one prompt and it runs while you work on something else.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent inside your spreadsheet. It reads your domain list and calls the API Ninjas DNS and WHOIS endpoints for each row, writing the results back so you can sort and split in seconds.

Open the SheetXAI sidebar and type:

For each domain in column A, look up the MX records using API Ninjas and write the primary mail server hostname and priority into columns B and C. Fetch WHOIS registration data for every domain and add the registrar name, creation date, and expiration date into columns D, E, and F.

SheetXAI calls both endpoints for all 300 domains and writes five fields per row. You sort by column C (MX priority) and column E (creation date) and the split takes thirty seconds.

What You Get

A domain enrichment sheet ready for the sequencer decision:

  • Column B: Primary MX hostname — the mail server that handles inbound email
  • Column C: MX priority — lower number = higher priority; blank means no MX record
  • Column D: Registrar name — who registered the domain
  • Column E: Creation date — when the domain was registered
  • Column F: Expiration date — when it expires

You can now filter column C for blanks (no MX = bounce risk) and column E for domains under 12 months old, and those rows go to the Review pile. The rest go to the sequencer.

What If the Data Is Not Quite Ready

B2B lead lists always have noise. SheetXAI handles it alongside the enrichment.

When some domains have subdomains in the list

Your list has a mix of root domains (acme.com) and subdomains (sales.acme.com) that should be resolved to the root before looking up MX records.

Strip any subdomain prefix from domains in column A before running MX and WHOIS lookups. Write the root domain into column B, then fill MX server into column C and WHOIS creation date into column D.

When you want to auto-flag the Review pile

Instead of manually filtering, you want SheetXAI to add the split flag directly.

After filling MX and WHOIS data, add a "Disposition" column G. Write "REVIEW" for any domain with no MX record in column B or with a creation date less than 12 months ago in column E. Write "APPROVED" for all others.

When you want to check for disposable email domain patterns

Some domains on the list might be known temporary email providers.

After the MX and WHOIS lookup, check if any domains in column A match known disposable email domain patterns (very short registration, expiration in under 1 year, registrar used by spam lists) and add a "Suspicious" flag in column H.

When the full pre-sequencer validation is one prompt

Three hundred domains, MX check, WHOIS creation date, auto-flagging for the Review pile, and a count summary for the SDR manager, all before 3 PM.

For each domain in column A, look up MX records via API Ninjas and write the primary mail server into column B and priority into column C. Fetch WHOIS data and write registrar into column D, creation date into column E, and expiration date into column F. In column G, write "REVIEW" for domains with blank MX or creation date under 12 months ago, and "APPROVED" for the rest. Then create a summary in cells I1:J3 showing counts of APPROVED, REVIEW, and total domains.

The pattern: two API calls per row, conditional flagging, and a summary table all in one instruction so the SDR manager has the split before the call.

Try It

Get the 7-day free trial of SheetXAI and open any domain list or cold-lead sheet, then ask SheetXAI to run MX and WHOIS validation using API Ninjas. The API Ninjas integration is included in every SheetXAI plan. See also how to validate phone and email in a lead list or the API Ninjas in Google Sheets overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more