# Nightshift Labs DNS Lookup API

> Nightshift Labs DNS Lookup API is a paid API for AI agents from nightshift-x402.nightshift-labs.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-11-18).

Performs DNS record lookups for a given domain, returning all major record types with hints like SPF, MX presence, CAA issuers, and DNSSEC validation status.

## Facts

- Endpoint: GET https://nightshift-x402.nightshift-labs.workers.dev/v1/domain/dns?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nightshift-labs-dns-lookup-api-85f94591
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RAOVtalduf9kVXkcqeDYz

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability nightshift-labs-dns-lookup-api-85f94591
```

Example prompt: Can you look up all the DNS records for github.com, including its A records, MX records, and TXT records?

## When to prefer this

Use this endpoint when an AI agent needs structured DNS record data with enriched hints (SPF, MX presence, DNSSEC, CAA issuers, verification tokens) in a single call, especially in automated workflows that pay per-call via x402/USDC on Base. Prefer over raw dig/nslookup alternatives when you need machine-readable JSON output with pre-parsed hints rather than raw zone text.

## Known failure modes

- Domain does not exist — returns NXDOMAIN status
- Invalid or malformed domain name input — may return an error or empty records
- Unsupported record type requested — ignored or returns empty for that type
- DNS resolution timeout — upstream resolver unreachable
- Rate limiting or payment failure — x402 payment required or insufficient USDC balance

## How this service works

DNS lookup in one call: A, AAAA, CNAME, MX, TXT, NS and CAA records with TTLs (or just the types you ask for), NXDOMAIN status, DNSSEC validation, plus parsed hints: SPF record, CAA certificate issuers and which services the domain is verified with (TXT verification tokens). Resolved via DNS-over-HTTPS.

## Output

A JSON object containing the domain name, a status field (e.g. NOERROR), a records map keyed by DNS record type (A, AAAA, MX, TXT, NS, CNAME, CAA) each with TTL and data, plus a hints object summarizing SPF string, hasMx boolean, caaIssuers array, verificationTokens array, and dnssecValidated boolean.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "name"
     ],
     "properties": {
      "name": {
       "type": "string",
       "description": "domain or host name"
      },
      "types": {
       "type": "string",
       "description": "optional comma list of A,AAAA,CNAME,MX,TXT,NS,CAA,SOA (default: all but SOA)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "github.com",
  "hints": {
   "spf": "v=spf1 ip4:192.30.252.0/22 include:_netblocks.google.com … ~all",
   "hasMx": true,
   "caaIssuers": [],
   "verificationTokens": [
    "adobe-idp-site-verification"
   ]
  },
  "status": "NOERROR",
  "records": {
   "A": [
    {
     "ttl": 46,
     "data": "140.82.121.3"
    }
   ],
   "MX": [
    {
     "ttl": 300,
     "data": "0 github-com.mail.protection.outlook.com."
    }
   ]
  },
  "dnssecValidated": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nightshift-labs-dns-lookup-api-85f94591/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nightshift-x402.nightshift-labs.workers.dev](https://www.zero.xyz/host/nightshift-x402.nightshift-labs.workers.dev/llms.txt)
