Cloudflare capability
List DNS records in a Cloudflare zone
Use the DNS Records API or Cloudflare TypeScript SDK to retrieve a zone’s records. The DNS Records page lets you inspect a record while working in the dashboard.
Documentation reviewed
Ways to do it
API
GET /zones/{zone_id}/dns_records
Read record names, types, values, and proxy settings for the zone. Filter by record type or name when useful.
- Requirements
- The Cloudflare zone ID and an API token with DNS Read permission for the zone.
- Limitations
- Responses are paginated. Check the pagination metadata before assuming you have the full zone.
Example
curl --fail -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
"https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records?type=A"SDK
client.dns.records.list()
List DNS record objects from a TypeScript or JavaScript application.
- Requirements
- An initialized Cloudflare SDK client, a zone ID, and DNS Read permission.
- Limitations
- Read all result pages if you need the whole zone. The first page can omit matching records.
Interface
Cloudflare dashboard → DNS → Records
Select the site and inspect its DNS Records table.
- Requirements
- Dashboard access to the relevant domain and its DNS settings.
- Limitations
- The list is scoped to the selected zone. Switch domains to inspect another zone.