DNS CSV API
Programmatic DNS record lookup for agents, scripts, and automation pipelines. Query any domain and get structured JSON — no browser required.
Base URL
https://dns-csv.com/api
Authentication
All API requests require a Bearer token in the Authorization header. Generate your key from the Account page.
Authorization: Bearer dns_your_api_key_here
Endpoints
GET
/api/dnsReturns all DNS records (or a specific type) for the given domain. Consumes 1 lookup from your monthly quota.
Query Parameters
| Param | Required | Description |
|---|---|---|
| domain | yes | Domain to query (e.g. example.com) |
| type | no | Filter by record type: A, AAAA, CNAME, MX, NS, TXT, SOA, SRV |
Example
# All records
curl -H "Authorization: Bearer dns_..." \
"https://dns-csv.com/api/dns?domain=example.com"
# MX records only
curl -H "Authorization: Bearer dns_..." \
"https://dns-csv.com/api/dns?domain=example.com&type=MX"
POST
/api/dns/bulkAccepts an array of domains and returns DNS records for each. Each domain counts as 1 lookup. Bulk limits: Pro=10, Growth=50, Scale=100 domains per request.
Request Body (JSON)
{
"domains": ["example.com", "github.com"],
"type": "MX" // optional
}
Example
curl -X POST \
-H "Authorization: Bearer dns_..." \
-H "Content-Type: application/json" \
-d '{"domains":["example.com","github.com"]}' \
https://dns-csv.com/api/dns/bulk
Response Format
{
"domain": "example.com",
"type": "ALL",
"count": 12,
"records": [
{ "type": "A", "hostname": "example.com", "value": "93.184.216.34", "ttl": 3600 }
],
"meta": { "plan": "pro", "quotaUsed": 42, "quotaLimit": 1000 }
}
Plans & Quotas
| Plan | Price | Browser Lookups | API Lookups/mo | Bulk Limit |
|---|---|---|---|---|
| Free | Free | 1/day | — | — |
| Pro | $9.99/mo | Unlimited | 1,000 | 10 domains |
| Growth | $29.99/mo | Unlimited | 10,000 | 50 domains |
| Scale | $99.99/mo | Unlimited | 100,000 | 100 domains |
Error Codes
| HTTP | Code | Meaning |
|---|---|---|
| 401 | missing_api_key | No Authorization header provided |
| 401 | invalid_api_key | Key is invalid or revoked |
| 403 | plan_required | API access requires Pro or higher |
| 400 | missing_domain | domain query param is required |
| 400 | invalid_type | Unsupported DNS record type |
| 400 | too_many_domains | Bulk domain count exceeds plan limit |
| 429 | rate_limited | Too many requests per minute (IP-based) |
| 429 | quota_exceeded | Monthly API quota exhausted |
| 502 | lookup_failed | DNS resolver error or timeout |
Ready to integrate?
Generate your API key from the Account page. Pro plan includes 1,000 API lookups/month.
Get your API key