Skip to main content

TXT Records

free
GET/v1/dns/txt

Retrieves 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 Administrator

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.

Security Analyst

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.

IT Administrator

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

NameTypeRequiredDescription
domainstringRequiredThe domain to query TXT records forExample: example.com

Response Fields

FieldTypeDescription
domainstringThe queried domain
recordsarrayAll TXT records with value, category, TTL, and verification service
has_spfbooleanWhether domain has an SPF record
has_dmarcbooleanWhether domain has a DMARC record
has_bimibooleanWhether domain has a BIMI record
has_mta_stsbooleanWhether domain has MTA-STS configured
spf_recordstringRaw SPF record value if present
dmarc_recordstringRaw DMARC record value if present
has_multiple_spfbooleanWhether multiple SPF records exist (RFC 7208 violation causing permerror)
verification_tokensarrayDetected domain verification tokens with service name
record_countnumberTotal number of TXT records found
recommendationsarrayActionable recommendations (e.g., merge multiple SPF records to avoid permerror)

Code Examples

cURL
curl "https://api.edgedns.dev/v1/dns/txt" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d "domain=example.com"
JavaScript
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);
Python
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.

Try This Endpoint

Test the TXT Records endpoint live in the playground.