Advanced DNS queries for developers and network administrators
DNS Lookup API
The Advanced DNS Lookup API is a powerful tool designed for developers and network administrators to query DNS records with ease. It supports both forward lookups (by domain name) and reverse lookups (by IP address).
The API handles a wide range of DNS record types, making it ideal for integration into web applications, network monitoring tools, and security platforms with enterprise-grade reliability.
Free tier included, no credit card required. One key works across all 49 APIs.
- Record Types
- 15+
- Query Speed
- <100ms
- Uptime SLA
- 99.9%
Key features
- Forward DNS lookups by domain name
- Reverse DNS lookups by IP address
- Support for A, AAAA, MX, TXT, SOA, NS, PTR, SRV records
- Structured JSON responses with TTL values
- Bulk lookup capabilities for multiple domains
- Global DNS server network for fast resolution
- Rate limiting protection and error handling
Built for
- Network monitoring and diagnostics
- Domain validation and verification
- Security threat intelligence
- Email deliverability analysis
- Website migration planning
- Infrastructure auditing
- DNS configuration troubleshooting
- Brand protection monitoring
Try it
Build the request for your data
Edit the parameters below and see the exact curl command and JSON response you will get. No key required to preview.
Parameters
GET /dns-lookup/v1/check?name=example.com&type=A HTTP/1.1
Host: api.apicodex.io
{
"name": "example.com",
"records": {
"A": [
{
"name": "example.com",
"TTL": 300,
"data": "93.184.216.34"
}
]
}
}Documentation
DNS Lookup API Documentation
The Advanced DNS Lookup API is a powerful tool designed for developers and network administrators to query DNS records with ease. The API supports a wide range of DNS record types—including A, AAAA, MX, TXT, SOA, NS, and many others—and now also supports reverse DNS lookups using an IP address.
Base URL
https://api.apicodex.io/dns-lookupAuthentication
Authenticate every request with your API key: send it in an X-Api-Key header, or pass it as an ?apikey= query parameter.
{
"X-Api-Key": "YOUR_API_KEY"
}Request and response
Illustrative values. Confirm current endpoint behavior, quotas, and data freshness in the API documentation before production use.
GET /v1/check?name=example.com&type=A HTTP/1.1{
"name": "example.com",
"records": {
"A": [
{
"name": "example.com",
"TTL": 300,
"data": "93.184.216.34"
}
]
}
}Code examples
const axios = require('axios');
const options = {
method: 'GET',
url: 'https://api.apicodex.io/dns-lookup/v1/check',
params: {name: 'example.com', type: 'A'},
headers: {
'X-Api-Key': 'YOUR_API_KEY'
}
};
try {
const response = await axios.request(options);
console.log(response.data);
} catch (error) {
console.error(error);
}Pricing
DNS Lookup API Pricing
One key, one subscription, all 49 APIs. Start free and upgrade when you grow. No minimums, no lock-in.
This API costs 5 credits per request. Credits are shared across every API on your plan.
Estimate your monthly cost
Drag the slider to match your expected request volume. We will recommend the cheapest plan that covers it.
Recommended plan
Starter
$29.99 /month
Free
- All 49 APIs included
- No credit card required
- Full documentation and examples
Starter
Popular- All 49 APIs included
- Email support
- Usage dashboard and analytics
Pro
- All 49 APIs included
- Priority support
- Up to 5 API keys
Need a different plan?
Tell us about your API, volume, or support requirements.
Coming soon · MCP
Use the DNS Lookup API from your AI agent
The API Codex MCP server will expose this API, and the other 39, to Claude, Cursor and any MCP client as tools. Same key, same credits, one config entry.
FAQ
Frequently asked questions
The Advanced DNS Lookup API supports a wide range of DNS record types including A, AAAA, TXT, CNAME, MX, NS, SOA, SRV, PTR, HINFO, MINFO, RP, AFSDB, and more. If no specific type is requested, the API will return results for A, AAAA, MX, TXT, SOA, and NS records by default.
Yes, the API supports reverse DNS lookups using the ip parameter. Simply provide an IP address to the endpoint, and the API will return the PTR records associated with that IP. If both ip and name parameters are provided, the API will prioritize the reverse lookup.
If you don't specify a record type using the type parameter, the API will automatically perform queries for the default record types: A, AAAA, MX, TXT, SOA, and NS. The results will be grouped by record type in the response.
Our DNS Lookup API is optimized for speed with a global edge network that delivers typical response times under 100ms. The API leverages strategically distributed DNS resolvers across 50+ locations worldwide to minimize latency. For frequently queried domains, we implement intelligent caching strategies that can reduce response times to under 50ms. The actual response time depends on factors like the record type queried, the authoritative nameserver location, and network conditions, but our infrastructure ensures consistently fast performance for production applications.
Yes, the DNS Lookup API is well-suited for bulk domain lookups. While each API call processes a single domain, you can implement parallel requests to handle multiple domains efficiently. For bulk operations, we recommend using connection pooling and implementing exponential backoff for rate limiting. Each lookup costs 5 credits: the Free plan's 1,000 monthly credits cover about 200 lookups, Starter ($29.99/month) covers 10,000 and Pro ($99.99/month) covers 50,000. For optimal performance with bulk lookups, batch your requests in groups of 50-100 concurrent queries, implement retry logic for failed requests, and monitor your rate limit headers to avoid throttling.
Absolutely. The DNS Lookup API is designed for production-grade monitoring systems with a 99.9% uptime SLA and enterprise reliability. Many DevOps teams use our API for continuous DNS monitoring, health checks, and infrastructure validation. The API integrates seamlessly with popular monitoring platforms like Datadog, New Relic, and Prometheus through webhooks and custom exporters. You can set up automated alerting by comparing DNS responses against expected values and triggering notifications when discrepancies are detected. The structured JSON responses make it easy to parse and analyze DNS records programmatically, and the fast response times ensure your monitoring checks complete quickly without impacting system performance.
Keep building
Related APIs
Analyze SPF, DKIM, and DMARC records to optimize email domain configurations and improve deliverability.
Query domain registration information, ownership details, and registrar data for any domain.
Validate email addresses with comprehensive DNS/MX record checking and deliverability scoring.