curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records?type=A" -H 'Authorization: Bearer $CF_API_TOKEN' | jq '.result[].name'

Category: Cloudflare

curl "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records?type=A" -H 'Authorization: Bearer $CF_API_TOKEN' | jq '.result[].name'

List DNS records filtered by record type

Narrows the zone's records to one type, here A records that point hostnames at IPv4 addresses, and lists just their names. Swap type for CNAME, MX, TXT, or AAAA to audit other kinds. Useful before creating a record to check for conflicts.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.