# DNS A/AAAA Record Resolver via DoH

> DNS A/AAAA Record Resolver via DoH is a paid API for AI agents from vending-machine-seven.vercel.app, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Resolves IPv4 (A) and IPv6 (AAAA) DNS records for a public hostname using DNS-over-HTTPS with a 60-second cache

## Facts

- Endpoint: GET https://vending-machine-seven.vercel.app/api/v/dns-resolve
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dns-a-aaaa-record-resolver-via-doh-02166386
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5IpzGf2Egrys-N95Q05-p

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-a-aaaa-record-resolver-via-doh-02166386
```

Example prompt: What are the IPv4 and IPv6 addresses that api.example.com currently resolves to? Use DNS-over-HTTPS to look it up.

## When to prefer this

Use this endpoint when you only need A and AAAA records (IP addresses) for a single hostname and want a simple, fast lookup. For multiple record types (MX, TXT, NS, CNAME) in one call, use the sibling multi-record endpoint instead. Ideal for IP resolution checks, connectivity validation, or enriching host data with address information.

## Known failure modes

- Invalid or non-existent hostname returns empty arrays or ok:false
- Private/internal hostnames not resolvable via public DoH
- Network timeout from the DoH upstream resolver
- Malformed host query parameter returns error
- Rate limiting or payment failure returns 402

## How this service works

Resolve A and AAAA records for a public hostname via DNS-over-HTTPS (60s cache)

## Output

Returns an object containing the queried hostname, an array of A (IPv4) records, an array of AAAA (IPv6) records, a boolean ok indicating success, the DoH source used, and a service label. Results are cached for 60 seconds.

## 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"
    },
    "pathParams": {
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "host"
     ],
     "properties": {
      "host": {
       "type": "string",
       "description": "Hostname e.g. example.com"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "a": {
       "type": "array"
      },
      "ok": {
       "type": "boolean"
      },
      "aaaa": {
       "type": "array"
      },
      "host": {
       "type": "string"
      },
      "source": {
       "type": "string"
      },
      "service": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dns-a-aaaa-record-resolver-via-doh-02166386/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from vending-machine-seven.vercel.app](https://www.zero.xyz/host/vending-machine-seven.vercel.app/llms.txt)
