NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

DNS Lookup API

GET

Read any domain's DNS records from your code in one call.

DNS Lookup retrieves published DNS records for any domain, including IPv4 (A), IPv6 (AAAA), and mail exchange (MX) servers. It provides hostnames, priorities, and dual-stack status flags, while paid plans add TXT, CNAME, and nameserver records.

Try it — live request, no key required

Request
GETapi.apiverve.com/v1/dnslookup?domain=myspace.com
Query parameters
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "domain": "google.com",
    "records": {
      "A": [
        "172.253.156.100",
        "172.253.156.113",
        "172.253.156.101",
        "172.253.156.139",
        "172.253.156.138",
        "172.253.156.102"
      ],
      "AAAA": [
        "2607:f8b0:4023:100d::65",
        "2607:f8b0:4023:100d::8a",
        "2607:f8b0:4023:100d::71",
        "2607:f8b0:4023:100d::64"
      ],
      "CNAME": null,
      "MX": [
        {
          "exchange": "smtp.google.com",
          "priority": 10
        }
      ],
      "NS": [
        "ns4.google.com",
        "ns3.google.com",
        "ns2.google.com",
        "ns1.google.com"
      ],
      "PTR": null,
      "SRV": null,
      "SOA": {
        "nsname": "ns1.google.com",
        "hostmaster": "dns-admin.google.com",
        "serial": 1005474929,
        "refresh": 900,
        "retry": 900,
        "expire": 1800,
        "minttl": 60
      },
      "TXT": [
        [
          "onetrust-domain-verification=0d477fe608074e6f9c12bca7826035cc"
        ],
        [
          "work-accounts-domain-verification=Tcj6JjIMZOw2KsSEw2Nt2rLae89tN6"
        ],
        [
          "google-site-verification=wD8N7i1JTNTkezJ49swvWW48f8_9xveREV4oB-0Hf5o"
        ],
        [
          "Z29vZ2xl"
        ],
        [
          "globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8="
        ],
        [
          "arcules-domain-verification=2R4t5G7nI6tRCo61lpxxbLksPYstxhGmtV75cpr8x9K"
        ],
        [
          "v=spf1 include:_spf.google.com ~all"
        ],
        [
          "_r4rd1pvwyrpi7sw4a3hzmw8e51yh9td"
        ],
        [
          "apple-domain-verification=30afIBcvSuDV2PLX"
        ],
        [
          "onetrust-domain-verification=6d685f1d41a94696ad7ef771f68993e0"
        ],
        [
          "facebook-domain-verification=22rm551cu4k0ab0bxsw536tlds4h95"
        ],
        [
          "google-site-verification=TV9-DBe4R80X4v0M4U_bd_J9cpOJM0nikft0jAgjmsQ"
        ],
        [
          "MS=E4A68B9AB2BB9670BCE15412F62916164C0B20BB"
        ],
        [
          "docusign=05958488-4752-4ef2-95eb-aa7ba8a3bd0e"
        ],
        [
          "google-site-verification=4ibFUgB-wXLQ_S7vsXVomSTVamuOXBiVAzpR5IZ87D0"
        ],
        [
          "docusign=1b0a6754-49b1-4db5-8540-d2c12664b289"
        ],
        [
          "cisco-ci-domain-verification=47c38bc8c4b74b7233e9053220c1bbe76bcc1cd33c7acf7acd36cd6a5332004b"
        ]
      ],
      "CAA": [
        {
          "critical": 0,
          "issue": "pki.goog"
        }
      ]
    },
    "ttl": {
      "A": 10,
      "AAAA": 2,
      "CNAME": null,
      "MX": 74,
      "NS": 15382,
      "PTR": null,
      "SRV": null,
      "SOA": 25,
      "TXT": 300,
      "CAA": 21600
    },
    "summary": {
      "hasIPv6": true,
      "hasMailServers": true,
      "hasSPF": true
    }
  }
}

Start from a template — a working app you can deploy in a minute

About the DNS Lookup API

A DNS lookup API for checking a domain's records from code, the nslookup or dig step in onboarding, email and migration checks. Send a domain or hostname and DNS Lookup queries its records live and returns them as JSON, with flags for IPv6, mail servers and SPF. Every plan gets A, AAAA and MX records with priorities; paid plans add CNAME, NS, SOA and TXT records.

What people use it for

Mail Delivery Verification
To verify email destination readiness, onboarding systems query incoming domain MX records and priority values before routing outbound messages.
Dual-Stack Infrastructure Auditing
DevOps engineers inspect IPv4 and IPv6 addresses across client domains to confirm dual-stack network reachability and detect missing AAAA entries.
Domain Migration Monitoring
When moving web infrastructure to new hosts, deployment pipelines check resolving A and MX records in real time to verify DNS propagation.
Custom Domain Onboarding
Hosting platforms query target domains during customer onboarding to verify that resolved IP addresses point to designated web servers.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use DNS Lookup

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the DNS Lookup API.

Read the docs →
Which DNS record types does the lookup return?
The query returns standard records including A, AAAA, and MX records with priority values, along with summary flags for IPv6 and mail server readiness. Upgrading to a paid plan adds CNAME, NS, TXT, and full SOA zone configuration details.
Can I look up a subdomain or a full URL?
Send a hostname without https:// or a path. Subdomains such as api.github.com work and return their own records, which is often just A or CNAME; MX, NS, SOA and TXT records usually live on the root domain, so query example.com for those.
Are TXT and nameserver records included on the Free plan?
No, CNAME, NS, SOA, and TXT records require a paid plan, as does the summary flag for SPF verification. The Free plan provides A, AAAA, and MX records, while any paid subscription unlocks the full set of records.
Which plan fits checking 10,000 domains a month?
The Starter plan is sufficient. Each query costs 6 credits, giving you up to 33,333 lookups each month, which works out to about $0.90 per 1,000 calls. The Free plan includes 33 lookups per month for testing.
How fresh is the returned DNS information?
Records are resolved live when you call. Repeat lookups of the same domain within about three minutes can be answered from a short cache, so a record you just changed may take a few minutes to show, on top of whatever TTL the domain's own nameservers set.
Can I use this DNS data in a commercial product?
Yes, you can integrate and display the returned DNS records inside your own commercial tools or dashboards on any paid plan. The Free plan is restricted to non-commercial evaluation, and direct resale of the raw data is not permitted.

Ready to build with DNS Lookup? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs