Skip to the documentation
API

Check the SPF record of a domain

The SPF record of any domain with every include followed and every DNS lookup counted.

GET/tools/spf

Runs the real call on your workspace.

GET /tools/spf

The SPF record of any domain with every include followed and every DNS lookup counted.

Example

Needs no scope. It reads the SPF record, follows every include and redirect into tree, counts lookups against the limit of 10 and voidLookups against the limit of 2, and names the senders it recognises. status is pass, warn, fail or missing, and findings lists everything found, errors first, each with a stable code.

curl
curl "$API/tools/spf?domain=acme.com" -H "$AUTH"
Response
{  "object": "spf_report",  "domain": "acme.com",  "status": "pass",  "record": "v=spf1 include:_spf.google.com include:amazonses.com -all",  "records": ["v=spf1 include:_spf.google.com include:amazonses.com -all"],  "strings": ["v=spf1 include:_spf.google.com include:amazonses.com -all"],  "length": 57,  "lookups": 2,  "lookupLimit": 10,  "voidLookups": 0,  "voidLimit": 2,  "allQualifier": "-",  "tree": { "domain": "acme.com", "via": null, "record": "v=spf1 include:_spf.google.com include:amazonses.com -all", "lookups": 2, "totalLookups": 2, "terms": […], "children": […], "error": null },  "senders": [    { "name": "Google Workspace", "include": "_spf.google.com" },    { "name": "Amazon SES", "include": "amazonses.com" }  ],  "ipv4Addresses": 99328,  "ipv6Ranges": 6,  "findings": [    { "code": "one-record", "severity": "pass", "message": "Exactly one SPF record is published.", "subject": null, "value": null },    { "code": "lookups-within-limit", "severity": "pass", "message": "2 of 10 DNS lookups used.", "subject": null, "value": 2 }  ]}

Each node of tree carries its own lookups and the totalLookups of everything below it, so the include that spends the most is easy to find.

Every answer is what public DNS said at that moment. DNS that does not answer is a 503 unreachable, which is worth retrying, and a value that does not read as a domain is a 422 invalid_parameter on domain.

Reference

Give it an address.
Watch it work.

MCP, the API and the command line come with every plan, the free one included. Connect a client and approve exactly what it reaches.

Read https://nextmail.sh/agent.md and follow it. Then tell me what I need to do to sign you in to my Nextmail mailbox. If I have no account yet, create one with my address and ask me for the code that arrives. Wait for my go-ahead before you send anything.

© 2026 Nextmail. All rights reserved.