Developer & Reference
DNS Lookup API
Query live DNS records (A, AAAA, MX, TXT, NS, CNAME) for any domain.
Request Headers
| Name | Required | Description |
|---|---|---|
X-RapidAPI-Key | required | Your RapidAPI key. Get one free. |
X-RapidAPI-Host | required | dns-lookup.p.rapidapi.com |
Endpoints
GET
/v1/dnslookup Look up live DNS records for a domain
Parameters
| Name | Type | Required | Default | Constraints |
|---|---|---|---|---|
domain | string | required | — | matches ^(?=.{1,253}$)([A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?\.)+[A-Za-z]{2,63}$ |
type | string | optional | A | matches A|AAAA|MX|TXT|NS|CNAME |
Code Examples
curl --request GET \
--url 'https://dns-lookup.p.rapidapi.com/v1/dnslookup?domain=example' \
--header 'x-rapidapi-key: YOUR_API_KEY' \
--header 'x-rapidapi-host: dns-lookup.p.rapidapi.com' const url = "https://dns-lookup.p.rapidapi.com/v1/dnslookup?domain=example";
const options = {
method: "GET",
headers: {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "dns-lookup.p.rapidapi.com"
}
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data); import requests
url = "https://dns-lookup.p.rapidapi.com/v1/dnslookup"
querystring = {"domain": "example"}
headers = {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "dns-lookup.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json()) GET
/v1/dnslookup/types List all supported DNS record types.
Code Examples
curl --request GET \
--url 'https://dns-lookup.p.rapidapi.com/v1/dnslookup/types' \
--header 'x-rapidapi-key: YOUR_API_KEY' \
--header 'x-rapidapi-host: dns-lookup.p.rapidapi.com' const url = "https://dns-lookup.p.rapidapi.com/v1/dnslookup/types";
const options = {
method: "GET",
headers: {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "dns-lookup.p.rapidapi.com"
}
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data); import requests
url = "https://dns-lookup.p.rapidapi.com/v1/dnslookup/types"
headers = {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "dns-lookup.p.rapidapi.com"
}
response = requests.get(url, headers=headers)
print(response.json()) Interactive Example
$ GET /v1/dnslookup?domain=example.com&type=A
{"domain":"example.com","type":"A","records":["93.184.216.34"]} Subscribe & License
Access this API with commercial-ready tiers on RapidAPI. Flexible plans designed for side-projects, startups, and high-volume production architectures.
Developer Support
Need help integrating or have a custom endpoint request? Our engineering team is here to assist with authentication, payload schemas, and high-frequency rate limit increases.
System Performance
Monitored 24/7 with a 99.9% uptime SLA. Built atop cloud-native microservices with globally distributed edge caching to ensure ultra-low latency response times.
All Systems Operational