# DNS Record Lookup API

> DNS Record Lookup API is a paid API for AI agents from api.bakhour.ca, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-16).

Resolves DNS records for a given domain, returning IP addresses or other DNS answers by record type

## Facts

- Endpoint: GET https://api.bakhour.ca/dns/lookup
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dns-record-lookup-api-3e686618
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_X5mTLvyxWbHT3a_HZ6fkp

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-record-lookup-api-3e686618
```

Example prompt: Can you do a DNS lookup for openai.com and tell me what its A record resolves to?

## When to prefer this

Use this endpoint when an AI agent needs to programmatically resolve DNS records for any domain, especially in automated workflows involving network verification, email configuration checks, or infrastructure validation. Preferred over manual dig/nslookup when operating in agent pipelines that require a simple HTTP-based DNS lookup with pay-per-call pricing.

## Known failure modes

- Domain does not exist or is unresolvable — empty answers array or error response
- Invalid record type provided — may return error or default to A record
- Network timeout reaching authoritative DNS servers — request failure
- Malformed domain input — validation error returned

## How this service works

Resolve ONE DNS record type for a domain -- the cheapest, narrowest domain-check endpoint. For all record types at once, use /domain/intelligence. For a bundled DNS+TLS+headers audit, use /web/audit (raw) or /security/posture (scored). For mail-security plus a scored verdict, use /domain/due-diligence.

## Output

A JSON object containing the queried domain name, the DNS record type requested, and an array of answers (e.g. IP addresses or other DNS values) 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "domain"
     ],
     "properties": {
      "domain": {
       "type": "string"
      },
      "record_type": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "domain": "openai.com",
  "answers": [
   "104.18.33.45"
  ],
  "record_type": "A"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dns-record-lookup-api-3e686618/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.bakhour.ca](https://www.zero.xyz/host/api.bakhour.ca/llms.txt)
