DNS Lookup

DNS Lookup API

Development

Query DNS records for any domain. Retrieve A, AAAA, CNAME, MX, NS, SOA, TXT, and other record types instantly.

Authentication

All API requests require a valid API key passed in the Authorization header as a Bearer token.

Endpoints

1 endpoint available

Overview

The DNS Lookup API queries DNS records for any domain name and returns all available record types with their TTL values and data.

Supported Record Types

  • A - IPv4 address records
  • AAAA - IPv6 address records
  • CNAME - Canonical name (alias) records
  • MX - Mail exchange records with priority
  • NS - Nameserver records
  • SOA - Start of authority records
  • TXT - Text records (SPF, DKIM, DMARC, etc.)
  • CAA - Certificate authority authorization
  • PTR - Pointer records (reverse DNS)

Response Fields

  • name - The queried domain name
  • ttl - Time to live in seconds
  • type - DNS record type
  • data - Record value/data

Use Cases

  • Domain troubleshooting and debugging
  • Email deliverability analysis (MX, SPF, DKIM, DMARC)
  • DNS migration verification
  • SSL/TLS certificate validation (CAA records)
  • Security auditing and reconnaissance

Endpoints

GET
/v1/tools/dns-lookup
Query DNS records for a domain

Response Example

{
  "success": true,
  "domain": "example.com",
  "records": [
    {
      "name": "example.com.",
      "ttl": 3600,
      "type": "NS",
      "data": "ns1.example.com."
    },
    {
      "name": "example.com.",
      "ttl": 3600,
      "type": "NS",
      "data": "ns2.example.com."
    },
    {
      "name": "example.com.",
      "ttl": 600,
      "type": "SOA",
      "data": "ns1.example.com. admin.example.com. 2024010100 28800 7200 604800 600"
    },
    {
      "name": "example.com.",
      "ttl": 300,
      "type": "A",
      "data": "93.184.216.34"
    },
    {
      "name": "www.example.com.",
      "ttl": 3600,
      "type": "CNAME",
      "data": "example.com."
    },
    {
      "name": "example.com.",
      "ttl": 3600,
      "type": "MX",
      "data": "10 mail.example.com."
    },
    {
      "name": "example.com.",
      "ttl": 3600,
      "type": "TXT",
      "data": "v=spf1 include:_spf.example.com ~all"
    }
  ]
}

Error Codes

400
Invalid domain name provided
401
Missing or invalid API key
404
Domain not found or no records exist
500
Internal server error

Code Examples

curl -X GET "https://toolshed.app/api/v1/tools/dns-lookup?domain=example.com" \
  -H "Authorization: Bearer YOUR_API_KEY"

Ready to get started?

Create an API key to start using the DNS Lookup API.