TXT Records
free/v1/dns/txtRetrieves all TXT records for a domain including SPF, domain verification tokens, and custom entries. Parses and categorizes records by purpose for easy analysis. Identifies verification tokens for 15+ services including Google, Microsoft, Facebook, Apple, Atlassian, DocuSign, and Stripe.
What It Does
Queries all TXT records and categorizes them by type: SPF records, DKIM selectors, domain verification tokens (Google, Facebook, Microsoft, Apple, Atlassian, DocuSign, Stripe, and more), DMARC references, BIMI (Brand Indicators for Message Identification) records, MTA-STS transport security records, and custom application-specific entries. Returns raw values with parsed metadata.
Why It's Useful
TXT records are the most overloaded DNS record type — a single domain may have 10+ TXT records for different purposes. EdgeDNS categorizes each record by purpose, saving hours of manual analysis. Critical for troubleshooting email authentication, discovering third-party integrations, and mapping the external attack surface.
Use Cases
Email Authentication Audit
Review all TXT records to ensure SPF, DKIM, and other email security records are properly configured.
Identify missing or misconfigured email authentication records before they cause delivery issues.
Third-Party Integration Discovery
Analyze domain verification TXT records to discover all third-party services with domain access — Google Workspace, Microsoft 365, Atlassian, DocuSign, Stripe, and more. Map the external attack surface.
Complete visibility into third-party service integrations without requiring internal documentation.
DNS Cleanup
Identify outdated verification records from discontinued services cluttering DNS.
Reduce DNS complexity and eliminate verification records for discontinued services that could be exploited for subdomain takeover.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
domain | string | Required | The domain to query TXT records forExample: example.com |
Response Fields
| Field | Type | Description |
|---|---|---|
domain | string | The queried domain |
records | array | All TXT records with value, category, TTL, and verification service |
has_spf | boolean | Whether domain has an SPF record |
has_dmarc | boolean | Whether domain has a DMARC record |
has_bimi | boolean | Whether domain has a BIMI record |
has_mta_sts | boolean | Whether domain has MTA-STS configured |
spf_record | string | Raw SPF record value if present |
dmarc_record | string | Raw DMARC record value if present |
has_multiple_spf | boolean | Whether multiple SPF records exist (RFC 7208 violation causing permerror) |
verification_tokens | array | Detected domain verification tokens with service name |
record_count | number | Total number of TXT records found |
recommendations | array | Actionable recommendations (e.g., merge multiple SPF records to avoid permerror) |
Code Examples
curl "https://api.edgedns.dev/v1/dns/txt" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d "domain=example.com"const response = await fetch(
'https://api.edgedns.dev/v1/dns/txt?domain=example.com',
{
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
}
);
const data = await response.json();
console.log(data);import requests
response = requests.get(
'https://api.edgedns.dev/v1/dns/txt',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={
'domain': 'example.com'
}
)
data = response.json()
print(data)Read the full TXT Records guide
Why it matters, real-world use cases, parameters, response fields, and how to call it from Claude, ChatGPT, or Gemini via MCP.
Read the guide →Related Endpoints
External References
Learn more about the standards and protocols behind this endpoint.