# Swift Bot Labs Toolbox – DNS SPF Lookup

> Swift Bot Labs Toolbox – DNS SPF Lookup is a paid API for AI agents from x402-toolbox.swiftbotlab.workers.dev, paid per call via x402, $0.008/call, status unknown (last checked 2026-10-31).

Fetches and analyzes the SPF (Sender Policy Framework) DNS record for a given domain, reporting the policy, DNS lookup count, and any configuration issues.

## Facts

- Endpoint: GET https://x402-toolbox.swiftbotlab.workers.dev/v1/dns/spf?utm_source=zero.xyz
- Price: $0.008/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/swift-bot-labs-toolbox-dns-spf-lookup-fc475809
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_u3HUB1_xNywORnOf9GYfH

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 swift-bot-labs-toolbox-dns-spf-lookup-fc475809
```

Example prompt: Can you check the SPF record for github.com — I want to know what the policy is, how many DNS lookups it uses, and whether there are any configuration issues?

## When to prefer this

Choose this endpoint when you need a fast, pay-per-call SPF record lookup without setting up an account or managing API keys. It is ideal for one-off domain audits, agent-driven email authentication checks, or workflows that need deterministic SPF policy data including lookup-count validation. Prefer it over generic DNS resolvers when you specifically need SPF parsing and issue detection rather than raw DNS records.

## Known failure modes

- Domain does not exist — returns found: false with empty record
- Domain has no SPF record — returns found: false
- DNS resolution timeout — may return an error or empty result
- Malformed domain input — likely returns an error response
- SPF record with more than 10 DNS lookups — reported via lookupLimitExceeded: true and listed in issues

## How this service works

62 small, deterministic utility APIs (DNS and e-mail checks, web extraction, EVM decoding, x402 checks, IP math, JSON/CSV, hashing, conversions). No account or API key: pay per call in USDC with x402.

## Output

Returns a JSON object with: ok (boolean), tool name ('dns-spf'), and a result object containing found (boolean), domain (string), issues (array of problem strings), policy (e.g. 'softfail', 'fail', 'pass'), record (the raw SPF TXT record), dnsLookups (integer count of DNS lookups required), and lookupLimitExceeded (boolean indicating if the 10-lookup RFC limit is breached).

## 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"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "domain"
     ],
     "properties": {
      "domain": {
       "type": "string"
      }
     },
     "additionalProperties": false
    },
    "discoverable": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "tool": "dns-spf",
  "result": {
   "found": true,
   "domain": "github.com",
   "issues": [],
   "policy": "softfail",
   "record": "v=spf1 ip4:192.30.252.0/22 include:_netblocks.google.com ~all",
   "dnsLookups": 8,
   "lookupLimitExceeded": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/swift-bot-labs-toolbox-dns-spf-lookup-fc475809/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-toolbox.swiftbotlab.workers.dev](https://www.zero.xyz/host/x402-toolbox.swiftbotlab.workers.dev/llms.txt)
