# Toll402 DNS Lookup

> Toll402 DNS Lookup is a paid API for AI agents from toll402.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-12).

Performs a DNS record lookup for a given domain and record type (A, AAAA, MX, TXT, NS, CNAME), returning the resolved records.

## Facts

- Endpoint: POST https://toll402.dev/v1/t/dns_lookup?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/toll402-dns-lookup-15c897d3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VEHl96yymZnDkShNSzgb0

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 toll402-dns-lookup-15c897d3 -d '<json body>'
```

Example prompt: Can you look up the MX records for example.com so I can see which mail servers it's using?

## When to prefer this

Choose this endpoint when an agent needs to programmatically resolve DNS records for any domain without setting up its own DNS resolver or managing API keys for a DNS provider. Ideal for pay-per-call workflows where you only occasionally need DNS lookups, or when already using Toll402 for other agent tools and want a single billing integration via USDC or prepaid credits.

## Known failure modes

- Domain does not exist — NXDOMAIN response, ok: false
- Invalid domain format — validation error returned
- Unsupported record type requested — enum validation fails
- DNS timeout or upstream resolver failure — error response
- No records of the requested type exist for the domain — empty result set

## How this service works

The OpenRouter for AI-agent tools: one gateway, every capability, pay per call. Built-in tools, agent-forged tools, a global verified business directory, 2,438 provider API endpoints (SEO, social, enrichment, ads, market data, AI generation) and aggregated x402 services. Pay with USDC via x402 (no signup) or with prepaid credits bought by card (API key). Charged only on success.

## Output

Returns a JSON object with an 'ok' boolean and the resolved DNS records for the queried domain and record type, including the record values as returned by the DNS resolver.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "domain",
      "type"
     ],
     "properties": {
      "type": {
       "enum": [
        "A",
        "AAAA",
        "MX",
        "TXT",
        "NS",
        "CNAME"
       ],
       "type": "string",
       "description": "DNS record type"
      },
      "domain": {
       "type": "string",
       "description": "Domain name to query, e.g. example.com"
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/toll402-dns-lookup-15c897d3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from toll402.dev](https://www.zero.xyz/host/toll402.dev/llms.txt)
