DNS Lookup API - Free DNS Record Query
Queries DNS records for a domain using Cloudflare DNS-over-HTTPS. Supports A, AAAA, MX, TXT, CNAME, NS, SOA, and PTR record types.
Code examples
curl -X POST https://api.botoi.com/v1/dns/lookup \
-H "Content-Type: application/json" \
-d '{"domain":"github.com","type":"A"}'When to use this API
Verify domain configuration during onboarding
When a customer adds a custom domain to your SaaS platform, query their CNAME or A records to confirm the DNS is pointing to your servers. Show a green checkmark once the records match your expected values.
Monitor MX record changes for email deliverability
Schedule periodic MX lookups for your sending domain to detect unexpected changes. Alert your ops team if an MX record is removed or changed, which could indicate a DNS hijack or misconfiguration affecting email delivery.
Audit TXT records for SPF and DKIM compliance
Query TXT records for a domain to extract SPF and DKIM entries. Parse the values to verify they match your expected configuration and flag domains with missing or overly permissive policies.
Frequently asked questions
Which DNS resolver does this endpoint use?
What record types are supported?
Can I look up subdomains?
What does query_time_ms represent?
Does this return all records of the requested type?
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.