The queried domain is sent to the selected DNS provider.
Result
Your result will appear here.
Code examples
Starting points for your own code. Run them in the environment shown below.
Node.js 22+ · ES module (.mjs)
Current inputs apply only to fields used by the example. Selected files are not embedded.
Install dependencies
const url = new URL("https://cloudflare-dns.com/dns-query");
url.searchParams.set("name", "example.com");
url.searchParams.set("type", "A");
// Sends the queried domain to Cloudflare.
const response = await fetch(url, { headers: { Accept: "application/dns-json" } });
if (!response.ok) throw new Error("HTTP " + response.status);
console.log(await response.json());
Put it to work
Look up DNS records for a domain.
Details that matter
Format and meaning
Running a lookup exposes the domain and your IP to the selected provider. Results vary by provider, cache, and region.
Supported scope and limits
10-second timeout
Split inputs that exceed the limit. If a format or algorithm is unsupported, choose a tool that matches your requirements instead of silently changing the format.