# ForgeMesh DNS Lookup API

> ForgeMesh DNS Lookup API is a paid API for AI agents from x402.forgemesh.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Resolves any DNS record type (A, AAAA, MX, TXT, NS, CNAME, SOA, CAA, SRV, PTR) for any hostname, returning full answer records with DNSSEC validation status as JSON.

## Facts

- Endpoint: POST https://x402.forgemesh.io/dns-lookup
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/forgemesh-dns-lookup-api-111c04b4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KZfCbMTthY1TOeHBLaXUm

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 forgemesh-dns-lookup-api-111c04b4 -d '<json body>'
```

Example prompt: What are the MX records for gmail.com — and is DNSSEC valid for that domain?

## When to prefer this

Use this endpoint when you need structured, machine-readable DNS resolution with DNSSEC validation status for any record type — especially for infrastructure monitoring, email deliverability checks (SPF, DKIM, MX), domain ownership verification (TXT), or security auditing (CAA, DNSSEC). Prefer this over manual dig/nslookup for automated agent workflows requiring JSON output with full TTL and answer data.

## Known failure modes

- Non-existent domain returns empty answer set or NXDOMAIN
- Invalid record type string returns an error
- Malformed hostname input returns a validation error
- Timeout if upstream DNS resolver is slow
- DNSSEC validation failure flagged in response status field

## How this service works

DNS lookup API: resolve any DNS record type (A, AAAA, MX, TXT, NS, CNAME, SOA, CAA, SRV, PTR) for any hostname, with DNSSEC validation status and full answer records (name, type, TTL, data) as JSON. Use for infrastructure monitoring, email deliverability checks, domain verification, and security tooling. Cached 5 minutes.

## Output

A JSON object containing the queried hostname and record type, DNSSEC validation status, and a list of full DNS answer records each with name, type, TTL, and data fields. Results are cached for 5 minutes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "name": {
   "type": "string",
   "description": "Hostname to resolve, e.g. example.com"
  },
  "type": {
   "type": "string",
   "description": "Record type, default A"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "Answer": [
    {
     "TTL": 3600,
     "data": "0 .",
     "name": "example.com",
     "type": 15
    }
   ],
   "Status": 0
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/forgemesh-dns-lookup-api-111c04b4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.forgemesh.io](https://www.zero.xyz/host/x402.forgemesh.io/llms.txt)
