Lists the DNS records of one of your Cloudflare zones, filtered by type, name, content or proxy status.
curl -X POST "https://api.primaryapi.com/v1/run/cloudflare.dns_records" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"zone":"example.com","limit":2}'{
"output": {
"found": true,
"data": {
"zone": "example.com",
"nextCursor": null,
"records": [
{
"name": "www.example.com",
"ttl": 1,
"proxied": true,
"proxiable": true, …
}, …
],
"zoneId": "023e105f4ecef8ad9ca31a8372d0c353"
}
},
"credits": 1
}Input and output
10 fields
example.com.2.4 fields
Good to know
Runs as your connected Cloudflare account (read-only).
Pass the zone by domain name or zone id.
A ttl of 1 means automatic.
A zone the account cannot see is a miss, not an error. A miss is an answer, not an error.
Record ids from here feed cloudflare.update_dns_record. cloudflare.delete_dns_record.
Results are never stored.
The same key and credits work for every API.