DNS Lookup API
The DNS Lookup API retrieves DNS records for any given domain.
From 2,972 users
Applications using this API
API Status
API Response Times
Average | P50 | P75 | P90 | P95 |
|---|---|---|---|---|
| 254ms | 292ms | 350ms | 663ms | 1109ms |
Similar APIs
Didn't find what you were looking for? Suggest an improvement
/v1/dnslookup GET
https://api.api-ninjas.com/v1/dnslookup
Returns a list of DNS records associated with a particular domain.
Parameters
domainrequiredValid domain to check (e.g.
example.com). For top-level domains other than .com, a premium subscription is required.
Headers
X-Api-KeyrequiredAPI Key associated with your account.
Response
Returns an array of DNS record objects. Each record contains:
record_typeType of DNS record. Supported types:
Apremium onlyAAAApremium onlyCNAMEpremium onlyMXpremium onlyNSPTRSRVSOATXTpremium onlyCAA
valueThe value of the DNS record.
priorityPriority value (for MX records).
mname,rname,serial,refresh,retry,expire,ttlAdditional fields for SOA records only.
Sample Request Live Demo!
Try this API endpoint with all available parameters in our API playground
https://api.api-ninjas.com/v1/dnslookup?domain=example.comHeaders
X-Api-KeyLog in or sign up to get your API KeySample Response
Code Examples
1
2
curl -X GET "https://api.api-ninjas.com/v1/dnslookup?domain=example.com" \
-H "X-Api-Key: YOUR_API_KEY"If your programming language is not listed in the Code Example above, you can still make API calls by using a HTTP request library written in your programming language and following the above documentation.