# CodePulse API – DNS TXT Record Lookup

> CodePulse API – DNS TXT Record Lookup is a paid API for AI agents from codepulse-api.hahavoid0.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Looks up DNS TXT records (and other record types) for a given domain name, returning the raw record values with confidence metadata.

## Facts

- Endpoint: POST https://codepulse-api.hahavoid0.workers.dev/web/dns-txt
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/codepulse-api-dns-txt-record-lookup-e88f35f3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_cYDT4CuCsHrmIqlRFf3kO

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 codepulse-api-dns-txt-record-lookup-e88f35f3 -d '<json body>'
```

Example prompt: Can you look up the DNS TXT records for example.com? I need to see if there's an SPF record configured.

## When to prefer this

Use this endpoint when an agent needs to programmatically inspect DNS TXT records for a domain — especially for verifying SPF, DKIM, DMARC, or domain ownership tokens — and no API key management is desired. Prefer this over manual DNS tools when operating in an automated agent workflow that supports x402 micropayments on Base. It also supports MX, CAA, A, CNAME, and NS record types via the same interface.

## Known failure modes

- Domain does not exist or has no TXT records — returns empty records array
- Invalid domain format — likely returns validation error
- Unsupported DNS record type passed — supported field may return false
- Network or upstream DNS resolver failure — may return error or low-confidence result
- Rate limiting or payment failure via x402 — call does not execute

## How this service works

Fetches TXT, MX, A, CNAME, and CAA records for a domain via Cloudflare DNS-over-HTTPS.

## Output

Returns a JSON object with a 'result' field containing an array of DNS TXT record strings for the queried domain, along with 'warnings' (any issues found), 'supported' (boolean indicating if the record type is supported), 'confidence' (e.g. 'high'), and 'data_as_of' (freshness date). Also includes a standard disclaimer.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "type": "object",
     "required": [
      "domain"
     ],
     "properties": {
      "domain": {
       "type": "string",
       "description": "Domain name to check"
      },
      "type": {
       "type": "string",
       "description": "DNS record type (TXT, MX, CAA, A, CNAME, NS)",
       "default": "TXT"
      }
     }
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "records": [
    "v=spf1 include:_spf.google.com ~all"
   ]
  },
  "warnings": [],
  "supported": true,
  "confidence": "high",
  "data_as_of": "2026-06",
  "disclaimer": "Informational support only. Not legal, tax, medical, veterinary, or financial advice. Verify with the cited official source or a qualified professional before acting."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/codepulse-api-dns-txt-record-lookup-e88f35f3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from codepulse-api.hahavoid0.workers.dev](https://www.zero.xyz/host/codepulse-api.hahavoid0.workers.dev/llms.txt)
