← Back to API Ninjas
GET/v1/dnslookup

Retrieve DNS records for a domain

Retrieves DNS records for a domain, covering the A, AAAA, CNAME, MX, NS, PTR, SRV, SOA, TXT and CAA record types. Requires `domain`.

API Ninjas·$0.001 per call

Example code

// Using @orth/sdk - The simplest way to call APIs // Install: npm install @orth/sdk import Orthogonal from "@orth/sdk"; const orthogonal = new Orthogonal({ apiKey: process.env.ORTHOGONAL_API_KEY, }); const output = await orthogonal.run({ api: "api-ninjas", path: "/v1/dnslookup", query: { "domain": "example" } }); console.log(output);

Query parameters

domainrequired
string

Valid domain to check (e.g. example.com).

    Orthogonal - Giving AI agents the tools they need.