Look up DNS records for a domain (A, MX, TXT, NS) with one API call

Onboarding flows that connect a customer's domain, email deliverability checks and security reviews all start with the same question: what do this domain's DNS records say right now?

The Domain and DNS Info Checker answers it as JSON, so you can verify a TXT record, see which provider handles a domain's email (MX), or confirm an SPF policy from your code or an AI agent.

Make the request

Send your API key in the x-api-key header. Free accounts include 1,000 calls a month.

curl "https://apistack.online/api/utilities/domain-and-dns-info-checker/v1/dns-records?domain=github.com" \
  -H "x-api-key: $APISTACK_API_KEY"
200 OK · response
{
  "success": true,
  "endpoint": "dns-records",
  "domain": "github.com",
  "dns": {
    "A": [
      "140.82.113.4"
    ],
    "MX": [
      {
        "priority": 0,
        "exchange": "github-com.mail.protection.outlook.com"
      }
    ],
    "TXT": [
      "v=spf1 ip4:192.30.252.0/22 include:spf.protection.outlook.com include:_netblocks.google.com include:_netblocks2.google.com include:mail.zendesk.com include:_spf.salesforce.com include:servers.mcsv.net include:mktomail.com include:sendgrid.net ip4:62.253.227.114 ip4:166.78.69.169 ip4:166.78.69.170 ip4:166.78.71.131 ~all",
      "… 20+ more verification records"
    ],
    "NS": [
      "ns-1283.awsdns-32.org",
      "ns-1707.awsdns-21.co.uk",
      "ns-421.awsdns-52.com",
      "ns-520.awsdns-01.net"
    ]
  }
}

Response abridged: some fields (timestamps, metadata) omitted.

Verify domain ownership

Ask the customer to add a TXT record with a token you generate, then call this endpoint and check that the token is in dns.TXT. No dig, no DNS library.

More than DNS

The same API has /whois-lookup, /ssl-certificate and /domain-availability endpoints, and /full-check returns everything at once. For certificate expiry monitoring, see the SSL guide.

Give it to your AI agent

The same API is available as an MCP tool. Add APIStack to Claude, Cursor, VS Code or any MCP client:

{
  "mcpServers": {
    "apistack": {
      "url": "https://apistack.online/api/mcp/connect",
      "headers": { "x-api-key": "YOUR_API_KEY" }
    }
  }
}

Then ask: “Which email provider does github.com use, and what is its SPF record?” See MCP setup for every client.

Related guides