# DNS Lookup via DNS-over-HTTPS

> DNS Lookup via DNS-over-HTTPS is a paid API for AI agents from dns-lookup.hsharmanov02.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-12).

Resolves DNS records (A, AAAA, MX, TXT, NS, CNAME, or all) for any domain using DNS-over-HTTPS, paid per call with USDC via x402.

## Facts

- Endpoint: GET https://dns-lookup.hsharmanov02.workers.dev/dns?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dns-lookup-via-dns-over-https-0582392b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jLeRw2vFMwN2FBqLWVlAP

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 dns-lookup-via-dns-over-https-0582392b
```

Example prompt: What are all the DNS records for github.com — I need the A, MX, and TXT records to verify the domain setup.

## When to prefer this

Choose this endpoint when you need a quick, no-API-key DNS resolution via HTTPS, especially in serverless or agent contexts where setting up a full DNS library is impractical. It supports all common record types (A, AAAA, MX, TXT, NS, CNAME) and is ideal for one-off lookups or infrastructure checks. The x402 micropayment model makes it suitable for pay-per-use agent workflows without subscription overhead.

## Known failure modes

- Domain does not exist or is not resolvable — returns an empty or error response
- Invalid record type string — may return an error or unexpected results
- Network or upstream DNS resolver failure — may return a timeout or 5xx error
- Payment failure via x402 — request blocked if USDC payment is not processed
- Malformed domain input — may return an error or null result

## How this service works

DNS records for any domain via DNS-over-HTTPS. Paid per call: $0.002 USDC on Base, Monad, Arbitrum, Optimism, Polygon, Avalanche or Solana (eip155:8453) via x402 v2. No API key.

## Output

A JSON object containing the requested DNS record(s) for the given domain, including record type, values (e.g., IP addresses, hostnames, priority values), and TTL information, depending on the record type queried.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "domain"
 ],
 "properties": {
  "type": {
   "type": "string",
   "description": "A, AAAA, MX, TXT, NS, CNAME, or ALL"
  },
  "domain": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dns-lookup-via-dns-over-https-0582392b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from dns-lookup.hsharmanov02.workers.dev](https://www.zero.xyz/host/dns-lookup.hsharmanov02.workers.dev/llms.txt)
