Skip to main content

DNS Records

Retrieves DNS records from Cloudflare for DNS management and security monitoring. This input collects DNS record data across all zones in your Cloudflare account, including A, AAAA, CNAME, MX, TXT, NS, SRV, CAA, and other DNS record types for comprehensive domain management and monitoring.

Sync Type: Full Synchronization

Requirements

  • A Cloudflare account with API access
  • An API Token with the Zone:Read and Zone:DNS:Read permissions
  • Access to at least one DNS zone

Creating an API Token

  1. Log in to your Cloudflare dashboard
  2. Navigate to My Profile > API Tokens
  3. Click Create Token
  4. Use the Create Custom Token option
  5. Configure the token:
    • Token name: Give it a descriptive name (e.g., "Monad DNS Records")
    • Permissions: Add Zone > Zone > Read and Zone > DNS > Read
    • Zone Resources: Select the specific zone(s) or "All zones"
  6. Click Continue to summary and then Create Token
  7. Copy the token value (you won't be able to see it again)

Details

  • State Management: Uses deduplication to avoid re-processing unchanged records across runs. Each full sync retrieves all current DNS records from all zones.
  • API Endpoints:
    • GET /zones - Lists all zones in the account
    • GET /zones/{zone_id}/dns_records - Lists DNS records for a specific zone
  • Pagination: Page-based pagination with up to 5,000 records per page, sorted in ascending order.
  • Rate Limits: 1,200 requests per 5 minutes (approximately 4 requests per second). The input automatically enforces this limit.
  • Multi-Zone: Iterates through all zones in the account and fetches DNS records for each zone.

Configuration

Settings

SettingTypeRequiredDescription
CronstringYesCron expression for scheduling the input (e.g., 0 0 * * * for daily execution at midnight)
Zone IDsarrayNoOptional list of specific Cloudflare zone IDs to fetch DNS records from. If empty, fetches from all zones accessible by the API token.

Secrets

SecretTypeRequiredDescription
API TokenstringYesAPI Token with Zone:Read and Zone:DNS:Read permissions

Rate Limits

ScopeLimitWindowNotes
API Requests1,2005 minutesEnforced by Cloudflare
Records per page5,000Per requestMaximum allowed by API

Headers: Authorization: Bearer {api_token} Source: Cloudflare API Rate Limits

Troubleshooting

Common Issues

Issue: API returned success=false with authentication error Cause: The API token is invalid, expired, or lacks the required permissions. Solution: Verify your API token is correct and has both Zone:Read and Zone:DNS:Read permissions. Create a new token if needed.

Issue: No records returned despite having DNS records Cause: The API token may not have access to your zones, or you have no zones configured. Solution: Verify that your API token has been granted access to the zones you want to monitor. Ensure you have at least one active DNS zone in your Cloudflare account.

Issue: Rate limit exceeded errors Cause: Multiple integrations or manual API calls are consuming the rate limit quota. Solution: The input automatically handles rate limiting. If you see persistent errors, reduce the frequency of other API calls to your Cloudflare account.

Issue: Timeout errors when fetching DNS records Cause: Account has a very large number of DNS records across many zones, exceeding timeout. Solution: The input uses page-based pagination. If timeouts persist, consider checking Cloudflare API status or contacting Cloudflare support for large account configurations.

Sample Record

{
"id": "372e67954025e0ba6aaa6d586b9e0b59",
"type": "A",
"name": "example.com",
"content": "198.51.100.4",
"proxied": true,
"proxiable": false,
"ttl": 3600,
"comment": "Domain verification record",
"created_on": "2025-01-13T10:30:45Z",
"modified_on": "2025-01-13T10:30:45Z",
"tags": [],
"meta": {},
"settings": {
"flatten_cname": false
}
}