# DNS Lookup & Mail Security API

> DNS Lookup & Mail Security API is a paid API for AI agents from freetier-agent-api.pages.dev, paid per call via x402, $0.0025/call, status unknown (last checked 2026-10-30).

Looks up DNS records (A, AAAA, MX, NS, TXT, CNAME, CAA) for any domain and optionally checks SPF/DMARC email security configuration.

## Facts

- Endpoint: GET https://freetier-agent-api.pages.dev/api/dns?utm_source=zero.xyz
- Price: $0.0025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dns-lookup-mail-security-api-0e75e898
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Bwz-kS9g0g7wFUogbrcI1

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-lookup-mail-security-api-0e75e898
```

Example prompt: Can you look up the DNS records for stripe.com — I want to see the A, MX, and TXT records, and also check if their SPF and DMARC email security is properly configured?

## When to prefer this

Choose this endpoint when you need real-time DNS resolution with structured JSON output and optional integrated mail security analysis (SPF/DMARC) in a single call. It is ideal for AI agents that need to verify domain infrastructure, check email deliverability configuration, or enrich contact/company data with DNS signals — without managing DNS resolver infrastructure. The pay-per-call x402 model (no signup or API key) makes it suitable for automated agent pipelines.

## Known failure modes

- Domain does not exist — returns exists: false with NXDOMAIN status
- Invalid or malformed domain input — may return error or empty records
- Requested record type not found — returns null or empty array for that type
- DNSSEC validation failure — dnssec_validated returns false
- Upstream DNS resolver unavailable — service error response
- Exceeding 10 record types in the types parameter — request rejected

## How this service works

Invoice-to-JSON, on-chain tools (transaction explainer + payment check, wallet profile, contract ABI, ERC-20 token risk), company contacts and web-to-RAG for AI agents. Pay per call with x402 (USDC on Base). No signup, no API key.

## Output

Returns a JSON object containing the domain name, existence flag, DNS status code, resolver name, DNSSEC validation boolean, timestamp, a records object keyed by type (A, AAAA, MX, NS, TXT, CNAME, CAA) each with TTL and data, resolver sources with attribution, and optionally a mail object with SPF record text, DMARC policy, SPF all-qualifier, MX host list, warnings array, DMARC percentage, DMARC reporting URI, mail acceptance boolean, and multi-SPF detection flag.

## 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",
     "required": [
      "domain"
     ],
     "properties": {
      "mail": {
       "enum": [
        "true",
        "false"
       ],
       "type": "string",
       "description": "false skips the SPF/DMARC check"
      },
      "types": {
       "type": "string",
       "description": "comma list of record types, default A,AAAA,MX,NS,TXT,CNAME,CAA (max 10)"
      },
      "domain": {
       "type": "string",
       "description": "domain or hostname, e.g. example.com (URLs and emails are trimmed to the host)"
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "mail": {
       "type": "object",
       "properties": {
        "spf": {
         "type": [
          "string",
          "null"
         ]
        },
        "dmarc": {
         "type": [
          "string",
          "null"
         ]
        },
        "spf_all": {
         "type": [
          "string",
          "null"
         ]
        },
        "mx_hosts": {
         "type": [
          "array",
          "null"
         ]
        },
        "warnings": {
         "type": [
          "array",
          "null"
         ]
        },
        "dmarc_pct": {
         "type": [
          "number",
          "null"
         ]
        },
        "dmarc_rua": {
         "type": [
          "string",
          "null"
         ]
        },
        "accepts_mail": {
         "type": [
          "boolean",
          "null"
         ]
        },
        "dmarc_policy": {
         "type": [
          "string",
          "null"
         ]
        },
        "spf_multiple": {
         "type": [
          "boolean",
          "null"
         ]
        }
       }
      },
      "domain": {
       "type": [
        "string",
        "null"
       ]
      },
      "exists": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "status": {
       "type": [
        "string",
        "null"
       ]
   
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mail": {
   "spf": "v=spf1 ip4:192.30.252.0/22 include:spf.protection.outlook.com include:_netblocks.google.com include:_netblocks2.google.com include:mail.zendesk.com include:_...",
   "dmarc": "v=DMARC1; p=quarantine; sp=reject; pct=100; rua=mailto:dmarc@github.com; ruf=mailto:dmarc@github.com; fo=1",
   "spf_all": "~all",
   "mx_hosts": [
    "github-com.mail.protection.outlook.com"
   ],
   "warnings": [],
   "dmarc_pct": 100,
   "dmarc_rua": "mailto:dmarc@github.com",
   "accepts_mail": true,
   "dmarc_policy": "quarantine",
   "spf_multiple": false
  },
  "domain": "github.com",
  "exists": true,
  "status": "NOERROR",
  "records": {
   "A": [
    {
     "ttl": 26,
     "data": "140.82.114.3"
    }
   ],
   "MX": [
    {
     "ttl": 259,
     "data": "0 github-com.mail.protection.outlook.com.",
     "host": "github-com.mail.protection.outlook.com",
     "priority": 0
    }
   ],
   "NS": [
    {
     "ttl": 559,
     "data": "dns1.p08.nsone.net."
    },
    {
     "ttl": 559,
     "data": "dns2.p08.nsone.net."
    }
   ],
   "CAA": [
    {
     "ttl": 1451,
     "data": "0 issue \"digicert.com\""
    },
    {
     "ttl": 1451,
     "data": "0 issue \"globalsign.com\""
    }
   ],
   "TXT": [
    {
     "ttl": 300,
     "data": "00Dd0000000hHE0=1TBKg000000TN2r"
    },
    {
     "ttl": 300,
     "data": "MS=6BF03E6AF5CB689E315FB6199603BABF2C88D805"
    }
   ],
   "AAAA": [],
   "CNAME": []
  },
  "sources": [
   {
    "url": "https://developers.cloudflare.com/1.1.1.1/",
    "name": "Cloudflare 1.1.1.1 (DNS-over-HTTPS)"
   }
  ],
  "resolver": "cloudflare",
  "checked_at": "2026-10-25T22:37:38.279Z",
  "dnssec_validated": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dns-lookup-mail-security-api-0e75e898/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from freetier-agent-api.pages.dev](https://www.zero.xyz/host/freetier-agent-api.pages.dev/llms.txt)
