# SPF Record Flattener

> SPF Record Flattener is a paid API for AI agents from intel.rallylive.ca, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Recursively expands a domain's SPF includes and redirects into a flat list of authorized IPv4/IPv6 ranges, returning a single flattened SPF record.

## Facts

- Endpoint: GET https://intel.rallylive.ca/dns/spf-flatten
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/spf-record-flattener-08b84cd6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_I0Axf0ktyKFgJIhX9Fr7A

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 spf-record-flattener-08b84cd6
```

Example prompt: Can you flatten the SPF record for example.com — recursively expand all the includes and redirects so I get a single list of every IP range authorized to send mail as that domain?

## When to prefer this

Use this endpoint when you need to resolve the full effective set of IP addresses authorized by a domain's SPF policy, especially when diagnosing SPF PermError caused by exceeding the 10-lookup limit, auditing third-party sender permissions, or generating a simplified flat SPF record. Prefer this over manual DNS lookups or generic DNS query tools when you need recursive expansion with deduplication across includes and redirects in a single API call.

## Known failure modes

- Domain has no SPF record — returns empty or error response
- Circular SPF includes causing infinite loop — endpoint should detect and break
- Domain does not exist or DNS resolution fails — DNS NXDOMAIN error
- SPF record is malformed or unparseable — parse error returned
- Exceeds recursive depth for deeply nested includes — may return partial results

## How this service works

SPF flattener: recursively expands a domain's SPF includes and redirects into the final list of authorised IPv4/IPv6 ranges and returns a flattened record. Fix the 10-lookup limit or audit exactly which networks may send mail as the domain. $0.01 per domain.

## Output

A flattened SPF record containing the complete, deduplicated list of authorized IPv4 and IPv6 CIDR ranges derived from recursively expanding all SPF `include:` mechanisms and `redirect=` modifiers for the queried domain, along with the synthesized flat SPF TXT record string.

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/spf-record-flattener-08b84cd6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from intel.rallylive.ca](https://www.zero.xyz/host/intel.rallylive.ca/llms.txt)
