DNS Lookup API

Query A, AAAA, MX, CNAME, TXT, NS records for any domain. Simple REST interface for DNS resolution.

<100ms
Response
7 Types
Record Types
Zero deps
Go Native

How It Works

Step 1
Specify Domain
Pass any domain and record type as query params
Step 2
We Resolve
Query DNS servers and resolve the records
Step 3
Get Records
Receive structured DNS records as JSON

Playground

3 free requests/day without API key

Enter a domain and click Lookup

API Documentation

Base URL
https://dns-lookup-nine.vercel.app
Authentication
X-API-Key: your_key (header) or ?key=your_key (query)Get your free key below
GET/api/lookup?domain=example.com&type=MX

Resolve DNS records for a given domain and record type.

Parameters

ParameterTypeRequiredDescription
domainstringyesDomain to query
typestringnoRecord type: A, AAAA, MX, CNAME, TXT, NS, SRV. Default: A

Response (MX example)

{
  "domain": "google.com",
  "type": "MX",
  "records": [
    { "priority": 10, "host": "smtp.google.com" },
    { "priority": 20, "host": "smtp2.google.com" }
  ]
}

Error Responses

// 400 — Bad Request
{ "error": "Missing 'domain' parameter" }
{ "error": "Invalid type. Valid: A, AAAA, MX, CNAME, TXT, NS, SRV" }

// 401 — Unauthorized
{ "error": "Invalid API key" }

// 422 — Lookup Failed
{ "error": "DNS lookup failed: ..." }

// 429 — Rate Limited
{ "error": "Daily limit reached. Upgrade your plan." }

Get API Key

Get a free API key for 6 requests/day. No credit card required.

Usage

  • Add header: X-API-Key: your_key
  • Or query param: ?key=your_key

Limits

  • Playground (no key): 3 req/day
  • Free tier (with key): 6 req/day
  • Paid plans: see pricing below

Pricing

Start free. Pay only when you need more.

Free
$0
  • 6 requests/day
  • All record types
  • JSON response
Starter
🚀 Launch Price
$12$5/mo
  • 500 requests/day
  • All record types
  • Priority
Business
🚀 Launch Price
$79$39/mo
  • 20,000 requests/day
  • All record types
  • Priority support